AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   plzz what this plugin (https://forums.alliedmods.net/showthread.php?t=267252)

hossm metwly 07-26-2015 11:17

plzz what this plugin
 
what the plugin ,whe player " say /rs " this word id Hidden

ArabicMan 07-26-2015 11:27

Re: plzz what this plugin
 
Must be admin_chat_colors.amxx :).
When player say /rs if you add rest score plugin it won't be appear if not will appear also any thing after / will appear without this plug-in.

Noize MC 07-26-2015 14:57

Re: plzz what this plugin
 
Code:

#include < amxmodx >
new Trie:g_hiddenMessages;
public plugin_init( )
{
    register_plugin( "Hide CMDS", "1.2", "x vs zekStein++" )
   
    register_clcmd( "say", "cmdCheckCmd" )
    register_clcmd( "say_team", "cmdCheckCmd" )
   
    g_hiddenMessages = TrieCreate( )
    TrieSetCell( g_hiddenMessages, "rank", 1 )
    TrieSetCell( g_hiddenMessages, "top15", 1 )
    TrieSetCell( g_hiddenMessages, "me", 1 )
    TrieSetCell( g_hiddenMessages, "stats", 1 )
    TrieSetCell( g_hiddenMessages, "rankstats", 1 )
    TrieSetCell( g_hiddenMessages, "hp", 1 )
    TrieSetCell( g_hiddenMessages, "shop", 1 )
}
public cmdCheckCmd( id )
{
    new szSaid[ 128 ]
    read_args( szSaid, sizeof szSaid -1 )
    remove_quotes( szSaid )
   
    if( szSaid[ 0 ] == '/' || TrieKeyExists( g_hiddenMessages, szSaid ) )
    {
        return PLUGIN_HANDLED_MAIN
    }
   
    return PLUGIN_CONTINUE
}


HamletEagle 07-26-2015 15:07

Re: plzz what this plugin
 
A trie is kind of overkill here, just save them in a constant. But, if for some reasons you want to keep using trie, at least destroy it in plugin_end. Yes, amxx should free all the handlers automatically, but it's better to make sure.

Gh05t04 07-26-2015 18:51

Re: plzz what this plugin
 
It might be: https://forums.alliedmods.net/showthread.php?p=652449


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

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