Jump to content

System of censorship


gaz23

Recommended Posts

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

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

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
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 xD.

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...