Raised This Month: $ Target: $400
 0% 

Is there a way to hide a command from amx_help?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Miley Demasturbot
Junior Member
Join Date: Feb 2011
Location: Kiev, Ukraine
Old 12-13-2011 , 13:46   Is there a way to hide a command from amx_help?
Reply With Quote #1

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?
Miley Demasturbot is offline
Send a message via ICQ to Miley Demasturbot
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 12-13-2011 , 14:02   Re: Is there a way to hide a command from amx_help?
Reply With Quote #2

edit: When registering, use -1 for the access.

Last edited by Emp`; 12-22-2011 at 16:11.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
Miley Demasturbot
Junior Member
Join Date: Feb 2011
Location: Kiev, Ukraine
Old 12-21-2011 , 14:16   Re: Is there a way to hide a command from amx_help?
Reply With Quote #3

Unfortunately, ADMIN_ALL just shows the command to everybody. And I would like it to be hidden.
Miley Demasturbot is offline
Send a message via ICQ to Miley Demasturbot
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-21-2011 , 15:41   Re: Is there a way to hide a command from amx_help?
Reply With Quote #4

Quote:
Originally Posted by Miley Demasturbot View Post
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).
__________________
fysiks is offline
Miley Demasturbot
Junior Member
Join Date: Feb 2011
Location: Kiev, Ukraine
Old 12-22-2011 , 08:21   Re: Is there a way to hide a command from amx_help?
Reply With Quote #5

Quote:
Originally Posted by fysiks View Post
edit adminhelp.sma
Yeah, I thought about it. Just wondering if there is a better way.
Still, thank you, guys!
Miley Demasturbot is offline
Send a message via ICQ to Miley Demasturbot
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-22-2011 , 13:35   Re: Is there a way to hide a command from amx_help?
Reply With Quote #6

Quote:
Originally Posted by Miley Demasturbot View Post
Just wondering if there is a better way.
That depends on what you mean by "better". IMO, my suggestion is the best way.
__________________
fysiks is offline
Old 12-21-2011, 14:19
Backstabnoob
This message has been deleted by Backstabnoob. Reason: didnt read it carefully
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 12-22-2011 , 16:11   Re: Is there a way to hide a command from amx_help?
Reply With Quote #8

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.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-22-2011 , 16:14   Re: Is there a way to hide a command from amx_help?
Reply With Quote #9

Quote:
Originally Posted by Emp` View Post
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.
__________________
fysiks 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 12:03.


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