Fury Posted June 20, 2012 Share Posted June 20, 2012 words = {"ananı","sikerim","orospu","amına","kancık","dick","yarrak","yarak","yarrağ","yarağ","bacını","ırzı","piç","mına","skerim","siktir","anan","lick","ass","asshole"} _root = getRootElement() _warnings = get("*Warnings") addEventHandler("onPlayerChat",_root, function (_msg,_type) for _,_x in pairs(words) do if string.find(_msg,string.lower(_x)) then local _msg = string.lower(_msg) cancelEvent() if _type == 0 then local _number = string.len(_x) local g_Name = getPlayerName(source) local _r,_g,_b = getPlayerNametagColor(source) _msg = string.rep("*",tonumber(_number)) outputChatBox( g_Name .. ":#FDE3B3 " .. _msg , _root, _r, _g, _b, true) else return end end end end ) hi guys whats wrong with that? its not working and not giving any errors Link to comment
-ffs-Sniper Posted June 20, 2012 Share Posted June 20, 2012 If the following code will not work properly please check if there are any other resources running that are using the "onPlayerChat" event. words = {"ananı","sikerim","orospu","amına","kancık","dick","yarrak","yarak","yarrağ","yarağ","bacını","ırzı","piç","mına","skerim","siktir","anan","lick","ass","asshole"} _root = getRootElement() _warnings = get("*Warnings") addEventHandler("onPlayerChat",_root, function (_msg,_type) for _,_x in pairs(words) do if string.find(_msg,string.lower(_x)) then local _msg = string.lower(_msg) if _type == 0 then cancelEvent() local _number = string.len(_x) local g_Name = getPlayerName(source) local _r,_g,_b = getPlayerNametagColor(source) _msg = string.rep("*",tonumber(_number)) outputChatBox( g_Name .. ":#FDE3B3 " .. _msg , _root, _r, _g, _b, true) return else return end end end end ) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now