local sampev = require 'lib.samp.events'
local active = false
function main()
repeat wait(0) until isSampAvailable()
sampRegisterChatCommand('xcatch', function()
if active == false then
printStringNow("~b~XCatcher~g~ activated!", 1337)
active = true
elseif active then
printStringNow('~b~XCatcher~r~ deactivated!', 1337)
active = false
end
end)
end
function sampev.onServerMessage(clr,msg)
if msg:find('Уровень преступности в штате составил') then
if active then
lua_thread.create(enterflood)
end
end
end
function enterflood()
while true do wait(1)
if active then
sampCloseCurrentDialogWithButton(1)
end
end
end