Raised This Month: $ Target: $400
 0% 

Command Access Overrides


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 02-23-2014 , 06:18   Command Access Overrides
Reply With Quote #1

Is there any way to check if admin command is available for everyone or lower admins? Ex:
PHP Code:
RegAdminCmd"mycommand"Command_HandlerADMFLAG_ROOT ); 
Code:
Overrides
{
	"mycommand"		""
}
Without admin_overrides.cfg parsing.
Without checking by specified clients.
__________________
Leonardo is offline
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 02-23-2014 , 08:38   Re: Command Access Overrides
Reply With Quote #2

Maybe this.

PHP Code:
new iFlags;
if (
GetCommandOverride("mycommand"Override_CommandiFlags) && iFlags == 0)
{
    
//Public Command

__________________
11530 is offline
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 02-23-2014 , 10:18   Re: Command Access Overrides
Reply With Quote #3

I guess you're right. Thank you.
Leonardo is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 02-23-2014 , 10:59   Re: Command Access Overrides
Reply With Quote #4

That doesn't take into account group overrides, you really should be doing checks per-client and using CheckCommandAccess. Alternatively, you can craft a temporary AdminId with the flags / groups you want to check for and use CheckAccess.
__________________

Last edited by asherkin; 02-23-2014 at 11:00.
asherkin 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 17:53.


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