21.08.2016, 16:18
I tested it out and it turns out this gets called:
I don't think it's ever supposed to have a positive amount.
So this would kind of fix it:
But if there's a situation where the amount is supposed to be positive, then this would cause problems.
Код:
OnPlayerTakeDamage(0, 65535, 1.692099, 54, 3)
So this would kind of fix it:
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
if (amount > 0.0)
{
new Float: hp;
GetPlayerHealth(playerid, hp);
SetPlayerHealth(playerid, hp - amount);
}
return 1;
}

