SA-MP Forums Archive
OnPlayerGiveDamage or OnPlayerTakeDamage - 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 or OnPlayerTakeDamage (/showthread.php?tid=456781)



OnPlayerGiveDamage or OnPlayerTakeDamage - iJumbo - 07.08.2013

Set the player team to the same and make a server side health system..

wich is better? OnPlayerGiveDamage or OnPlayerTakeDamage?


I know OnPlayerTakeDamage becouse is better trust client

Or i can use them both?


Re: OnPlayerGiveDamage or OnPlayerTakeDamage - Edix - 07.08.2013

TakeDamage


Re: OnPlayerGiveDamage or OnPlayerTakeDamage - GiamPy. - 07.08.2013

OnPlayerGiveDamage reports when the CLIENT deals damage.
OnPlayerTakeDamage reports when the CLIENT takes damage.

The difference is OnPlayerGiveDamage reports when the CLIENT hits the skin, however it doesn't mean that the player's position was the same of the skin because of SA-MP synchronization system.

OnPlayerTakeDamage instead reports when the CLIENT takes damage, just like SA-MP has ever worked.


Re: OnPlayerGiveDamage or OnPlayerTakeDamage - iJumbo - 07.08.2013

I know that .. was just a question for be sure
So i will use OnPlayerTakeDamage