OnPlayerTakeDamage doesn't register - 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 doesn't register (
/showthread.php?tid=615632)
OnPlayerTakeDamage doesn't register -
LennyBE - 25.08.2016
Hi!
I got this small problem where OnPlayerTakeDamage doesn't register when a player shoots another player.
It gets called with melees, when somebody hits somebody with a gun, but not when somebody shoots another player.
On the other player's screen it looks as if no bullets are coming out the gun, and bullets don't do any damage at all.
However OnPlayerGiveDamage does work.
Any ideas?
Re: OnPlayerTakeDamage doesn't register -
Threshold - 25.08.2016
Are you returning 0 anywhere in your OnPlayerWeaponShot callback? Check all filterscripts too if you have any.
Re: OnPlayerTakeDamage doesn't register -
Shinja - 25.08.2016
Do you have many lines under OnPlayerUpdate
Re: OnPlayerTakeDamage doesn't register -
LennyBE - 25.08.2016
I have about 50 lines under OnPlayerUpdate, 30 of which are commented out.
I deleted one include that returned 0 conditionally under OnPlayerShootWeapon, I'll check if that fixed it.
Re: OnPlayerTakeDamage doesn't register -
DeeadPool - 25.08.2016
Show your codes.