SA-MP Forums Archive
Detect explosion or burn - 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: Detect explosion or burn (/showthread.php?tid=632543)



Detect explosion or burn - Jose_grana - 16.04.2017

Can you detect it when it is hurt by fire or an explosion?

+ rep help.


Re: Detect explosion or burn - CJ101 - 16.04.2017

Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
    if(weaponid == 37 && playerid != issuerid) // If flamethrougher
    {
       //do something
    }
    return 1;
}



Re: Detect explosion or burn - GangstaSunny. - 16.04.2017

As far as i know, taking damage from explosions count as "self inflicted" and can not be detected (yet).


Re: Detect explosion or burn - Sebz - 16.04.2017

https://sampforum.blast.hk/showthread.php?tid=490436

Has one for if the player is burning.