CF4_99
Veteran
- Messages
- 145
- Reaction score
- 56
- Points
- 888
Hello everyone, today I am releasing something I have been trying to get working for a while now, and finally got it. It can respawn dead players. this has been tested many times, and can be used as an All Player function or just for one person.
Make sure to use this #include:
#include maps\mp\gametypes_zm\_zm_gametype;
Respawn Individual Player:Make sure to use this #include:
#include maps\mp\gametypes_zm\_zm_gametype;
Code:
respawnThePlayer(player)
{
if(player.sessionstate == "spectator")
{
if(isDefined(player.spectate_hud))
player.spectate_hud destroy();
player [[ level.spawnplayer ]]();
}
}
Respawn All Players:
Code:
RespawnAllPlayers()
{
for(i=0;i<level.players.size;i++)
{
if(level.players[i].sessionstate == "spectator")
{
if(isDefined(level.players[i].spectate_hud))
level.players[i].spectate_hud destroy();
level.players[i] [[ level.spawnplayer ]]();
}
}
}
Credits:
Frinz(Didn't Know It Was Already Released)
Last edited: