SA-MP Forums Archive
death message - 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: death message (/showthread.php?tid=661817)



death message - N3mesiS - 15.12.2018

Hi. How do I check if a player died in an accident, in an explosion or simply if he was killed?


Re: death message - MEW273 - 15.12.2018

The OnPlayerDeath callback provides the reason for a player death, see the below wiki pages:

https://sampwiki.blast.hk/wiki/OnPlayerDeath
List of death reasons:
https://sampwiki.blast.hk/wiki/Weapons

Near the bottom of the list you'll see that explosion is ID 51 which you could check for during OnPlayerDeath.