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",
""
};