GSC Unlimited S&D Lives

Jack

Modder
Messages
80
Reaction score
23
Points
218
So recently I was looking for a unlimited S&D live gsc code and I couldn't find anything besides some code that wouldn't work in a function only if it was called in the init. Then I remembered about the revive players code and decided to make it into a loop so that it would automatically revive the player/s when they die. It works for all game modes since it isn't set to just S&D but I haven't seen any public Unlimited Live codes so I thought I would post mine.​
Code:
func_UnlimitedLives()
{
foreach(player in level.players)
{
    if(player.UnlimitedLives==0)
    {
        player.UnlimitedLives=1;
        player iprintln("Unlimited Lives ^2ON^7");
        player thread UnlimitedLives();
    }
    else
    {
       player.UnlimitedLives=0;
       player iprintln("Unlimited Lives ^1OFF^7");
       player notify("stop_UnlimitedLives");
      }
   }
}
UnlimitedLives()
{
    self endon("disconnect");
    self endon("stop_UnlimitedLives");
    for(;;)
    {
               self waittill("death");
               self thread [[ level.spawnplayer ]]();
               }
}
 
Last edited by a moderator:

BullyWiiPlaza

Modder
Messages
214
Reaction score
174
Points
818
Lol, how come this unlimited lives thing is so mysterious and everyone is like crazy about keeping it secret? It's as simple as it gets.

Unlimited Lives ON:
Code:
registerNumLives(0, 0);

Unlimited Lives OFF:
Code:
registerNumLives(0, 99999999);
 

The Dark Side

Former Staff Member
Messages
1,007
Reaction score
784
Points
993
Lol, how come this unlimited lives thing is so mysterious and everyone is like crazy about keeping it secret? It's as simple as it gets.

Unlimited Lives ON:
Code:
registerNumLives(0, 0);

Unlimited Lives OFF:
Code:
registerNumLives(0, 99999999);
Its not really mysterious. This code he posted here uses a different method. You can use that for yourself, or specific people at a time. The one you posted is for the whole lobby.
 

Jack

Modder
Messages
80
Reaction score
23
Points
218
Also it may be simple but it wasn't really "public" gsc code I guess you could say. Not many people used it or wanted it so I just decided to make my own because I couldn't find anything else.
 

BullyWiiPlaza

Modder
Messages
214
Reaction score
174
Points
818
Also it may be simple but it wasn't really "public" gsc code I guess you could say. Not many people used it or wanted it so I just decided to make my own because I couldn't find anything else.
True. Since people can't do anything but copy and paste from the Internet this was an obvious development of hype by skids for these seemingly mysterious mods. I guess it's too hard to search through the decompiled GSCs for the keyword
Code:
lives
and examining the results, isn't it :wink:
 

Jack

Modder
Messages
80
Reaction score
23
Points
218
I just didn't think to that's all and thought I was save the trouble and use the revive players code :tonguewink:
 

TheNiceUb3r

Veteran
Messages
45
Reaction score
46
Points
793
Hey man thought I would reply with this as it may help the community out a bit :wink:

Make a TDM Lobby

The if(!isAlive(player)) is needed because you can't turn it on for a dead player so if they are dead this will revive them before the function itself is ran on them

Code:
MakeTDMLobby()
{
foreach(player in level.players)
{
    if(player.UnlimitedLives==0)
    {
        player.UnlimitedLives=1;
        player iprintln("Unlimited Lives ^2ON^7");
        if(!isAlive(player))
        {
        player thread [[ level.spawnplayer ]]();
        }
        player thread UnlimitedLives();
    }
    else
    {
       player.UnlimitedLives=0;
       player iprintln("Unlimited Lives ^1OFF^7");
       player notify("stop_UnlimitedLives");
      }
   }
}

Unlimited Lives Player
Code:
Fun_Unlimited_Lives_Player(player)
{
    if(player.FuLvFp == true)
    {  
        if(!isAlive(player))
        {
        player thread [[ level.spawnplayer ]]();
        }
        player thread UnlimitedLives();
        self iprintln("Unlimited Lives ^2On");
        player.FuLvFp = false;
    }
    else
    {
        player notify("stop_UnlimitedLives");
        self iprintln("Unlimited Lives ^1Off");
        player.FuLvFp = true;
    }
}

Keeps bringing you to life
Code:
Fun_Unlimited_Lives_self()
{
    if(self.FuLvFS == true)
    {    
        if(!isAlive(self))
        {
        self thread [[ level.spawnplayer ]]();
        }
        self thread UnlimitedLives();
        self iprintln("Unlimited Lives ^2On");
        self.FuLvFS = false;
    }
    else
    {
        self notify("stop_UnlimitedLives");
        self iprintln("Unlimited Lives ^1Off");
        self.FuLvFS = true;
    }
}

Keeps Your Team Alive
Code:
                  UnlimitedLivesMyteam()
                   {
                   foreach(player in level.players)
                   {
                    if(self.pers["team"] == player.pers["team"])
                    {
                     player thread Fun_Unlimited_Lives_self();
                    }
                   }
                  }

Keeps Enemy Team Alive
Code:
                 UnlimitedLivesMyteamForEnemy()
                   {
                   foreach(player in level.players)
                   {
                    if(self.pers["team"] != player.pers["team"])
                    {
                     player thread Fun_Unlimited_Lives_self();
                    }
                   }
                  }

And last but no least revive yourself once you have actually died already

To do this add this to MenuInit()
Code:
self thread reviveMeThread();

And this actually being the function needed
Code:
reviveMeThread()
{
    self endon("disconnect");
    self endon( "destroyMenu" );//////// CHANGE THIS TO WHAT YOUR MENU USES TO DESTROY MENU
    for(;;)
    {
        if(!isAlive(self))
        {
            if(self jumpButtonPressed() && self useButtonPressed())
            {
                wait 0.1;
                if(self jumpButtonPressed() && self useButtonPressed())
                {  
                    self thread [[ level.spawnplayer ]]();
                }
            }
        }
        wait .06;
    }
}

Then use the unlimited lives code he has up there
Code:
UnlimitedLives()
{
    self endon("disconnect");
    self endon("stop_UnlimitedLives");
    for(;;)
    {
               self waittill("death");
               wait 0.50;
               self iprintln("^2You Have Been Given Another Chance.");
               self thread [[ level.spawnplayer ]]();
               }
}
 

The Dark Side

Former Staff Member
Messages
1,007
Reaction score
784
Points
993
Hey man thought I would reply with this as it may help the community out a bit :wink:

Make a TDM Lobby

The if(!isAlive(player)) is needed because you can't turn it on for a dead player so if they are dead this will revive them before the function itself is ran on them

Code:
MakeTDMLobby()
{
foreach(player in level.players)
{
    if(player.UnlimitedLives==0)
    {
        player.UnlimitedLives=1;
        player iprintln("Unlimited Lives ^2ON^7");
        if(!isAlive(player))
        {
        player thread [[ level.spawnplayer ]]();
        }
        player thread UnlimitedLives();
    }
    else
    {
       player.UnlimitedLives=0;
       player iprintln("Unlimited Lives ^1OFF^7");
       player notify("stop_UnlimitedLives");
      }
   }
}

Unlimited Lives Player
Code:
Fun_Unlimited_Lives_Player(player)
{
    if(player.FuLvFp == true)
    { 
        if(!isAlive(player))
        {
        player thread [[ level.spawnplayer ]]();
        }
        player thread UnlimitedLives();
        self iprintln("Unlimited Lives ^2On");
        player.FuLvFp = false;
    }
    else
    {
        player notify("stop_UnlimitedLives");
        self iprintln("Unlimited Lives ^1Off");
        player.FuLvFp = true;
    }
}

Keeps bringing you to life
Code:
Fun_Unlimited_Lives_self()
{
    if(self.FuLvFS == true)
    {   
        if(!isAlive(self))
        {
        self thread [[ level.spawnplayer ]]();
        }
        self thread UnlimitedLives();
        self iprintln("Unlimited Lives ^2On");
        self.FuLvFS = false;
    }
    else
    {
        self notify("stop_UnlimitedLives");
        self iprintln("Unlimited Lives ^1Off");
        self.FuLvFS = true;
    }
}

Keeps Your Team Alive
Code:
                  UnlimitedLivesMyteam()
                   {
                   foreach(player in level.players)
                   {
                    if(self.pers["team"] == player.pers["team"])
                    {
                     player thread Fun_Unlimited_Lives_self();
                    }
                   }
                  }

Keeps Enemy Team Alive
Code:
                 UnlimitedLivesMyteamForEnemy()
                   {
                   foreach(player in level.players)
                   {
                    if(self.pers["team"] != player.pers["team"])
                    {
                     player thread Fun_Unlimited_Lives_self();
                    }
                   }
                  }

And last but no least revive yourself once you have actually died already

To do this add this to MenuInit()
Code:
self thread reviveMeThread();

And this actually being the function needed
Code:
reviveMeThread()
{
    self endon("disconnect");
    self endon( "destroyMenu" );//////// CHANGE THIS TO WHAT YOUR MENU USES TO DESTROY MENU
    for(;;)
    {
        if(!isAlive(self))
        {
            if(self jumpButtonPressed() && self useButtonPressed())
            {
                wait 0.1;
                if(self jumpButtonPressed() && self useButtonPressed())
                { 
                    self thread [[ level.spawnplayer ]]();
                }
            }
        }
        wait .06;
    }
}

Then use the unlimited lives code he has up there
Code:
UnlimitedLives()
{
    self endon("disconnect");
    self endon("stop_UnlimitedLives");
    for(;;)
    {
               self waittill("death");
               wait 0.50;
               self iprintln("^2You Have Been Given Another Chance.");
               self thread [[ level.spawnplayer ]]();
               }
}
self.pers["lives"] = 99999999;

and
foreach(player in level.players)
{ player.pers["lives"] = 99999999; }

Easily trump all that lol
 

TheNiceUb3r

Veteran
Messages
45
Reaction score
46
Points
793
self.pers["lives"] = 99999999;

and
foreach(player in level.players)
{ player.pers["lives"] = 99999999; }

Easily trump all that lol
I don't see how considering most of that is for different things such as, Per team, Self, All players, Then if your already dead, What you just said is exactly what I have but not unlimited but instead 99999999 lives
 

The Dark Side

Former Staff Member
Messages
1,007
Reaction score
784
Points
993
I don't see how considering most of that is for different things such as, Per team, Self, All players, Then if your already dead, What you just said is exactly what I have but not unlimited but instead 99999999 lives
You can easily adapt those to teams, and those two are for self and all players.

Who the hell is gonna die 99999999 times :tearsofjoy:

EDIT: The revive thread is useful though. :tonguewink:
 
Top