15.10.2011, 17:34
pawn Код:
if (strcmp(cmd, "/admins", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new bool:AdminsOnline = false;
SendClientMessage(playerid, COLOR_GREEN, "____________________[ Administradores em serviзo ]____________________");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= 1 && AdminDuty[i] == 1)
{
if(PlayerInfo[i][pAdmin] == 1) format(string, 256, "Nome do Admin Nivel 1: [%s] - Nivel: %d.", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
else if(PlayerInfo[i][pAdmin] == 2) format(string, 256, "Nome do Admin Nivel 2: [%s] - Nivel: %d.", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
else if(PlayerInfo[i][pAdmin] == 3) format(string, 256, "Nome do Admin Nivel 3: [%s] - Nivel: %d.", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
else if(PlayerInfo[i][pAdmin] == 4) format(string, 256, "Nome do Admin Nivel 4: [%s] - Nivel: %d.", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
else if(PlayerInfo[i][pAdmin] == 5) format(string, 256, "Nome do Admin Nivel 5: [%s] - Nivel: %d.", GetPlayerNameEx(i),PlayerInfo[i][pAdmin]);
SendClientMessage(playerid, COLOR_WHITE, string);
AdminsOnline = true;
}
}
}
if(!AdminsOnline)
{
SendClientMessage(playerid,COLOR_WHITE,"[INFO:] Nгo hб administrador em serviзo.");
}
SendClientMessage(playerid, COLOR_GREEN, "___________________________________________________________________");
}
return 1;
}