Release Respawning Dead Players

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:
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:

CabCon

Head Administrator
Staff member
Head Staff Team
Messages
5,113
Reaction score
2,884
Points
1,103
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:
Code:
respawnThePlayer(player)
{
    if(player isHost())
        self iPrintln("^1ERROR^7: You Can't Modify The Host");
    else
    {
        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 < 18; i++)
    {
        player = level.players[i];
        if ( player.sessionstate == "spectator" )
        {
            if ( isDefined( player.spectate_hud ) )
            {
                player.spectate_hud destroy();
            }
            player [[ level.spawnplayer ]]();
        }
    }
    self iPrintln("All Players ^2Respawned");
}

Credits:
CF4_99
No One Else To Credit!


Quite cool! You could respawn your deas team mates in S&D :smile:
 

Lucifer

Veteran
Messages
770
Reaction score
499
Points
878
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:
Code:
respawnThePlayer(player)
{
    if(player isHost())
        self iPrintln("^1ERROR^7: You Can't Modify The Host");
    else
    {
        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 < 18; i++)
    {
        player = level.players[i];
        if ( player.sessionstate == "spectator" )
        {
            if ( isDefined( player.spectate_hud ) )
            {
                player.spectate_hud destroy();
            }
            player [[ level.spawnplayer ]]();
        }
    }
    self iPrintln("All Players ^2Respawned");
}

Credits:
CF4_99
No One Else To Credit!


You can also make it a bind with it like @dorathekiller97 made in his anarchy menu :smile:
 

Harry

Certified Sick ℂunt
Premium Member
Messages
1,253
Reaction score
942
Points
973
This has been out for ages?
Also, you can bind it to anything but ACTIONSLOT and ADS + ATTACK and SPRINT + KNIFE
 

DF_AUS

Moderator
Staff member
Head Staff Team
Donator
Messages
577
Reaction score
793
Points
878
Quite cool! You could respawn your deas team mates in S&D :grinning:
The "Respawn dead Player" code was released at least 18 months ago by Frinz :smile:

Good job CF4_99 for releasing these codes for Zombies :smile:
 

CF4_99

Veteran
Messages
145
Reaction score
56
Points
888
The "Respawn dead Player" code was released at least 18 months ago by Frinz :grinning:

Good job CF4_99 for releasing these codes for Zombies :grinning:

I didn't know it had already been released or I wouldn't have re-released it :disappointed:
 
Top