SA-MP Forums Archive
How can I detect - 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: How can I detect (/showthread.php?tid=662146)



How can I detect - ShadowMortar - 24.12.2018

How can I detect if player was shot in head two times to set his hp to 0. I need example for my script and my death system.


Re: How can I detect - RogueDrifter - 24.12.2018

Try OnPlayerTakeDamage and OnPlayerGiveDamage callbacks, both of them have a 'bodypart' param that you can check for headshots and then just use SetPlayerHealth to 0.