Nerses Posted October 19, 2014 Share Posted October 19, 2014 is there a script which blocks the chat for a particular resource? If Yes then tell me where to get them. Link to comment
King12 Posted October 19, 2014 Share Posted October 19, 2014 addEventHandler( "onChatMessage", resourceRoot, function ( ) cancelEvent ( true ) end ) it should work. Link to comment
crismar Posted October 19, 2014 Share Posted October 19, 2014 (edited) function cancelChat() cancelEvent() end addEventHandler("onPlayerChat", resourceRoot, cancelChat) Also use the priority argument for addEventHandler. Edited October 19, 2014 by Guest Link to comment
#DRAGON!FIRE Posted October 19, 2014 Share Posted October 19, 2014 function cancelChat() cancelEvent() end addEventHandler("onPlayerChat", resourceRoot, cancelChat, "high") Also use the priority argument for addEventHandler. !! Link to comment
King12 Posted October 19, 2014 Share Posted October 19, 2014 function cancelChat() cancelEvent() end addEventHandler("onPlayerChat", resourceRoot, cancelChat, "high") Also use the priority argument for addEventHandler. Link to comment
crismar Posted October 19, 2014 Share Posted October 19, 2014 Ok that priority argument was the dumbest idea I could ever have lol. Link to comment
Bonsai Posted October 19, 2014 Share Posted October 19, 2014 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. Link to comment
Nerses Posted October 19, 2014 Author Share Posted October 19, 2014 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. Link to comment
Nerses Posted October 21, 2014 Author Share Posted October 21, 2014 Hellllpppppppppppppp Link to comment
Mr_Moose Posted October 21, 2014 Share Posted October 21, 2014 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. 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