Hi, so today I was trying to make some anti insult script. But this doesn't seem to work.
local badWord = { }
badWord[1] = "fuck"
badWord[2] = "bitch"
function getMessage(message, messageType)
if messageType == 0 then
if message == badWord then
killPed(source)
end
end
end
addEventHandler("onPlayerChat", getRootElement(), getMessage)
This one works but only with one word ("fuck")
local badWord = { }
badWord[1] = "fuck"
badWord[2] = "bitch"
function getMessage(message, messageType)
if messageType == 0 then
if message == badWord[1] then
killPed(source)
end
end
end
addEventHandler("onPlayerChat", getRootElement(), getMessage)
Do u guys have any solution for this?