SA-MP Forums Archive
OnPlayerTakeDamage callback - 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: OnPlayerTakeDamage callback (/showthread.php?tid=585411)



OnPlayerTakeDamage callback - Denying - 13.08.2015

Hey there,

Simple question, does the callback OnPlayerTakeDamage get called whenver SetPlayerHealth is used to lower a player's health or only upon weapon damage?

Thank you in advance.


EDIT: I just tested it myself and for those who are interested, it does not get called when you lower someone's health using SetPlayerHealth.


Re: OnPlayerTakeDamage callback - ax1 - 13.08.2015

It's called whenever player loses health in server(fall, weapon damage, punch, fire and etc). But no, it isn't called when you use SetPlayerHealth function.


Re: OnPlayerTakeDamage callback - Denying - 13.08.2015

Yeah, as I said in my last edit, I have tested it on my own and figured it out by myself.