OnPlayerGiveDamage - 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: OnPlayerGiveDamage (
/showthread.php?tid=618198)
OnPlayerGiveDamage -
Ahmed21 - 02.10.2016
Hello, so, as I know, OnPlayerGiveDamage is called when "player X" hits another "player Y" in his computer, regardless if player Y was damaged or not.
So my question is, how to check if player Y lost HP when OnPlayerGiveDamage was called, and if he wasn't damaged, take "damage" from his health..
Help please!
Re: OnPlayerGiveDamage -
Gotham - 02.10.2016
U r not sensible!They won't take damage in their computer neither do you see the health bar going down!
Re: OnPlayerGiveDamage -
Ahmed21 - 07.10.2016
I mean: "check if "damagedid" was damaged when OnPlayerGiveDamage was called", because sometimes when you're running, I hit you with my fist, OnPlayerGiveDamage is called because I did hit you but you didn't lose health because in your computer I didn't hit you.