- 134
- 6
- Версия MoonLoader
- .026-beta
Что не так?:
require 'lib.moonloader'
local imgui = require 'imgui'
local main_window_state = imgui.ImBool(false)
local encoding = require 'encoding'
local text_buffer = imgui.ImBuffer(256)
local admin_form = imgui.ImBool(false)
local X, Y = getScreenResolution()
local notf = import 'amenu.lua'
encoding.default = 'CP1251'
u8 = encoding.UTF8
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand('amenu2', cmd_imgui)
imgui.Process = false
while true do
wait(0)
if main_window_state.v == false then
imgui.Process = false
end end
end
function cmd_imgui(arg)
main_window_state.v = not main_window_state.v
imgui.Process = main_window_state.v
end
function imgui.OnDrawFrame()
imgui.SetNextWindowSize(imgui.ImVec2(300, 300), imgui.Cond.FirstUseEver)
imgui.SetNextWindowPos(imgui.ImVec2(X / 2, Y / 2), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
imgui.Begin(u8'Настройки', main_window_state)
imgui.Checkbox(u8'Админ-Форма', admin_form)
imgui.End()
end
а если там есть хоть какая-то ошибка то заходит