get_user_flags
Hi.
How would I check : User has FLAG_1 and FLAG_2 but not FLAG_3 |
Re: get_user_flags
If(get_user_flag(id) & FLAG3) == FLAG3) return
If((get_user_flags(id) & (f1 | f2 | f3)) == f1 | f2) FLAG123 MUST BE BITSUMS |
Re: get_user_flags
Quote:
Try this: PHP Code:
|
Re: get_user_flags
Quote:
|
Re: get_user_flags
Quote:
PHP Code:
|
Re: get_user_flags
Hes damn right ....
|
Re: get_user_flags
Why are you questioning this? My method is efficient.
|
Re: get_user_flags
No, I meant, is your method the same as
PHP Code:
|
Re: get_user_flags
Yes, it does the same thing..exactly what you asked for in your first post.
To check if has all, just add FLAG3 to the == value. PHP Code:
|
Re: get_user_flags
Quote:
EDIT : So you're checking for 3 flags if they're equal to 3 others. Ah I get it now. Thanks a lot. |
| All times are GMT -4. The time now is 20:52. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.