Quote:
|
Originally Posted by xiiph
How do I check the value I get from get_user_flags() (<--- think thats the one with access flags...?) for a specific flag, in this case, "n".
|
From amxconst.inc:
Code:
#define ADMIN_LEVEL_B (1<<13) /* flag "n" */
So, use:
Code:
if( get_user_flags( id ) & ADMIN_LEVEL_B )
{
// the user 'id' has flag 'n'
}
Edit: the access() function that Avalanche posted is the exact same thing as what I wrote above, but it requires you include <amxmisc>
Remember tho, get_user_flags() returns a BitSum of the flags, not actual characters... to convert it to the character flags (and vice-versa), use these from amxmodx.inc:
Code:
/* Converts string to sum of bits.
* Example: "abcd" is a sum of 1, 2, 4 and 8. */
native read_flags(const flags[]);
/* Converts sum of bits to string.
* Example: 3 will return "ab". */
native get_flags(flags,output[],len);
Edit:

Avalanche, you posted just b4 me..