Raised This Month: $ Target: $400
 0% 

Register Access Rank Problem (get_user_flags)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-27-2013 , 13:29   Re: Register Access Rank Problem (get_user_flags)
Reply With Quote #8

2 ways :

PHP Code:
public client_authorized(id)
{
    new 
flags get_user_flags(id) & ADMIN_LEVEL_B|ADMIN_LEVEL_C|ADMIN_LEVEL_D

    
if( flags == ADMIN_LEVEL_B|ADMIN_LEVEL_C|ADMIN_LEVEL_D )
    {
        
RankName[id] = OWNER
        g_Protected
[id] = 1
    
}
    else if( 
flags == ADMIN_LEVEL_C|ADMIN_LEVEL_D )
    {
        
RankName[id] = HADMIN
        g_Protected
[id] = 1
    
}
    else if( 
flags == ADMIN_LEVEL_D )
    {
        
RankName[id] = ADMIN
        g_Protected
[id] = 0
    
}
    else
    {
        
RankName[id] = PLAYER
        g_Protected
[id] = 0
    
}
}

public 
client_authorized(id)
{
    new 
flags get_user_flags(id)

    if( 
flags == ADMIN_LEVEL_B )
    {
        
RankName[id] = OWNER
        g_Protected
[id] = 1
    
}
    else if( 
flags == ADMIN_LEVEL_C )
    {
        
RankName[id] = HADMIN
        g_Protected
[id] = 1
    
}
    else if( 
flags == ADMIN_LEVEL_D )
    {
        
RankName[id] = ADMIN
        g_Protected
[id] = 0
    
}
    else
    {
        
RankName[id] = PLAYER
        g_Protected
[id] = 0
    
}

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
 



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 21:43.


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