I have a problem with ym /admins command when i get in the players rank changes to Server Owner but when im out he is back to his normal rank
PHP Code:
CMD:admins(playerid, params[])
{
new id;
new n[MAX_PLAYER_NAME];
new count = 0, string19[256];
GetPlayerName(id,n,sizeof(n));
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
if(GetPVarInt(i, "PlayerAdminLevel") < 1)
{
format(string19, sizeof(string19), "Trial Moderator : %s (%i)",n ,playerid);
count++;
}
if(GetPVarInt(i, "PlayerAdminLevel") < 2)
{
format(string19, sizeof(string19), "Moderator : %s (%i)",n ,playerid);
count++;
}
if(GetPVarInt(i, "PlayerAdminLevel") < 3)
{
format(string19, sizeof(string19), "Administrator : %s (%i)",n ,playerid);
count++;
}
if(GetPVarInt(i, "PlayerAdminLevel") < 4)
{
format(string19, sizeof(string19), "Chief Administrator : %s (%i)",n ,playerid);
count++;
}
if(GetPVarInt(i, "PlayerAdminLevel") < 5)
{
format(string19, sizeof(string19), "Server Owner : %s (%i)",n ,playerid);
count++;
}
}
}
if(count == 0)
{
SendClientMessage(playerid, COLOR_GREEN, "");
SendClientMessage(playerid, COLOR_GREEN, "|======== Online Admins =======|");
SendClientMessage(playerid, COLOR_WHITE, "- No Admins Online at Time!");
SendClientMessage(playerid, COLOR_GREEN, "|==============================|");
SendClientMessage(playerid, COLOR_GREEN, "");
}
else
{
SendClientMessage(playerid, COLOR_GREEN, "");
SendClientMessage(playerid, COLOR_GREEN, "|======== Online Admins =======|");
SendClientMessage(playerid, COLOR_WHITE, string19);
SendClientMessage(playerid, COLOR_GREEN, "|==============================|");
SendClientMessage(playerid, COLOR_GREEN, "");
}
return 1;
}