24.07.2016, 22:09
Quote:
I know his English isn't that easy to understand, but when your native language is English and you've been on this forum for years you start to understand this nonsense.
He doesn't want the balancing to random. He says "random" a lot, but that's not what he means. He also doesn't want to repeat the team ordering process over and over. |
What I posted should select random humans and random zombies, following:
if TotalCount == 2 then randomize 1 zombie
if TotalCount == 3 then randomize 1 zombie
if TotalCount == 4 then randomize 2 zombies
if TotalCount == 5 then randomize 2 zombies
if TotalCount == 6 then randomize 3 zombies
if TotalCount == 7 then randomize 3 zombies
if TotalCount == 8 then randomize 4 zombies
Without the possibility of selecting the same player again:
pawn Код:
selected = random(count);
pTeam[gPlayerIDs[selected]] = TEAM_ZOMBIE;
gPlayerIDs[selected] = gPlayerIDs[count - 1];
count --;
-------------------------------------------------------------------------------------
Regardless of what he actually wants, that is my interpretation of what I understood and the best way I saw fit. The code should only be ran once, and to an extent, he should use what you posted if any new players join after the teams have been sorted out.