Blocking a command from appearing in chat
Hi. I know that there is at least one topic regarding this subject, I've seen it a while ago, but I really can't find it now.
So, how can I block a chat text from appearing? I know it's something about getting the user's input, then returning PLUGIN_HANDLED, but I really can't remember how to get his chat input. |
Re: Blocking a command from appearing in chat
Well, every time a user wants to say something he has to run the command "say". Register the clcmd "say", and take it from there.
That said you could really just download almost ANY plugin and find it yourself. |
Re: Blocking a command from appearing in chat
Ok. Thanks!
|
Re: Blocking a command from appearing in chat
Mind that return PLUGIN_HANDLED_MAIN would be accurate in such situation as it wouldnt prevent other plugins from hooking the command.
|
Re: Blocking a command from appearing in chat
Quote:
|
Re: Blocking a command from appearing in chat
I got some advice for you, since I just made this stuff
probably, you'll want all commands to start with "/" you should make one plugin that handles all chat commands, and do something like: register commands normally, register_clcmd("say /hello") after registering all commands, register_clcmd("say", "stop_say") PHP Code:
|
Re: Blocking a command from appearing in chat
That's great! Thanks! I only needed the code to stop one command from appearing, it's kind of a hidden plugin, but I will use the code for all the commands, it's nicer. Thank you! :)
|
| All times are GMT -4. The time now is 12:54. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.