Raised This Month: $ Target: $400
 0% 

Check if user doesn't have a flag.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Unkolix
Veteran Member
Join Date: Sep 2012
Old 02-06-2013 , 15:25   Check if user doesn't have a flag.
Reply With Quote #1

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!")


Last edited by Unkolix; 02-06-2013 at 15:28.
Unkolix is offline
simanovich
AlliedModders Donor
Join Date: Jun 2012
Location: Israel
Old 02-06-2013 , 15:47   Re: Check if user doesn't have a flag.
Reply With Quote #2

PHP Code:
if (!(get_user_flags(id) & ADMIN_LEVEL_H)) 
__________________
simanovich is offline
Unkolix
Veteran Member
Join Date: Sep 2012
Old 02-06-2013 , 15:50   Re: Check if user doesn't have a flag.
Reply With Quote #3

Thanks!
Unkolix is offline
Bos93
Veteran Member
Join Date: Jul 2010
Old 02-06-2013 , 17:53   Re: Check if user doesn't have a flag.
Reply With Quote #4

or if ( ~get_user_flags(id) & ADMIN_LEVEL_H )
__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
dejan
Senior Member
Join Date: Mar 2009
Location: Sweden
Old 02-07-2013 , 09:24   Re: Check if user doesn't have a flag.
Reply With Quote #5

the other way you can do it is with
PHP Code:
if( !access(idADMIN_LEVEL_H) ) 
but you'll need to include amxmisc
__________________
dejan is offline
Send a message via Skype™ to dejan
Anti
Senior Member
Join Date: Jul 2012
Location: sky
Old 02-07-2013 , 13:17   Re: Check if user doesn't have a flag.
Reply With Quote #6

PHP Code:
if (get_user_flags(id) != ADMIN_LEVEL_H
Anti is offline
Send a message via Skype™ to Anti
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-07-2013 , 13:20   Re: Check if user doesn't have a flag.
Reply With Quote #7

Quote:
Originally Posted by Anti View Post
PHP Code:
if (get_user_flags(id) != ADMIN_LEVEL_H
WRONG
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Bos93
Veteran Member
Join Date: Jul 2010
Old 02-07-2013 , 13:21   Re: Check if user doesn't have a flag.
Reply With Quote #8

Quote:
Originally Posted by Anti View Post
PHP Code:
if (get_user_flags(id) != ADMIN_LEVEL_H
__________________
Bos93 is offline
Send a message via ICQ to Bos93 Send a message via Skype™ to Bos93
Anti
Senior Member
Join Date: Jul 2012
Location: sky
Old 02-07-2013 , 13:33   Re: Check if user doesn't have a flag.
Reply With Quote #9

Quote:
Originally Posted by ConnorMcLeod View Post
WRONG
Why?
Anti is offline
Send a message via Skype™ to Anti
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 02-07-2013 , 13:47   Re: Check if user doesn't have a flag.
Reply With Quote #10

Quote:
Originally Posted by Anti View Post
Why?
because it is
EpicMonkey is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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