if( !IsDefined( level.custom_spawnPlayer ) ) { // Custom spawn call for when they respawn from spectator level.custom_spawnPlayer = ::spectator_respawn; }
while( 1 ) { players_alive = 0;
players = get_players(); for( i = 0; i < players.size; i++ ) { if( IsAlive( players[i] )) { players_alive++; }
Then adjust things from there. Most likely players_alive == 1 and it is ending the game after round one because you put it in the spectators_respawn() function that I assume runs after the round ends and respawns the spectators.
With all that aside. Why would you want to do that? And what are your plans for single player games? And do you only want to end if when the round ends only one player is alive or... or if all players go down but one you want to end the game at any time? Or they actually have to die and if all die but one at any time the game ends?
It checks to see if the player isnt downed or spectating and then it counts them as alive. This is for a competitive free for all zombies mod meant only for coop. If there is one player alive and they finish off the round, then they win. (like in Grief mode)
It checks to see if the player isnt downed or spectating and then it counts them as alive. This is for a competitive free for all zombies mod meant only for coop. If there is one player alive and they finish off the round, then they win. (like in Grief mode)
okay but I'm also thinking that you need to add a code in the if() line like about:
because if we playing a game and there total 4 players and when 1 player leave the game and there are 3 players then I think the 4th player is not removed correctly from the game
you can also see it on the hud score that the points not on the correct location are.
If you want scripts / features made for you, then contact me by PM or email / skype etc it will cost you tho so if you have no intention of reciprocating don't even waste my time