local imgui = require "mimgui"
local samp = require "lib.samp.events"
local window = imgui.new.bool(false)
local activate = imgui.new.bool(false)
imgui.OnInitialize(function()
imgui.GetIO().IniFilename = nil
end)
function main()
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand("mimgui", function() window[0] = not window[0] end)
wait(-1)
end
local newFrame = imgui.OnFrame(function() return window[0] end, function(player)
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(100, 100), imgui.Cond.FirstUseEver)
imgui.Begin("Window Title", window)
imgui.Checkbox("Activate", activate)
imgui.End()
end)
function samp.onSendChat(msg)
if activate[0] then
return {"/b "..msg}
end
end