Low Health Increasing from Bike Falling
#2

I tested it out and it turns out this gets called:
Код:
OnPlayerTakeDamage(0, 65535, 1.692099, 54, 3)
I don't think it's ever supposed to have a positive amount.
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;
}
But if there's a situation where the amount is supposed to be positive, then this would cause problems.
Reply


Messages In This Thread
Low Health Increasing from Bike Falling - by IstuntmanI - 21.08.2016, 13:52
Re: Low Health Increasing from Bike Falling - by Stinged - 21.08.2016, 16:18
Re: Low Health Increasing from Bike Falling - by IstuntmanI - 21.08.2016, 16:50
Re: Low Health Increasing from Bike Falling - by Marricio - 22.08.2016, 15:28
Re: Low Health Increasing from Bike Falling - by IstuntmanI - 22.08.2016, 15:46
Re: Low Health Increasing from Bike Falling - by Marricio - 22.08.2016, 15:51

Forum Jump:


Users browsing this thread: 2 Guest(s)