05.10.2011, 07:20
Hello, I want this command for players to also see online admins like: Level %s Admin: %s (On duty: %s)
On duty - Yes
Off Duty - No
Real Pawno Experts Please
On duty - Yes
Off Duty - No
Real Pawno Experts Please
pawn Код:
if(strcmp(cmd, "/admins", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
SendClientMessage(playerid, COLOR_GREEN, "Current Administrators Online:");
for(new i = 0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] > 0)
{
if(PlayerInfo[i][pAdmin] <= PlayerInfo[playerid][pAdmin])
{
//----------------------------------------------
new division[64];
if(PlayerInfo[i][pSpecOps] == 1)
{
division = "Secret Admins";
}
else if(PlayerInfo[i][pBanAppealer] == 1)
{
division = "Ban Mod";
}
else if(PlayerInfo[i][pGangMod] == 1)
{
division = "Faction Mod";
}
else if(PlayerInfo[i][pDonateMod] == 1)
{
division = "Donate Mod";
}
else if(PlayerInfo[i][pGangMod] == 0 && PlayerInfo[i][pBanAppealer] == 0 && PlayerInfo[i][pSpecOps] == 0)
{
division = "None";
}
//----------------------------------------------
new atext[64];
if(PlayerInfo[i][pAdmin] == 1)
{
atext = "Moderator";
}
else if(PlayerInfo[i][pAdmin] == 2)
{
atext = "Junior Admin";
}
else if(PlayerInfo[i][pAdmin] == 3)
{
atext = "Trusted Admin";
}
else if(PlayerInfo[i][pAdmin] == 4)
{
atext = "Senior Trusted Admin";
}
else if(PlayerInfo[i][pAdmin] == 1337)
{
atext = "Asst Head Admin";
}
else if(PlayerInfo[i][pAdmin] == 1338)
{
atext = "Head Admin";
}
else if(PlayerInfo[i][pAdmin] == 99997)
{
atext = "Lead Admin";
}
else if(PlayerInfo[i][pAdmin] == 99998)
{
atext = "Co Owner";
}
else if(PlayerInfo[i][pAdmin] == 99999)
{
atext = "Owner";
}
else if(PlayerInfo[i][pAdmin] == 9999999)
{
atext = "Executive Admin";
}
else if(PlayerInfo[i][pAdmin] == 99999999)
{
atext = "Executive Admin";
}
else if(PlayerInfo[i][pAdmin] == 999999999)
{
atext = "Executive Admin";
}
format(string, sizeof(string), "[%s]: %s *[%s] (On Duty: %s", atext, PlayerName(i), division, AonDuty);
SendClientMessage(playerid, COLOR_WHITE, string);
if(PlayerInfo[i][pAonDuty] == 1)
{
division = "On Duty";
}
else if(PlayerInfo[i][pDonateMod] == 0)
{
division = "Off Duty";
}
}
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "If you have questions regarding gameplay, or the server use /new.");
SendClientMessage(playerid, COLOR_GRAD2, "If you see suspicious happenings/players /report [id] [reason].");
}
}
return 1;
}