01.10.2011, 02:17
Код:
COMMAND:afklist(playerid,params[]) { #pragma unused params new count = 0; new string[128]; new IsAfkPlayer[MAX_PLAYER_NAME]; SendClientMessage(playerid, COLOR_GREEN, " "); SendClientMessage(playerid, COLOR_GREEN, "___________ |- Online Admins -| ___________"); SendClientMessage(playerid, COLOR_GREEN, " "); for(new i = 0; i < MAX_PLAYERS; i++) { if (IsPlayerConnected(i)) { if(IsAfk[playerid] == 1) { GetPlayerName(IsAfk[playerid],IsAfkPlayer,sizeof(IsAfkPlayer)); format(string, "AFK: %s",IsAfkPlayer); SendClientMessage(playerid, COLOR_WHITE, string); count++; } } } if (count == 0) SendClientMessage(playerid,COLOR_BRIGHTRED,"No one is AFK here buddy."); SendClientMessage(playerid, COLOR_GREEN, " _______________________________________"); return 1; }
Idk :S