SA-MP Forums Archive
[Help] Killer Health - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Help] Killer Health (/showthread.php?tid=554310)



[Help] Killer Health - Arxalan - 03.01.2015

Hello , i want to know how to increase / decrease the killer health or the one who is shooting the other player.


Re: [Help] Killer Health - Schneider - 03.01.2015

- OnPlayerGiveDamage
- SetPlayerHealth


Re: [Help] Killer Health - ATGOggy - 03.01.2015

You can do it https://sampwiki.blast.hk/wiki/OnPlayerGiveDamage or https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage.

The code to reduce health if you are using it in OnPlayerGiveDamage is:
[php]
public OnPlayerGiveDamage(playerid, blah blah)
{
new Float:health;
GetPlayerHealth(playerid, health);
SetPlayerHealth(playerid, health+amount);
return 1;
}


Re: [Help] Killer Health - Arxalan - 03.01.2015

how to reduce it -20 on each shot?


Re: [Help] Killer Health - Lordzy - 03.01.2015

Quote:
Originally Posted by Arxalan
Посмотреть сообщение
how to reduce it -20 on each shot?
http://forum.sa-mp.com/showpost.php?...postcount=4257
pawn Код:
DamagePlayer(killerid, -20.0);