- 75
- 18
- Версия MoonLoader
- .026-beta
всем привет!
как мне исправить ошибку в имгуй ??
\GTA San Andreas\moonloader\avtoalt.lua:4: attempt to call global 'require' (a string value)
stack traceback:
main:
require = "lib.moonloader"
local imgui = "imgui"
local vkeys = require "vkeys"
local avtoalt = new.bool()
local encoding = require 'encoding'
encoding.default = 'CP1251'
local u8 = encoding.UTF8
local new = imgui.new
local WinState = new.bool()
imgui.OnFrame(function() return WinState[0] end,
function(player)
imgui.SetNextWindowPos(imgui.ImVec2(500,500), imgui.Cond.FirstUseEver, imgui.ImVec2(0.5, 0.5))
imgui.SetNextWindowSize(imgui.ImVec2(245, 280), imgui.Cond.Always)
imgui.Begin(u8'Delod', WinState, imgui.WindowFlags.NoResize)
imgui.Checkbox(u8"avto_alt", avtoalt)
imgui.End()
end
)
function main()
sampRegisterChatCommand('delod', function() WinState[0] = not WinState[0] end)
wait(-1)
end
if avtoalt.v then
while true do
isKeyPressed(18)
end
end