Jump to content

System of censorship


gaz23

Recommended Posts

Posted

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.

Posted

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 
  

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

lol? you are never use isStringContainingBadWords function to check if message is containing bad words from the list o_O

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

if nobody will help you ill rewrite it tommorow. im too sleepy now

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted

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.

Posted

i think i saw code like this before.. do you think is taken from somewhere, 50p?

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

Posted (edited)

Omg...I make from scratch as I have some problem to write.

--problem eliminated

Edited by Guest
Posted

this is so random..

rewrite it, its already got too messy

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

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

Posted

On another (albeit related) note, many players will not appreciate being treated as kids.

Do NOT PM ME for help unless invited. - New MTA Script Editor

Scripting help "etiquette": understandable language, relevant code (ALL code if unsure), [Lua] tags, error messages with line numbers. Super simple stuff.

Posted

Most players are kids ... (psychically or mental)

Multi theft auto tools - replace cars and peds, move your map or compile your Lua files online!

programista php rzeszów

Need free webhosting for your small site? PM me. Need help with portforwarding? PM me. Do not PM me asking for help with scripting.

Having problems with port forwarding? Send me pm, I can do whole thing for you using TeamViewer (already helped about 20 people, no worries)!

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