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

Solved Quick question on checking GetUserFlagBits(client)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 01-05-2018 , 02:04   Quick question on checking GetUserFlagBits(client)
Reply With Quote #1

hello.

Can i check the bitflags with

PHP Code:
if(GetUserFlagBits(i) & ADMFLAG_RESERVATION|ADMFLAG_ROOT)
{
    
//code

Thanks
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D

Last edited by Lux; 01-05-2018 at 02:17. Reason: Yes It WORKS!
Lux is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 01-05-2018 , 02:30   Re: Quick question on checking GetUserFlagBits(client)
Reply With Quote #2

GetUserFlagBits should never be user for permission checks, use CheckCommandAccess.
__________________
asherkin is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 01-05-2018 , 03:28   Re: Quick question on checking GetUserFlagBits(client)
Reply With Quote #3

Thanks for advice, i'v change what i was doing.
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D
Lux is offline
Visual77
Veteran Member
Join Date: Jan 2009
Old 01-05-2018 , 04:36   Re: Quick question on checking GetUserFlagBits(client)
Reply With Quote #4

Quote:
Originally Posted by asherkin View Post
GetUserFlagBits should never be user for permission checks, use CheckCommandAccess.
But only if you're checking for flags in a string, like string_cvar_acess_plugin "a,b", right?
Visual77 is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 01-05-2018 , 04:43   Re: Quick question on checking GetUserFlagBits(client)
Reply With Quote #5

Quote:
Originally Posted by Visual77 View Post
But only if you're checking for flags in a string, like string_cvar_acess_plugin "a,b", right?
No, and there is no need to implement a cvar for setting permissions if you're using CheckCommandAccess.
__________________
asherkin 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 15:39.


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