Team choise
#2

You can check if a team is uneven using this operator %
If(GetPlayerCount(teamid) % 2 != 0 )
This way you can solve this problem.


You need some function to get the amount of players inside of a team. Like that
Код:
stock GetTeamPlayerCount(teamid) { new playercount = 0; for(new i = 0; i < MAX_PLAYERS; i++) { if(!PlayerInfo[i][pSpawned]) continue; if(!gPlayerHasTeamSelected[i]) continue; if(GetPlayerState(i) == PLAYER_STATE_NONE) continue; if(gPlayerTeamSelection[i] != teamid) continue; playercount++; } return playercount; }
Reply


Messages In This Thread
Team choise - by Matyaas - 28.01.2019, 04:46
Re: Team choise - by faxxe - 28.01.2019, 06:51
Re: Team choise - by Matyaas - 28.01.2019, 17:07

Forum Jump:


Users browsing this thread: 1 Guest(s)