Flags related
Hi.
I'll try to explain briefly what i try to achieve. I have a group that have these flags for example: e, f, g Obviously i have some other groups that have the same flags but some more flags like: e, f, g, h, i etcetera.. How can i distinguish them? Something like if (access == efg & !h) { do smth } Please can you give me an example how to do this ? Thanks in advace. |
Re: Flags related
Code:
|
Re: Flags related
NOT logical isn't ~ ?
|
Re: Flags related
it is, ^ is xor
flags ^ ADMIN_CFG will return 1 if ADMIN_CFG value in flags is 0 and will return 0 if its 1 |
Re: Flags related
Oh , now understand , thanks you jima.
|
Re: Flags related
So, more exactly:
PHP Code:
|
Re: Flags related
Code:
public client_putinserver(id) {it affects "ef" and "bcefjimr" and "bcdtefhijr" and so on ... I need to work just on "ef" flags ... |
Re: Flags related
Code:
if( get_user_flags(id) & (ADMIN_MAP | ADMIN_SLAY) == (ADMIN_MAP | ADMIN_SLAY) ) |
Re: Flags related
that makes more sense.
Anyway, it doesn't work either. :shock: but it works with if( get_user_flags(id) == (ADMIN_MAP | ADMIN_SLAY) ) Thanks for your help :) |
Re: Flags related
Quote:
The one you ended up using will only return true if and only if the player has only those two flags. Is that what you wanted? When you stated in your first post that you wanted to specifically exclude flag "h" it made it seem like you could have other flags but just not "h". (Granted, mine doesn't check for the absence of any particular flags) |
| All times are GMT -4. The time now is 08:15. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.