09.06.2012, 13:49
Hello!
I am using luxadmin system and i have tried to make the admin list in box.here is the code below
It is not working properly.When there is 2 admins then it will show only 1 admin in the list.
How to fix it? please anyone help me...
I am using luxadmin system and i have tried to make the admin list in box.here is the code below
pawn Код:
CMD:admins(playerid,params[])
{
#pragma unused params
new count = 0;
new string[128];
//new ChangeColor;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(PlayerInfo[i][Level] >= 1 && PlayerInfo[i][Hide] == 0)
{
if(PlayerInfo[i][Level] > 6)
{
AdmRank = "Professional Admin";
//ChangeColor = Color_Professional_Admin;
}
if(IsPlayerAdmin(i))
{
AdmRank = "RCON Administrator";
//ChangeColor = Color_RCON_Administrator;
}
else
{
switch(PlayerInfo[i][Level])
{
case 1: {
AdmRank = "VIP";
//ChangeColor = Color_Basic_Moderator;
}
case 2: {
AdmRank = "Moderator";
//ChangeColor = Color_Moderator;
}
case 3: {
AdmRank = "Master Moderator";
//ChangeColor = Color_Master_Moderator;
}
case 4: {
AdmRank = "Administrator";
//ChangeColor = Color_Administrator;
}
case 5: {
AdmRank = "Head Administrator";
//ChangeColor = Color_Master_Administrator;
}
case 6: {
AdmRank = "Professional Admin";
//ChangeColor = Color_Moderator;
}
}
}
switch(PlayerInfo[i][OnDuty])
{
case 0: AdmDuty = "Playing!";
case 1: AdmDuty = "On Duty!";
}
format(string, 128, "Level: %d - %s (Id:%i) | %s | %s",PlayerInfo[i][Level], PlayerName2(i),i,AdmRank,AdmDuty);
//SendClientMessage(playerid, ChangeColor, string);
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX,"Online Admin List..." ,string, "Ok", "");
count++;
}
}
}
if (count == 0)
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX,"Online Admin List..." ,"No admin online in the list.", "Ok", "");
return 1;
}
How to fix it? please anyone help me...