SA-MP Forums Archive
help - 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 (/showthread.php?tid=586108)



help - Mariciuc223 - 19.08.2015

How can i made a script who kill player (even he have max health) with a single shot - sniper ?


Re : help - Dutheil - 19.08.2015

You can use OnPlayerTakeDamage to detect when a player loses life or OnPlayerWeaponShot (better) and use the parameters hittype and hitid to get the ID of the player who was shot.

To kill the player, use SetPlayerHealth with the value 0.0.