i want to know how I can respawn the players instead of dying when falling off the map but so that they still die if killed buy zombies?? when they respawn from falling off the map they still have all their perks guns an everything
i want to know how I can respawn the players instead of dying when falling off the map but so that they still die if killed buy zombies?? when they respawn from falling off the map they still have all their perks guns an everything
So you only want to put the player back into the map after he fell down? If so you could use this code.
Code Snippet
Plaintext
back_to_map() { fall_down_trig = getEnt ("fall_down_trig","targetname"); fall_down_spawn = getStruct ("fall_down_spawn","targetname"); while(1) { fall_down_trig waittill("trigger", who); if(IsPlayer( who )) { who DontInterpolate(); who SetOrigin( fall_down_spawn.origin ); } } }
Just call this somewhere:
Code Snippet
Plaintext
thread back_to_map();
In radiant you have to create a trigger multiple with the targetname "fall_down_trig" and a scriptstruct with the targetname "fall_down_spawn" where you would like to "respawn" the player.
So you only want to put the player back into the map after he fell down? If so you could use this code.
Code Snippet
Plaintext
back_to_map() { fall_down_trig = getEnt ("fall_down_trig","targetname"); fall_down_spawn = getStruct ("fall_down_spawn","targetname"); while(1) { fall_down_trig waittill("trigger", who); if(IsPlayer( who )) { who DontInterpolate(); who SetOrigin( fall_down_spawn.origin ); } } }
Just call this somewhere:
Code Snippet
Plaintext
thread back_to_map();
In radiant you have to create a trigger multiple with the targetname "fall_down_trig" and a scriptstruct with the targetname "fall_down_spawn" where you would like to "respawn" the player.
thanks man il try this can u hmu in pm as I need some help
So you only want to put the player back into the map after he fell down? If so you could use this code.
Code Snippet
Plaintext
back_to_map() { fall_down_trig = getEnt ("fall_down_trig","targetname"); fall_down_spawn = getStruct ("fall_down_spawn","targetname"); while(1) { fall_down_trig waittill("trigger", who); if(IsPlayer( who )) { who DontInterpolate(); who SetOrigin( fall_down_spawn.origin ); } } }
Just call this somewhere:
Code Snippet
Plaintext
thread back_to_map();
In radiant you have to create a trigger multiple with the targetname "fall_down_trig" and a scriptstruct with the targetname "fall_down_spawn" where you would like to "respawn" the player.
hi for some reason this doesn't work in game... I called the thread back to map under post_load in Mapname gsc and the function at bottom of map name gsc but to no avail?? anything wrong with it