Fire dead - 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: Fire dead (
/showthread.php?tid=618965)
Fire dead -
StR_MaRy - 12.10.2016
hey guys how can i find if a player die cause of fire or explode ? is even possible? cause i have a sistem , when a player kills you it's says "StR killed you when you where in a job etc..." but if he shot's your vehicle and you die cause the vehicle explode or you burn to death it says "Unknown killed you etc..."
what can i do ?
Re: Fire dead -
Kaliber - 12.10.2016
Yes, you can check that:
PHP код:
public OnPlayerDeath(playerid,killerid,reason)
{
if(killerid == INVALID_PLAYER_ID)
{
switch(reason)
{
case 49: //Died from vehicle (lay under one) for example
case 50: //Helicopter rotors you
case 51: //Explosion killed you
case 52: //You died under water (Drowned)
case 53: //You died from falling
}
}
return 1;
}
Re: Fire dead -
StR_MaRy - 12.10.2016
thx man , you saved me +1 rep