Raised This Month: $ Target: $400
 0% 

Register Access Rank Problem (get_user_flags)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Blizzard_87
Veteran Member
Join Date: Oct 2012
Old 02-26-2013 , 23:49   Register Access Rank Problem (get_user_flags)
Reply With Quote #1

this code is spose to check the users flags and then put them in the correct Rank.

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 && !rank3 && !rank2 && !rank1)
    {
        
RankName[id] = PLAYER;
    }
    
    else if(
rank3 && !rank2 && !rank1)
    {
        
RankName[id] = ADMIN;
    }
    
    else if(
rank2 && rank3 && !rank1)
    {
        
RankName[id] = HADMIN;
        
g_Protected[id] = 1;
    }
    
    else if(
rank3 && rank2 && rank1)
    {
        
RankName[id] = OWNER;
        
g_Protected[id] = 1;
    }
    

but for some reason its very buggy and doesnt work...

when i have all admin flags in users.ini... it shows me as Manager(OWNER)...

when i take away all but one to have me as ADMIN...

still shows me as Manager(OWNER).

what am i doing wrong?

this is my Ranks

PHP Code:
/* Rank Names */
enum
{
    
OWNER,
    
HADMIN,
    
ADMIN,
    
PLAYER,
    
    
AUTHORIZED
};

new const 
AccessType[AUTHORIZED][]=
{
    
"Manager",
    
"Head Admin",
    
"Admin",
    
""
}; 
Blizzard_87 is offline
 


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


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