define two flags?
Is it possible, to define 2 (or more) flags, so that the admin can use the specific command.
For example: #define ADMIN_LEVEL_A && ADMIN_LEVEL_B The admin should have both "m" and "n" so that he could use +hook (for example). |
Re: define two flags?
PHP Code:
|
Re: define two flags?
Ok. What happens if I want to define 6 flags for example? Is there an easier way?
(1) Flags abcd => get access to specific command. (2) Flag b => access to another specific command. But (1) shouldn't have access to (2). |
Re: define two flags?
if ( get_user_flags(id) == read_flags("abcd") )
if ( get_user_flags(id) == read_flags("b") ) |
Re: define two flags?
Just do it like
PHP Code:
|
Re: define two flags?
Backstabnoob is wrong.
PHP Code:
|
Re: define two flags?
Can you explain why is there the equality operator? I kind of don't understand that...
Edit: what exactly is wrong with that? I thought that when a player has all of these access flags, it shall not allow him process to the next check. |
Re: define two flags?
If you don't put == it means the flag can be either ADMIN_IMMUNITY or ADMIN_RESERVATION , etc.. And not ADMIN_IMMUNITY and ADMIN_IMMUNITY, etc..
|
Re: define two flags?
Thanks, looks like I made a lot of mistakes because of that :D
|
| All times are GMT -4. The time now is 11:28. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.