Lua:local invalidWords = { 'whore', 'fuck', 'dick', } function onSay(cid, words, param, channel) words = (words .. ' ' .. param) for k, v in ipairs(invalidWords) do words = words:gsub("%a*" .. v .. "%a*", function(v) return ('*'):rep(v:len()) end) end doCreatureSay(cid, words, TALKTYPE_SAY) return true end
Should work better too
** Mod warning ** These are just examples, no need to infract me hehe
whore motherfucker just fuck yourself fucking dickhead lol go die haha
goes
***** ************ just **** yourself ******* ******** lol go die haha
Thank you. :thumbup:
I used your method by using string.rep, I also included param. Thx
Last edited: