SA-MP Forums Archive
How do I detect when a player hits another? - 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 do I detect when a player hits another? (/showthread.php?tid=463940)



How do I detect when a player hits another? - ExtendedCarbon - 14.09.2013

I want to make a system where if a player hits another it will make a ding noise, I know how to make the ding. Just not how to make it recognise when a player hits another.


Re: How do I detect when a player hits another? - Konstantinos - 14.09.2013

When you're saying "hits another", do you mean with fist or any weapon? And the ding noise to be played to the player who hits the player or the one who is being hit by another?


Use OnPlayerTakeDamage callback.


Re : How do I detect when a player hits another? - Matnix - 14.09.2013

https://sampforum.blast.hk/showthread.php?tid=462189 - A simple tutorial, if you understand you know where to put the song.