04.04.2009, 19:30
Код:
if(strcmp(cmd, "/leaders", true) == 0) { SendClientMessage(playerid,COLOR_GRAY, "Leaders Online"); new LeadersOnline; for(new i; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][pLeader])// w/e defines them as a leader, this is an example { new LeaderName[MAX_PLAYER_NAME]; GetPlayerName(i, LeaderName, sizeof(LeaderName)); format(string, sizeof(string), "* Leader: %s", LeaderName); SendClientMessage(playerid, COLOR_YELLOW, string); LeadersOnline++; return 1; } } } if(LeadersOnline == 0) { SendClientMessage(playerid, COLOR_YELLOW, "* None"); } return 1; }