05.12.2012, 04:08
Here's another way to get to it:
Using foreach include.
pawn Код:
CMD:admins(playerid, params[])
{
new string[128], count;
foreach(Player, i)
{
if(PlayerInfo[i][pAdmin] > 0)
{
SendClientMessage(playerid, lightgreen, "----[{B4B5B7}0NLINE ADMIN{9ACD32}]----");
new adminname[MAX_PLAYER_NAME];
GetPlayerName(i, adminname, MAX_PLAYER_NAME);
format(string, sizeof(string), "[Admin]'%s - level %d", adminname, PlayerInfo[i][pAdmin]);
SendClientMessage(playerid, grey, string);
count++;
}
}
if(!count)
{
return SendClientMessage(playerid, lightred, "[System]: No Admin Online!");
}
else
{
return SendClientMessage(playerid, lightgreen, "--------------------------------------");
}
}