18.02.2013, 11:27
This will be fine i think.
pawn Код:
CMD:afklist(playerid, params[])
{
new Count = 0;
new string[128];
for(new i = 0; i< MAX_PLAYERS; i++)
{
format(string, sizeof(string)), "List AFK - There Are %d AFK Players", Count);
SendClientMessage(playerid, COLOR_WHITE, string);
if(IsPlayerConnected(i) && IsPlayerAFK[i] == 1)
{
format(str, 128, "- %s (%d) is AFK", PlayerName(i), i);
Count++;
}
SendClientMessage(playerid, COLOR_GREEN, str);
}
if(Count == 0)
{
SendClientMessage(playerid, COLOR_GRAD2,"ERROR : No One is AFK Now !");
}
return 1;
}