View Single Post
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 03-11-2015 , 08:07   Re: Checking for several flags
Reply With Quote #3

Quote:
PHP Code:
if(get_user_flags(id) & ADMIN_LEVEL_F && ADMIN_LEVEL_G && ADMID_LEVEL_H)
{
     
//do stuff

try this
That's wrong shiina

PHP Code:
const FlagsNeeded ADMIN_LEVEL_F ADMIN_LEVEL_G ADMID_LEVEL_H;

if( ( 
get_user_flags(id) & FlagsNeeded ) == FlagsNeeded )
{
     
//do stuff

__________________

Last edited by Bugsy; 03-11-2015 at 08:13.
Bugsy is offline