local ffi = require "ffi"
local imgui = require "mimgui"
local encoding = require "encoding"
encoding.default = "CP1251"
local u8 = encoding.UTF8
local new = imgui.new
local faicons = require("fAwesome6")
local new, str = imgui.new, ffi.string
-- вписываем всё необходимое
local playerid = select(2, sampGetPlayerIdByCharHandle(PLAYER_PED))
local name = sampGetPlayerNickname(select(2, sampGetPlayerIdByCharHandle(playerPed)))
local tab = 1
local WinState = new.bool()
imgui.OnFrame(function()
return WinState[0]
end, function(player)
imgui.SetNextWindowPos(imgui.ImVec2(500, 700), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
imgui.Begin(u8"Zam-Leader Helper", WinState)
imgui.Text(u8'Zam-Leader Helper')
imgui.Text(u8'Для Arizona Mobile')
if imgui.Button(faicons("user") .. u8" Главная", imgui.ImVec2(160, 60)) then
tab = 1
end
if imgui.Button(faicons("gear") .. u8" Настройки", imgui.ImVec2(160, 60)) then
tab = 2
end
if imgui.Button(faicons("sliders") .. u8" Биндер", imgui.ImVec2(160, 60)) then
tab = 3
end
if imgui.Button(faicons("desktop") .. u8" Info", imgui.ImVec2(160, 60)) then
tab = 4
end
local size = imgui.GetWindowSize();
imgui.SetCursorPos(imgui.ImVec2(175, 33))
if (imgui.BeginChild('content', size - imgui.ImVec2(800, 800), true)) then
if tab == 1 then
imgui.Text(u8'Ваш ник ' ..name.. ' [ ' ..playerid.. ' ] ')
-- Содержимое вкладки 1
elseif tab == 2 then
-- Содержимое вкладки 2
elseif tab == 3 then
elseif tab == 4 then
end
imgui.EndChild();
end
imgui.End()
end)
function main()
sampRegisterChatCommand("lh", function()
WinState[0] = not WinState[0]
end)
end
imgui.OnInitialize(function()
imgui.GetIO().IniFilename = nil
local config = imgui.ImFontConfig()
config.MergeMode = true
config.PixelSnapH = true
iconRanges = imgui.new.ImWchar[3](faicons.min_range, faicons.max_range, 0)
imgui.GetIO().Fonts:AddFontFromMemoryCompressedBase85TTF(faicons.get_font_data_base85("solid"), 14, config, iconRanges)
end)