hey guys
i have a problem.
i want in my modd that when someone dies he joins spectator and cant respawn. and the map isn't allowed to end because i have a round vote system.
i tried someways but all failed in some way
first way:
Code:
death()
{
self waittill( "death" );
self thread maps\mp\gametypes\_playerlogic::respawn_asSpectator( self.origin + (0, 0, 60), self.angles );
self.needsToSpawn = false;
self allowSpectateTeam( "freelook", true );
}
problem with this one is you respawn after 3 sec:S and i want people to keep in spectator
second one:
Code:
setDvar( "scr_war_numlives", "1");
the problem with this way is that the game end if a whole team is death but then i want the mapvote to kick in so
third one:
Code:
SpectatorOnDeath()
{
self waittill( "death" );
self notify("menuresponse", game["menu_team"], "spectator");
}
the problem with this one is that people can pres esc and choose a side and respawn...
and i tried to shut down the healt regain but i cant find the right code. i now use this one but it fails:
Code:
setDvar("scr_player_healthregentime", 20);
thanks