Quote:
|
Originally Posted by yezizhu
pawn Код:
public OnPlayerRequestSpawn(playerid) { new tcount[2]; for(new i, m = GetMaxPlayers(); i < m; i++) if(IsPlayerConnected(i)) tcount[gTeam[i]]++; // <<<=================== THE ERROR LINE if(tcount[gTeam[playerid]] > tcount[gTeam[playerid]?0:1]) return SendClientMessage(playerid, RED, "To balance the teams, please select the other team."), 0; return 1; }
Note:Only works with 2 teams
|
Don't work, I got always a message 'To balance the teams, please select the other team.' and it will not spawn