11.05.2014, 17:55
In the loop you are checking if playerid is connected (stupid, he used command, so for sure he is connected) and you are checking in variable gTeam again playerid team, not the loop player.
Sorry for my english, I am from Poland. It is hard to learn new language :P
Код:
new gTeam[MAX_PLAYERS]; #define TEAM_GROVE 0 CMD:team(playerid, params[]) { new name[MAX_PLAYER_NAME], string[1024]; for(new i; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i) && gTeam[i] == TEAM_GROVE) { GetPlayerName(i, name, sizeof(name)); format(string, sizeof(string), "%s%s\n ", string, name); } } return ShowPlayerDialog(playerid, 9999, DIALOG_STYLE_LIST, "Team online", string, "OK", ""); }