SA-MP Forums Archive
OnPlayerTakeDamage - can someone show me an example.. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: OnPlayerTakeDamage - can someone show me an example.. (/showthread.php?tid=369010)



OnPlayerTakeDamage - can someone show me an example.. - Ghost100 - 15.08.2012

To prevent fake kills, i want to use this callback to make sure the player is holding the weapon in his hand...how do i do that?
Do i use OnPlayerGiveDamage or OnPlayerTakeDamage, and how?


If they dont have the weapon, they get kicked..

Ive never used this call back which is why it may seem like a nooby question.

Thanks


Re: OnPlayerTakeDamage - can someone show me an example.. - Markā„¢ - 15.08.2012

https://sampwiki.blast.hk/wiki/OnPlayerTakeDamage
https://sampwiki.blast.hk/wiki/OnPlayerGiveDamage


Re: OnPlayerTakeDamage - can someone show me an example.. - Ghost100 - 15.08.2012

Thanks, but i have already seen that...my question is how can i use this callback to stop fake kills?


Re: OnPlayerTakeDamage - can someone show me an example.. - [MM]IKKE - 15.08.2012

Here's a fairly good tutorial on how you can change weapon damage using the callback
https://sampforum.blast.hk/showthread.php?tid=330005

Here's a thread about fake-killing. I haven't bothered to read it all, but the OP claims you can't use the callback for fake kills
https://sampforum.blast.hk/showthread.php?tid=323835


Re: OnPlayerTakeDamage - can someone show me an example.. - Ghost100 - 15.08.2012

thanks i resd it, but theres no official answer on there..ive tried them too and they dont seem to work..