Posts: 3,704
Threads: 147
Joined: Jan 2011
Reputation:
119
09-11-2013, 20:00
(This post was last modified: 09-11-2013, 20:01 by Nekochan.)
Firstly, make foreach in players.count. Then check if player is alive and his/her ping is fine. Then just move all players to spectators by making 'client.team = team.spect; playersuicide;', and just choose player from 'players.size' in foreach. And spawn them to different teams?
And if 'choosen' player dies ( check by loop, hp, whatever ), make the second stage again.
Maybe someone will post code now.
C++/Obj-Cdeveloper. Neko engine wip
Steam: Click
Posts: 1,741
Threads: 93
Joined: Mar 2012
Reputation:
26
Isn't it something like randomInt level.players.size?
Do not take life too seriously. You will never get out of it alive.