03.09.2012, 14:08
I mean something like;
pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
new Float:HP;
GetPlayerHealth(playerid, HP);
// Only continue if the health lost is enough to be a weapon and not a punch
if (amount > 5.0) // 5.0 - Roughly the amount of a punch. May not be correct
{
if(weaponid == 24) // Desert Eagle
{
SetPlayerHealth(playerid, HP-50);
}
}
return 1;
}