Jump to content

script


Nerses

Recommended Posts

Posted (edited)
  
function cancelChat() 
cancelEvent() 
end 
addEventHandler("onPlayerChat", resourceRoot, cancelChat) 
  

Also use the priority argument for addEventHandler.

Edited by Guest

Contact me if you are looking for a Web Developer.

3rd of October 2014 - Founder of RomaniaZ

Posted
  
function cancelChat() 
cancelEvent() 
end 
addEventHandler("onPlayerChat", resourceRoot, cancelChat, "high") 
  

Also use the priority argument for addEventHandler.

tumblr_mxvewjmpgy1qchpilo1_400.gif

560x95_FFFFFF_FF9900_000000_000000.png

Posted

Ok that priority argument was the dumbest idea I could ever have lol.

Contact me if you are looking for a Web Developer.

3rd of October 2014 - Founder of RomaniaZ

Posted

Question is why you want to do that.

If its uncompiled you could just edit it.

If its not, then its probably not that cool to block outputs, such as credits.

But you could just add a function to the resource that you want to block and overwrite the "outputChatBox" function.

Posted
Question is why you want to do that.

If its uncompiled you could just edit it.

If its not, then its probably not that cool to block outputs, such as credits.

But you could just add a function to the resource that you want to block and overwrite the "outputChatBox" function.

This script is compiled so I want to find a particular script which will close the access of the resource to the chat. If you are not difficult please help. I would be grateful.

Posted

If you read your replies you don't need to spam this entire topic, you got the correct answer from King12 already in the second post, here it is again:

addEventHandler( "onChatMessage", resourceRoot, function (    ) 
cancelEvent ( true ) 
end ) 

That little piece of code works excellent and don't mention compiled again unless you somehow managed to compile your meta file to, (is that even possible). You'll add this into the resource, not the compiled script files, also note that you're using this at your own risk, read the included license (if there is any) and make sure it's not someone's credits you're trying to remove.

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