Raised This Month: $ Target: $400
 0% 

Solved invisible chat commands


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
thebest24
Member
Join Date: Sep 2018
Location: Georgia
Old 07-19-2022 , 05:18   invisible chat commands
Reply With Quote #1

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?
__________________
Hello!

Last edited by thebest24; 07-19-2022 at 10:43.
thebest24 is offline
lexzor
Veteran Member
Join Date: Nov 2020
Old 07-19-2022 , 09:45   Re: invisible chat commands
Reply With Quote #2

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;

lexzor is offline
thebest24
Member
Join Date: Sep 2018
Location: Georgia
Old 07-19-2022 , 10:43   Re: invisible chat commands
Reply With Quote #3

well it hide the messages but it block some plugins so not very effective, but i fixed that problem from configs/chatmanager.ini
__________________
Hello!
thebest24 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:55.


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