AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hide chat commands (https://forums.alliedmods.net/showthread.php?t=213686)

Tonda 04-17-2013 15:19

Hide chat commands
 
Hi, i used this code for hide all chat commands like a /hp , /top15 etc.


PHP Code:

register_clcmd"say""cmdCheckCmd" )
register_clcmd"say_team""cmdCheckCmd" )


public 
cmdCheckCmdid )
{
    new 
szSaid128 ]
    
read_argsszSaidsizeof szSaid -)
    
remove_quotesszSaid )
    
    if( 
szSaid] == '/' || equalszSaid"command" ) )
    {
        return 
PLUGIN_HANDLED_MAIN
    
}
    
    return 
PLUGIN_CONTINUE


All works fine and all players cant see all commands, but ... If player havent team (spectate), he see all commands and this script doesnt hide.

Why?


All times are GMT -4. The time now is 10:49.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.