AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Is there a way to hide a command from amx_help? (https://forums.alliedmods.net/showthread.php?t=173979)

Miley Demasturbot 12-13-2011 13:46

Is there a way to hide a command from amx_help?
 
How can I register a console command that anyone can use, however I want it to be hidden from the amx_help list? Is this possible?

Emp` 12-13-2011 14:02

Re: Is there a way to hide a command from amx_help?
 
edit: When registering, use -1 for the access.

Miley Demasturbot 12-21-2011 14:16

Re: Is there a way to hide a command from amx_help?
 
Unfortunately, ADMIN_ALL just shows the command to everybody. And I would like it to be hidden.

fysiks 12-21-2011 15:41

Re: Is there a way to hide a command from amx_help?
 
Quote:

Originally Posted by Miley Demasturbot (Post 1617249)
Unfortunately, ADMIN_ALL just shows the command to everybody. And I would like it to be hidden.

You could edit adminhelp.sma and check for it (and not display it when found).

Miley Demasturbot 12-22-2011 08:21

Re: Is there a way to hide a command from amx_help?
 
Quote:

Originally Posted by fysiks (Post 1617305)
edit adminhelp.sma

Yeah, I thought about it. Just wondering if there is a better way.
Still, thank you, guys!

fysiks 12-22-2011 13:35

Re: Is there a way to hide a command from amx_help?
 
Quote:

Originally Posted by Miley Demasturbot (Post 1617693)
Just wondering if there is a better way.

That depends on what you mean by "better". IMO, my suggestion is the best way.

Emp` 12-22-2011 16:11

Re: Is there a way to hide a command from amx_help?
 
From amxmodx.cpp
Code:

        if (access < 0)                // is access is -1 then hide from listing
        {
                access = 0;
                listable = false;
        }

Setting the flags to -1 (leaving the default value) will cause it to not be shown.

fysiks 12-22-2011 16:14

Re: Is there a way to hide a command from amx_help?
 
Quote:

Originally Posted by Emp` (Post 1617922)
From amxmodx.cpp
Code:

        if (access < 0)                // is access is -1 then hide from listing
        {
                access = 0;
                listable = false;
        }

Setting the flags to -1 (leaving the default value) will cause it to not be shown.

Interesting. Too bad there is no way to do it from cmdaccess.ini.

So, in conclusion, the plugin which contains the command needs to be edited so that the third argument of the register command is -1.


All times are GMT -4. The time now is 12:03.

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