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

View Poll Results: Have you noticed the problem with this native?
Yes 1 8.33%
No 11 91.67%
Voters: 12. You may not vote on this poll

Solved GetUserFlagBits seems to be broken


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
luki1412
Veteran Member
Join Date: Oct 2008
Location: OnPluginStart()
Old 06-29-2016 , 11:39   GetUserFlagBits seems to be broken
Reply With Quote #1

I have noticed that this native doesnt always work. First noticed it doesnt work correctly when using Bonus Round Immunity plugin that uses this native to check whether the client has a certain flag. Connected multiple times and I wouldn't become immune couple of times(the ratio would be like 10% of me not getting the immunity). I thought that it was the plugin's code, however I noticed the same problem with other plugins using this native.

And as you can see a lot of people complaining about Reserved slots not working correctly and guess what? Reserved slots uses this native too. If it fails to find whether you have the flags, it tells you that you can't connect because the slot is reserved, even though you have all the flags aka root.

Anyone else noticed the same behavior with this native?
__________________

Last edited by luki1412; 09-23-2016 at 18:48.
luki1412 is offline
Wilczek
AlliedModders Donor
Join Date: Oct 2012
Location: Poland
Old 06-29-2016 , 13:12   Re: GetUserFlagBits seems to be broken
Reply With Quote #2

My plugin uses it to check for ADMFLAG_RESERVATION and I've never seen it failing.
__________________
Wilczek is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 06-29-2016 , 13:43   Re: GetUserFlagBits seems to be broken
Reply With Quote #3

I have a few plugins using GetUserFlagBits and they are working fine.
Mitchell is offline
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 06-29-2016 , 13:43   Re: GetUserFlagBits seems to be broken
Reply With Quote #4

The native is fine, your code is probably not (the fact it's using this native is a pretty good indicator of that).
__________________
asherkin is offline
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 06-29-2016 , 13:59   Re: GetUserFlagBits seems to be broken
Reply With Quote #5

99% of time the human is wrong, the machine isn't.
__________________
Benoist3012 is offline
luki1412
Veteran Member
Join Date: Oct 2008
Location: OnPluginStart()
Old 06-29-2016 , 14:06   Re: GetUserFlagBits seems to be broken
Reply With Quote #6

Quote:
Originally Posted by asherkin View Post
The native is fine, your code is probably not (the fact it's using this native is a pretty good indicator of that).
I told you that this happens to me AND other people, on windows and linux. Multiple plugins. Don't know why are you getting so defensive. I used the word "seems" for a reason. The only thing connecting these plugins is this native.

I'm only assuming that this native is the problem or maybe the use of that native. I'm pretty sure you have noticed other people talking about the plugin Reserved slots not working properly, as well. Is that plugin using that native incorrectly as well? That plugin keeps kicking people because the slot is reserved even though you are an admin with all the flags.

I'm still learning. Tell me what is the correct way to use this native. Check out the attached plugin below, not made by me, but using this native and not working 100% of the time. Or suggest a better way, to handle this problem.

Or maybe I have to record a video displaying how it fails to detect me as an admin, for you to even consider it?
Attached Files
File Type: sp Get Plugin or Get Source (bonusroundimmunity.sp - 278 views - 4.1 KB)
__________________
luki1412 is offline
Wilczek
AlliedModders Donor
Join Date: Oct 2012
Location: Poland
Old 06-29-2016 , 14:20   Re: GetUserFlagBits seems to be broken
Reply With Quote #7

Quote:
Originally Posted by asherkin View Post
(the fact it's using this native is a pretty good indicator of that).
What's wrong about the native?
__________________
Wilczek is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 06-29-2016 , 14:26   Re: GetUserFlagBits seems to be broken
Reply With Quote #8

Quote:
Originally Posted by Wilczek View Post
What's wrong about the native?
You should look into the AdminID class
Mitchell is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 06-29-2016 , 14:27   Re: GetUserFlagBits seems to be broken
Reply With Quote #9

Quote:
Originally Posted by luki1412 View Post
Tell me what is the correct way to use this native. Check out the attached plugin below, not made by me, but using this native and not working 100% of the time. Or suggest a better way, to handle this problem.
As in, ... CheckCommandAccess ?
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Old 06-29-2016 , 14:28   Re: GetUserFlagBits seems to be broken
Reply With Quote #10

Quote:
Originally Posted by Wilczek View Post
What's wrong about the native?
There are better ways to check a player's permissions, with the most convenient for server owners being CheckCommandAccess.
__________________
ddhoward 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 21:33.


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