How to make a player invulnerable?
#5

Quote:
Originally Posted by axxelac
Посмотреть сообщение
pawn Код:
onduty[MAX_PLAYERS]; //Top of your script

onduty[playerid] = 1; // On Your CMD

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    if(issuerid != INVALID_PLAYER_ID && onduty[playerid] == 1)
    {
      SetPlayerHealth(playerid, amount);
    }
    return 1;
}
UNTESTED
It wont work with for ex. minigun... Health will be set'd after you die.
Reply


Messages In This Thread
How to make a player invulnerable? - by MarinacMrcina - 22.06.2012, 13:23
Re: How to make a player invulnerable? - by SupremeCommander - 22.06.2012, 13:28
Respuesta: How to make a player invulnerable? - by Chris1337 - 22.06.2012, 13:28
Re: Respuesta: How to make a player invulnerable? - by iggy1 - 22.06.2012, 13:30
Re: Respuesta: How to make a player invulnerable? - by SupremeCommander - 22.06.2012, 13:31
Re: How to make a player invulnerable? - by iggy1 - 22.06.2012, 13:32
Re: How to make a player invulnerable? - by MarinacMrcina - 22.06.2012, 13:40
Respuesta: Re: How to make a player invulnerable? - by Chris1337 - 22.06.2012, 13:42
Re: How to make a player invulnerable? - by leonardo1434 - 22.06.2012, 14:40

Forum Jump:


Users browsing this thread: 1 Guest(s)