Raised This Month: $ Target: $400
 0% 

get user flag


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bladell
Senior Member
Join Date: Jun 2012
Old 12-23-2013 , 12:55   get user flag
Reply With Quote #1

PHP Code:
    PlayerAcces get_user_flags(id)
    
    switch(
PlayerAcces) {
        case 
n:
            
vip1(id)
        case 
o:
            
vip2(id)
        case 
p:
            
vip3(id)
        case 
q:
            
vip4(id)
        case 
r: {
            
vip1(id)
            
vip2(id)
            
vip3(id)
            
vip4(id)
            
vip(id)
        }
    } 
Is this correct?
Bladell is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-23-2013 , 13:58   Re: get user flag
Reply With Quote #2

No. get_user_flags() returns an integer with the flags set as bits. Look at plugins that use get_user_flags() to see how to use it.
__________________
fysiks is offline
RapZzw3rR
Member
Join Date: May 2012
Location: Romania
Old 12-24-2013 , 21:07   Re: get user flag
Reply With Quote #3

Try this:
PHP Code:
 PlayerAcces get_user_flags(id
     
    switch(
PlayerAcces) { 
        case 
ADMIN_LEVEL_B
            
vip1(id
        case 
ADMIN_LEVEL_C
            
vip2(id
        case 
ADMIN_LEVEL_D
            
vip3(id
        case 
ADMIN_LEVEL_E
            
vip4(id
        case 
ADMIN_LEVEL_F: { 
            
vip1(id
            
vip2(id
            
vip3(id
            
vip4(id
            
vip(id
        } 
    } 
or this
PHP Code:

 PlayerAcces 
get_user_flags(id
     
    switch(
PlayerAcces) { 
        case 
read_flags("n"): 
            
vip1(id
        case 
read_flags("o"): 
            
vip2(id
        case 
read_flags("p"): 
            
vip3(id
        case 
read_flags("q"): 
            
vip4(id
        case 
read_flags("r"): { 
            
vip1(id
            
vip2(id
            
vip3(id
            
vip4(id
            
vip(id
        } 
    } 
</span></span>
RapZzw3rR is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-24-2013 , 21:40   Re: get user flag
Reply With Quote #4

@RapZzw3rR, neither of those will work. You cannot use a switch with user flags.
__________________
fysiks is offline
Reply



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 00:08.


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