require 'lib.moonloader'
local imgui = require 'mimgui'
local ffi = require 'ffi'
local encoding = require 'encoding'
encoding.default = 'CP1251'
local u8 = encoding.UTF8
local new, str, sizeof = imgui.new, ffi.string, ffi.sizeof
local renderWindow = new.bool()
local sizeX, sizeY = getScreenResolution()
local inputField = new.char[256]()
local newFrame = imgui.OnFrame(
function() return renderWindow[0] end,
function(player)
imgui.SetNextWindowPos(imgui.ImVec2(sizeX / 2, sizeY / 2), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
imgui.SetNextWindowSize(imgui.ImVec2(245, 280), imgui.Cond.FirstUseEver)
imgui.Begin(u8'Основное', renderWindow, imgui.WindowFlags.NoResize)
--code
imgui.End()
end
)
function main()
while not isSampAvailable() do wait(50) end
sampRegisterChatCommand('oih', function() renderWindow[0] = not renderWindow[0] end)
while true do
wait(0)
end
end