local active = false
local text = 'sex'
main = function()
repeat wait(0) until isSampAvailable()
sampRegisterChatCommand("message", function()
active = not active
sampAddChatMessage(tostring(active), -1)
end)
end
sampRegisterChatCommand('message.set', function(input)
if tostring(input) then
text = tostring(input)
sampAddChatMessage('Set: '..text,-1)
end
end)
require 'lib.samp.events'.onServerMessage = function (color, t)
if active then
if t:match(text) then
return false
end
end
end