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: