local imgui = require 'imgui'
local key = require 'vkeys'
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8
local main_window_state = imgui.ImBool(false)
local secondary_window_state = imgui.ImBool(false)
local themes = import "Eternity\\imgui_themes.lua"
function imgui.OnDrawFrame()
if main_window_state.v then
local sw, sh = getScreenResolution()
imgui.SetNextWindowPos(imgui.ImVec2(sw / 2, sh / 2), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
imgui.SetNextWindowSize(imgui.ImVec2(385, 500), imgui.Cond.FirstUseEver)
imgui.Begin('Admin Helper by MacBrown', main_window_state, imgui.WindowFlags.NoResize)
img = imgui.CreateTextureFromFile(getGameDirectory() .. "\\moonloader\\Eternity\\76.png")
imgui.Image(img, imgui.ImVec2(400, 200))
imgui.Text('Hello world')
imgui.SetCursorPosX((imgui.GetWindowWidth() - 75 + imgui.GetStyle().ItemSpacing.x) / 2)
imgui.Text(u8"Пункты:")
imgui.SetCursorPosX((imgui.GetWindowWidth() - 215 + imgui.GetStyle().ItemSpacing.x) / 2)
if imgui.Button(u8'Реклама', imgui.ImVec2(200, 25)) then
main_window_state.v = not main_window_state.v
sampAddChatMessage("Немн", -1)
end
imgui.SetCursorPosX((imgui.GetWindowWidth() - 215 + imgui.GetStyle().ItemSpacing.x) / 2)
if imgui.Button(u8'Эфир', imgui.ImVec2(200, 25)) then
main_window_state.v = not main_window_state.v
secondary_window_state.v = not secondary_window_state.v
imgui.Begin('Admin Helper by MacBrown', secondary_window_state, imgui.WindowFlags.NoResize) -- Не открывается, только курсор
imgui.Text("sss")
end
imgui.End()
end
end
function main()
while not isSampAvailable() do wait(100) end
sampAddChatMessage('{32CD32}[Admins Tool] Empire/Life {FFFFFF}был {87CEFA}Загружен!', -1)
imgui.SwitchContext()
themes.SwitchColorTheme(6)
while true do
wait(0)
if wasKeyPressed(key.VK_X) then
main_window_state.v = not main_window_state.v
end
imgui.Process = main_window_state.v
end
end