Raised This Month: $12 Target: $400
 3% 

Solved Does CheckCommandAccess detect flags higher than the specified flag?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 12-11-2017 , 17:38   Does CheckCommandAccess detect flags higher than the specified flag?
Reply With Quote #1

Hey guys, I have a question about this:

PHP Code:
bool IsAdminAllowed(int client)
{
     if(
CheckCommandAccess(client"sm_kick"ADMFLAG_KICKfalse))
           return 
true;
     return 
false;

When using this code, will it allow any flags higher than the kick flag to have the same access?

Let's say player A has the kick flag and player B has the slay flag. Will player B also need to specifically have the kick flag to have the same access as player A?
__________________

Last edited by Psyk0tik; 12-11-2017 at 20:54. Reason: Marked as "[Solved]"
Psyk0tik is offline
8guawong
AlliedModders Donor
Join Date: Dec 2013
Location: BlackMarke7
Old 12-11-2017 , 18:54   Re: Does CheckCommandAccess detect flags higher than the specified flag?
Reply With Quote #2

Yes B/c player with higher access will have access to kick as well
__________________
8guawong is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 12-11-2017 , 18:59   Re: Does CheckCommandAccess detect flags higher than the specified flag?
Reply With Quote #3

The answer to this is no. The sole exception is the z ("root") flag, which grants all permissions.

You can assign multiple flags to admins and you should assign them all flags you want them to have.

Alternately, you can assign admins to groups and assign permissions to the group instead.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 12-11-2017 at 19:00.
Powerlord is offline
Psyk0tik
Veteran Member
Join Date: May 2012
Location: Homeless
Old 12-11-2017 , 20:54   Re: Does CheckCommandAccess detect flags higher than the specified flag?
Reply With Quote #4

Thanks guys!
__________________
Psyk0tik is offline
Reply


Thread Tools
Display Modes

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:02.


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