25.01.2011, 18:26
pawn Код:
if (strcmp(cmd, "/admins", true) == 0)
{
if(IsPlayerConnected(playerid))
{
SendClientMessage(playerid, COLOR_LIGHTGREEN, "** Administrators **");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= 1 && PlayerInfo[i][pAdmin] <= 1338 || PlayerInfo[i][pTester] >= 1)
{
new admtext[64];
if(PlayerInfo[i][pAppearList] == 1)
{
if(PlayerInfo[i][pAdmin] == 1338) { admtext = "Owner"; }
else if(PlayerInfo[i][pAdmin] == 1337) { admtext = "Head Admin"; }
else if(PlayerInfo[i][pAdmin] == 6) { admtext = "Head Admin"; }
else if(PlayerInfo[i][pAdmin] == 5) { admtext = "Senior Admin"; }
else if(PlayerInfo[i][pAdmin] == 4) { admtext = "Senior Admin"; }
else if(PlayerInfo[i][pAdmin] == 3) { admtext = "Administrator"; }
else if(PlayerInfo[i][pAdmin] == 2) { admtext = "Administrator"; }
else if(PlayerInfo[i][pAdmin] == 1) { admtext = "Trial Admin"; }
else if(PlayerInfo[i][pTester] == 3) { admtext = "Lead Tester"; }
else if(PlayerInfo[i][pTester] == 2) { admtext = "Senior Tester"; }
else if(PlayerInfo[i][pTester] == 1) { admtext = "Helper"; }
else { admtext = "Unknown Rank"; }
}
GetPlayerName(i, sendername, sizeof(sendername));
sendername[strfind(sendername,"_")] = ' ';
if(PlayerInfo[i][pAdminDuty] == 0 && PlayerInfo[i][pAppearList] == 1)
{
format(string, sizeof(string), "%s %s (ID:%d) [Level: ] { Off Duty }", admtext, sendername, i);
SendClientMessage(playerid, COLOR_GREY, string);
}
else if(PlayerInfo[i][pAdminDuty] == 1 && PlayerInfo[i][pAppearList] == 1)
{
format(string, sizeof(string), "#COL_LIME %s %s (ID:%d) [Level: ] { On Duty }", admtext, sendername, i);
SendClientMessage(playerid, TEAM_VAGOS_COLOR, string);
}
}
}
}
}
return 1;
}