SA-MP Forums Archive
explosion detection - 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: explosion detection (/showthread.php?tid=504882)



explosion detection - Extraordinariness - 06.04.2014

how do I detect(script) if the player hits by an explosion?


Re: explosion detection - Corekt - 06.04.2014

Under OnPlayerTakeDamage callback, check if weaponid (aka reason for damage) is the explosion reason, which would be 51 for your case.

You can find a list of weapon/damage reason IDs here:
https://sampwiki.blast.hk/wiki/Weapons


Re: explosion detection - Extraordinariness - 06.04.2014

Thanks.

Oh btw it says "error number I forget: function differs from prototype"
and I searched more in wiki and it says, ", bodypart only works for 0.3z.".
but I use 0.3z!


Re: explosion detection - Extraordinariness - 07.04.2014

1 day bump.