18.02.2013, 11:43
lol sorry, i failed...
pawn Код:
new IsPlayerAFK[20];
CMD:afklist(playerid)
{
static count, string[41];count = 0;
for(new xx, ii = GetMaxPlayers(); xx != ii; xx++)
{
if(!IsPlayerConnected(xx) || !IsPlayerAFK[xx]) continue;
count ++;
}
if(count == 0) return SendClientMessage(playerid, COLOR_GRAD2, "ERROR : No One is AFK Now !");
format(string, 39, "List AFK - There Are %02i AFK Players", count);
SendClientMessage(playerid, COLOR_WHITE, string);
for(new xx, ii = GetMaxPlayers(); xx != ii; xx++)
{
if(!IsPlayerConnected(xx) || !IsPlayerAFK[xx]) continue;
format(string, 41, "- %s (%d) is AFK", PlayerName(xx), xx);
SendClientMessage(playerid, COLOR_GREEN, string);
}
return 0x01;
}