Raised This Month: $ Target: $400
 0% 

Register Access Rank Problem (get_user_flags)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 02-27-2013 , 08:29   Re: Register Access Rank Problem (get_user_flags)
Reply With Quote #7

Quote:
Originally Posted by Unkolix View Post
Maybe do it like this?
PHP Code:
public client_authorized(id

    
/* Register Rank Access */ 
    
rank1 get_user_flags(id) & ADMIN_LEVEL_B
    
rank2 get_user_flags(id) & ADMIN_LEVEL_C
    
rank3 get_user_flags(id) & ADMIN_LEVEL_D
    
rank4 get_user_flags(id) & ADMIN_ALL
    
/************************/ 
    
    
if(rank4//Checks if user has all flags (doesn't need to check if he has others because it is included already)
    

        
RankName[id] = OWNER//Sets it as a owner
        
g_Protected[id] = 1//Sets protection
    
}
    else if(
rank2 && rank3 && !rank1)  //Checks if user has LEVEL C, D, but not B
    

        
RankName[id] = HADMIN//Sets it as a headadmin
        
g_Protected[id] = 1//Sets protection
    
}
    else if(
rank3 && !rank2 && !rank1)  //Checks if user has LEVEL D, but not B or C
    

        
RankName[id] = ADMIN//Sets it as a admin
    

    else if(!
rank4 && !rank3 && !rank2 && !rank1//Checks if user hasn't got any levels
    

        
RankName[id] = PLAYER//Sets it as a player
    


i'll test this out tomorrow to late now

thanks...

got any ideas on this one tho?

PHP Code:
public onlineadmins(id) {
    new 
players[32],pnumplayer;
    
get_players(players,pnum);
    
    
get_pcvar_string(TAGPREFIXcharsmax(PREFIX));
        
    new 
temp[501],name[32], count
    
    
for( new ii<pnumi++ ) {
        if(!
g_HideRank[players[i]]) {
            
player players[i]
            
count++
            
get_user_name(player,name,31)
            
formatex(temp,500,"%s %s !n(!g%s!n),!t "tempnameAccessType[RankName[player]])
        }
    }
    if(
count)
        
client_printc(id"!g[%s]!n Admins Online:!t %s!n"PREFIXtemp)
    else
        
client_printc(id"!g[%s]!n No admins online."PREFIX)
        
    return 
PLUGIN_HANDLED;

doesnt work properly.
Blizzard_87 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