26.05.2016, 12:01
Try this
PHP Code:
CMD:admins(playerid,params[])
{
#pragma unused params
new Count = 0;
new n[MAX_PLAYER_NAME];
new string[1000];
// SendClientMessage(playerid, 0x00FF00FF, "__________|Admins|__________");
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(i)) continue;
if(PlayerInfo[i][Level] < 1) continue;
Count++;
}
SendClientMessage(playerid, green, "___________|- Online Admins -|___________");
if(Count != 0)
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if (PlayerInfo[i][Level] >= 1)
{
GetPlayerName(i,n,sizeof(n));
format(string, 1000, "%sLevel %d: {FF9900}%s {FFFF00}(ID: %d) - %s\n", string, PlayerInfo[i][Level], n, i, GetRankFromLevel(i));
SendClientMessage(playerid, red, string);
}
}
}
}
else SendClientMessage(playerid, red, "No admin online in the list");
SendClientMessage(playerid, green, "_________________________________________");
return 1;
}