Jump to content

help script ((;


Recommended Posts

Posted

Well I would like to create a script to do when a player speak some expletive for example! bitch! get out another word as I love Thee what i could use for this?

Posted
table 
addEventHandler 
'onPlayerChat' 
string.find 
cancelEvent 
string.gsub 
outputChatBox 

be so?, did not understand much: \

function schat (root) 
addEventHandler( "onPlayerChat", rootElement, schat ) 
    string.format (formatstring, '''') 
    cancelEvent () 

Posted

I never said string.format -.-"

Create a table with the words you want to stop from showing in the chat, then loop the table with onPlayerChat event and use string.find to check if the message have any words from the table.

If it have any cancel the event and output the message and modify the words using string.gsub .

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