require 'lib.moonloader'
local sampev = require 'lib.samp.events'
local active = false
function main()
while not isSampAvailable() do wait(0) end
while true do
wait(0)
if wasKeyPressed(VK_J) and not sampIsCursorActive() then
active = not active
sampAddChatMessage('auto-rep: '..(active and 'ON' or 'OFF'), -1)
end
end
end
function sampev.onServerMessage(color, text)
if active then
if text:find('%[Жалоба%] от (.+)%[(%d+)%]:{FFFFFF} (.+)%. Уже (%d+) жалоб') then
sampSendChat('/ot')
active = false
sampAddChatMessage('Пойман репорт, скрипт выключен', -1)
end
end
end
function sampev.onShowDialog(id, style, title, button1, button2, text)
if active then
active = false
sampAddChatMessage('появился диалог, скрипт выключен', -1)
end
end