AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Check if user doesn't have a flag. (https://forums.alliedmods.net/showthread.php?t=207769)

Unkolix 02-06-2013 15:25

Check if user doesn't have a flag.
 
How to check if user doesn't have a certain flag?


I get a tag mismatch:
PHP Code:

if ( !get_user_flags(id) & ADMIN_LEVEL_H )
{
        
client_print(idprint_chat"[VIP] Rasyk /noriuvip ir pamatysi, kaip ji gauti, bei ka VIP nariai gali!")



simanovich 02-06-2013 15:47

Re: Check if user doesn't have a flag.
 
PHP Code:

if (!(get_user_flags(id) & ADMIN_LEVEL_H)) 


Unkolix 02-06-2013 15:50

Re: Check if user doesn't have a flag.
 
Thanks!

Bos93 02-06-2013 17:53

Re: Check if user doesn't have a flag.
 
or if ( ~get_user_flags(id) & ADMIN_LEVEL_H )

dejan 02-07-2013 09:24

Re: Check if user doesn't have a flag.
 
the other way you can do it is with
PHP Code:

if( !access(idADMIN_LEVEL_H) ) 

but you'll need to include amxmisc

Anti 02-07-2013 13:17

Re: Check if user doesn't have a flag.
 
PHP Code:

if (get_user_flags(id) != ADMIN_LEVEL_H


ConnorMcLeod 02-07-2013 13:20

Re: Check if user doesn't have a flag.
 
Quote:

Originally Posted by Anti (Post 1889329)
PHP Code:

if (get_user_flags(id) != ADMIN_LEVEL_H


WRONG

Bos93 02-07-2013 13:21

Re: Check if user doesn't have a flag.
 
Quote:

Originally Posted by Anti (Post 1889329)
PHP Code:

if (get_user_flags(id) != ADMIN_LEVEL_H


:mrgreen:

Anti 02-07-2013 13:33

Re: Check if user doesn't have a flag.
 
Quote:

Originally Posted by ConnorMcLeod (Post 1889334)
WRONG

Why?

EpicMonkey 02-07-2013 13:47

Re: Check if user doesn't have a flag.
 
Quote:

Originally Posted by Anti (Post 1889345)
Why?

because it is


All times are GMT -4. The time now is 20:36.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.