local imgui = require 'imgui'
scron = false
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand("test", test)
wait(-1)
end
function test()
scron = not scron
if scron then
sampAddChatMessage("вкл", -1)
imgui.Process = true
else
sampAddChatMessage("выкл", -1)
imgui.Process = false
end
end
function imgui.OnDrawFrame()
imgui.Begin('My window')
imgui.Text('Hello world')
imgui.Text('123')
if imgui.Button('Press Me') then
sampAddChatMessage('test', -1)
end
imgui.End()
end