local hook = require 'lib.samp.events'
local state = false
function main()
while not isSampAvailable() do wait(0) end
sampAddChatMessage('AntiAdm работает!', -1)
sampRegisterChatCommand('antiadm', function()
state = not state
sampAddChatMessage(state and 'antiadm on' or 'antiadm off', -1)
end)
wait(-1)
end
function hook.onShowDialog(id, style, title, button1, button2, text)
if state and text:find('Администратор') then sampProcessChatInput('/q') end
end
function hook.onServerMessage(color, text)
if state and text:find('Администратор') then sampProcessChatInput('/q') end
end