PDA

View Full Version : Fire dead


StR_MaRy
12/10/2016, 03:05 AM
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 ?

Kaliber
12/10/2016, 03:09 AM
Yes, you can check that:

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;
}

StR_MaRy
12/10/2016, 03:20 AM
thx man , you saved me +1 rep