Try this:
PHP Code:
#include <amxmodx>
public plugin_init()
{
register_plugin( "ChatCmdBlocker", "0.1", "LegacyCode" )
register_clcmd( "say", "handleBlockCmdOutput" )
register_clcmd( "say_team", "handleBlockCmdOutput" )
}
public handleBlockCmdOutput( id )
{
new const a_ChatCommands[][] =
{
"thetime",
"/rank",
"/top15",
"/hp",
"/nextmap",
"/timeleft"
}
new s_Message[192], s_ChatCmd[16]
read_args( s_Message, charsmax( s_Message ) )
remove_quotes( s_Message )
trim( s_Message )
if ( !s_Message[0] || !is_user_connected( id ) )
return PLUGIN_HANDLED
copyc( s_ChatCmd, charsmax( s_ChatCmd ), s_Message, ' ' )
for ( new i; i < sizeof a_ChatCommands; i++ )
{
if ( equali( s_ChatCmd, a_ChatCommands[i] ) )
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
Place it at the very start of the "Custom" section in plugins.ini:
Code:
; Custom - Add 3rd party plugins here
block_chat.amxx
...
I hope this is a good attempt at the problem, I'm new to this.
Let me know if it works!
- LegacyCode