local sampev = require('lib.samp.events')
checks = false
function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand('check', checks)
while true do
wait(0)
end
end
function checks()
checks = not checks
if checks then
sampAddChatMessage('on', -1)
else
sampAddChatMessage('off', -1)
end
end
function sampev.onShowDialog(dialogId, style, title, button1, button2, text)
if checks and text:find('Вы тут') then
sampSendChat('тут')
end
end