- Версия MoonLoader
- .027.0-preview
пытаюсь сделать скрипт, который флудит /ot и перестает флудить когда я принимаю репорт. идей как сделать так, чтобы переставал флудить - только одна: сделать проверку на мой ник в чате.
Прикрепил свой код, но он не работает. не понимаю, как это сделать, хелп плиз. я чайник, не бейте!!!
kod:
require "lib.moonloader"
local sampev = require "lib.moonloader"
local key = 115
local active = false
function main()
while not isSampAvailable() do wait(0) end
while true do
wait(150)
if active then
sampSendChat('/ot')
end
if isSampfuncsConsoleActive() and active == true or sampIsChatInputActive() and active == true or sampIsDialogActive() and active == true or isPauseMenuActive() and active == true then
active = false
sampAddChatMessage('Флудер выключен', -1)
end
if wasKeyPressed(key) then
if active then
active = false
sampAddChatMessage('Флудер /ot выключен', -1)
else
active = true
sampAddChatMessage('Флудер /ot включен', -1)
end
end
end
end
function sampev.onServerMessage(color, text)
if text:find('Nick_Name') and active then
active = false
sampAddChatMessage('Вы словили репорт!')
end
end