Fire dead
#1

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 ?
Reply
#2

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;

Reply
#3

thx man , you saved me +1 rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)