require 'lib.moonloader'
local imgui = require('imgui')
local encoding = require 'encoding'
encoding.default = 'CP1251'
u8 = encoding.UTF8
local state = imgui.ImBool(false)
function main()
while not isSampAvailable() do wait(0) end
sampAddChatMessage('Script Loaded',-1)
imgui.Process = false
state.v = false
while true do
wait(0)
imgui.Process = state.v
if isKeyJustPressed(0x71) then
state.v = true
end
if isKeyJustPressed(0x71) and state then
state.v = false
end
end
end
function imgui.OnDrawFrame()
if state.v then
imgui.SetNextWindowPos(imgui.ImVec2(350.0, 250.0), imgui.Cond.FirstUseEver)
imgui.SetNextWindowSize(imgui.ImVec2(280.0, 70.0), imgui.Cond.FirstUseEver)
imgui.Begin('Window Title', state)
--тут твой код к примеру
imgui.Text(u8'Пример')
imgui.End()
end
end