29.04.2010, 23:07
(
Последний раз редактировалось Mokerr; 22.01.2014 в 22:23.
)
- solved
if(count == 0) { format(string, sizeof(string), "No Admins present"); SendClientMessage(playerid, COLOR_CYAN, string); }
if (strcmp(cmd, "/admins", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new count = 0;
SendClientMessage(playerid, COLOR_CYAN, "Present 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 && PlayerInfo[i][pTester] <= 3)
{
new admtext[64];
if(AppearInAdminList[i] == 0)
{
if(PlayerInfo[i][pAdmin] == 1338) { admtext = "Owner"; }
else if(PlayerInfo[i][pAdmin] == 1337) { admtext = "Scripter"; }
else if(PlayerInfo[i][pAdmin] == 6) { admtext = "Developer"; }
else if(PlayerInfo[i][pAdmin] == 5) { admtext = "Manager"; }
else if(PlayerInfo[i][pAdmin] == 4) { admtext = "Administrator"; }
else if(PlayerInfo[i][pAdmin] == 3) { admtext = "Administrator"; }
else if(PlayerInfo[i][pAdmin] == 2) { admtext = "Moderator"; }
else if(PlayerInfo[i][pAdmin] == 1) { admtext = "Moderator"; }
else if(PlayerInfo[i][pTester] == 3) { admtext = "Lead Tester"; }
else if(PlayerInfo[i][pTester] == 2) { admtext = "Tester"; }
else if(PlayerInfo[i][pTester] == 1) { admtext = "Trial Tester"; }
else { admtext = "Unknown Rank"; }
}
GetPlayerName(i, sendername, sizeof(sendername));
if(PlayerInfo[i][pAdminDuty] == 0)
{
format(string, sizeof(string), "%s - %s", admtext, sendername);
SendClientMessage(playerid, COLOR_CYAN, string);
count++;
}
else if(PlayerInfo[i][pAdminDuty] == 1)
{
format(string, sizeof(string), "%s - %s (On Duty)", admtext, sendername);
SendClientMessage(playerid, COLOR_CYAN, string);
count++;
}
}
}
}
if(count == 0)
{
format(string, sizeof(string), "No Admins present");
SendClientMessage(playerid, COLOR_CYAN, string);
return 1;
}
}
return 1;
}