Author Topic: undieable player?  (Read 348 times)

Is it possible to make a player that can't die (not even by killing himself with ctrl+k)?
If yes, please tell me

This has the datablock also.  If you already have one, just replace PlayerNoKill with it's name and don't use the datablock in this one.

Code: [Select]
datablock PlayerData(PlayerNoKill : PlayerStandardArmor)
{


uiName = "No-Kill Player";

};

function PlayerNoKill::kill(%this)
{
        return;
}

function serverCmdSelf Delete(%c)
{
        if(isObject(%c.player))
        {
                if(%c.player.getDatablock().getID() == playerNoKill.getID())
                {
                        return; //No Self Delete.
                }
        }
        parent::serverCmdSelf Delete(%c);
}

Also, this player can be shot and hurt, but shouldn't die.
« Last Edit: June 16, 2009, 01:29:03 PM by Azimuth »