27.11.2012, 12:27
Shouldn't you want to be creating the 2 strings outside the loop? Or it'll be creating the same string every time an admin is detected..
pawn Код:
CMD:admins(playerid, params[])
{
new bool:Count;
new str[45], Admin[MAX_PLAYER_NAME];
for(new i, j = GetMaxPlayers(); i != j; i++)
{
if(PlayerInfo[i][pAdmin] > 0)
{
GetPlayerName(i, Admin, MAX_PLAYER_NAME);
format(str, sizeof(str), "[Admin]'%s - level %d", Admin, PlayerInfo[i][pAdmin]);
SendClientMessage(playerid, lightred, str);
Count = true;
}
}
if(!Count) SendClientMessage(playerid, lightred, "[System]: No Admin Online!");
return 1;
}