Я написал скрипт скажите плиз почему он неработает на MonetLoader
local se = require "samp.events"
local encoding = require 'encoding'
encoding.default = 'CP1251'
local imgui = require 'imgui'
local key = require 'vkeys'
local u8 = encoding.UTF8
local main_window_state = imgui.ImBool(false)
local msg = imgui.ImBuffer(256)
local cmd = imgui.ImBuffer(258)
local Interval = imgui.ImInt(0)
local CountUser = imgui.ImInt(0)
local Count = 0
function imgui.OnDrawFrame()
if main_window_state.v then
imgui.SetNextWindowSize(imgui.ImVec2(400, 200), imgui.Cond.FirstUseEver)
imgui.Begin('Auto-Message', main_window_state)
imgui.InputText("Message", msg)
imgui.InputText("Chat Command", cmd)
imgui.InputInt("Interval (In Milliseconds 1 sec. = 1000milisec.)", Interval)
imgui.InputInt("Message Send Count", CountUser)
if imgui.Button("START SCRIPT") then
Count = 0
lua_thread.create(function()
repeat
sampSendChat(cmd.v .. " " .. u8:decode(msg.v))
wait(Interval.v)
Count = Count + 1
until Count == CountUser.v
end)
end
imgui.End()
end
end
function main()
while true do
wait(0)
if wasKeyPressed(key.VK_C) then
main_window_state.v = not main_window_state.v
end
imgui.Process = main_window_state.v
end
end