09.06.2012, 14:10
pawn Код:
CMD:admins(playerid,params[])
{
#pragma unused params
new count = 0;
new string[256];
//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, sizeof(string), "%sLevel: %d - %s (Id:%i) | %s | %s\n",string,PlayerInfo[i][Level], PlayerName2(i),i,AdmRank,AdmDuty);
//SendClientMessage(playerid, ChangeColor, string);
count++;
}
}
}
if (count == 0)
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX,"Online Admin List..." ,"No admin online in the list.", "Ok", "");
else
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX,"Online Admin List..." ,string, "Ok", "");
return 1;
}