-
Spectator if u die
I got a question about
How to set If u die u dont respawn and be spectator?
I use this code but u can press ESC and chose a team so u respawn..
I dont want to use the gametypes SD
onDeath()
{
self endon("disconnect");
self waittill ("death");
self notify("menuresponse", game["menu_team"], "spectator");
self allowSpectateTeam( "allies", true );
self allowSpectateTeam( "axis", true );
self allowSpectateTeam( "none", false );
self allowSpectateTeam( "freelook", false );
}
-
I think you need to set a simple variable here :P
Code:
init()
for(;;)
{
level waittill("round_begin"); //or something
self.newspawn = 1;
}
for(;;)
{
self waittill("spawned_player");
if(self.newspawn != 1)
{
Ondeath();
}
else
{
self.newspawn = 0;
}
}
or something as that
-
Nvm I fixed it already and thanks maarten for trying to help