gaz23 Posted October 10, 2010 Share Posted October 10, 2010 Recently I am working on a specialized anti-cheat. But I have a problem. I want to make a system of censorship. Does anyone know what function to use to do: Player: pus * y Anticheat: Player was muted for using bad words I mean the same function, or what any help. Waiting on the links to the wiki or something. Link to comment
dzek (varez) Posted October 10, 2010 Share Posted October 10, 2010 onPlayerChat event setPlayerMuted outputChatBox setTimer (to unmute player after some time) snippet (pass chat box text to this function to check if it contains bad words): bad_words = { "pus-y", "fu-k" } function isStringContainingBadWords(txt) for key,val in pairs(bad_words) do if (string.find(txt,val)) then return true end end return false end Link to comment
gaz23 Posted October 10, 2010 Author Share Posted October 10, 2010 Thanks varez, for a week will be released UAC2 Script for MTA. Link to comment
gaz23 Posted October 10, 2010 Author Share Posted October 10, 2010 (edited) ----problem eliminated Edited October 11, 2010 by Guest Link to comment
dzek (varez) Posted October 10, 2010 Share Posted October 10, 2010 lol? you are never use isStringContainingBadWords function to check if message is containing bad words from the list o_O Link to comment
gaz23 Posted October 10, 2010 Author Share Posted October 10, 2010 No. The whole time I sat in PAWN. To help me yet? Link to comment
dzek (varez) Posted October 10, 2010 Share Posted October 10, 2010 if nobody will help you ill rewrite it tommorow. im too sleepy now Link to comment
50p Posted October 11, 2010 Share Posted October 11, 2010 This code looks familiar to me and you say "I make some and don't work."? If you made this script yourself, you'd know how to use the function given to you by varez. Well, you can use the scripts from community website since they are all public scripts and we are here to help/teach you but I can't stand liars and taking credits for script that someone else made is just wrong. If you'll keep doing it, you will face consequences. Link to comment
dzek (varez) Posted October 11, 2010 Share Posted October 11, 2010 i think i saw code like this before.. do you think is taken from somewhere, 50p? Link to comment
gaz23 Posted October 11, 2010 Author Share Posted October 11, 2010 (edited) Omg...I make from scratch as I have some problem to write. --problem eliminated Edited October 11, 2010 by Guest Link to comment
dzek (varez) Posted October 11, 2010 Share Posted October 11, 2010 this is so random.. rewrite it, its already got too messy Link to comment
gaz23 Posted October 11, 2010 Author Share Posted October 11, 2010 bad_words = { [1]= "p-ssy", [2]= "f-ck" } function isStringContainingBadWords(txt) for key,val in pairs(bad_words) do if (string.find(txt,val)) then cancelEvent() end end end addEvent addEventHandler Repaired. I'm working on mute, but idk how . Link to comment
50p Posted October 12, 2010 Share Posted October 12, 2010 i think i saw code like this before.. do you think is taken from somewhere, 50p? This code was taken from my "anti_flood" script. Link to comment
robhol Posted October 12, 2010 Share Posted October 12, 2010 On another (albeit related) note, many players will not appreciate being treated as kids. Link to comment
dzek (varez) Posted October 12, 2010 Share Posted October 12, 2010 Most players are kids ... (psychically or mental) 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