AlliedModders

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

thebest24 07-19-2022 05:18

invisible chat commands
 
when i type commands on my server like /shop , /class , /menu , etcc.. they are visible in chat
like normal messages. how can i make them invisible for all players?

lexzor 07-19-2022 09:45

Re: invisible chat commands
 
PHP Code:

#include <amxmodx>

new const g_szCommands[][] =
{
    
"/shop",
    
"/class",
    
"/menu"
}

public 
plugin_init()
{
    
register_plugin("ChatCMDHider""0.1""AMXX Community");

    
register_clcmd("say""sayHandle");
    
register_clcmd("say_team""sayHandle");
}

public 
sayHandle(id)
{
    static 
szArg[192];
    
read_args(szArgcharsmax(szArg));
    
remove_quotes(szArg);
    
trim(szArg);

    for(new 
isizeof(g_szCommands); i++)
    {
        if(
equal(szArgg_szCommands[i]))
            return 
PLUGIN_HANDLED_MAIN;
    }

    return 
PLUGIN_CONTINUE;



thebest24 07-19-2022 10:43

Re: invisible chat commands
 
well it hide the messages but it block some plugins so not very effective, but i fixed that problem from configs/chatmanager.ini :wink:


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

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