Low Health Increasing from Bike Falling -
IstuntmanI - 21.08.2016
Recently I made an anticheat for health, it detects players with health increased. Sometimes it detected players with small health which had a new health of 5.00. Today I found the cause (I think it is the only cause):
When you have the health smaller than 5 and you fall from a bike or it is stolen from you your new health will be automatically increased to 5.
It should be disabled by default.
Re: Low Health Increasing from Bike Falling -
Stinged - 21.08.2016
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.
Re: Low Health Increasing from Bike Falling -
IstuntmanI - 21.08.2016
Quote:
Originally Posted by Stinged
<>
|
Amount is always positive.
It's not a big problem, it's just a small thing that should be disabled by default. Don't come with workarounds please, it's not hard to solve it where needed.
Re: Low Health Increasing from Bike Falling -
Marricio - 22.08.2016
Quote:
Originally Posted by IstuntmanI
Amount is always positive.
It's not a big problem, it's just a small thing that should be disabled by default. Don't come with workarounds please, it's not hard to solve it where needed.
|
Ha! How long have you been here?
If it can be worked around and it's not even a critical problem, why Kalcor should even bother to fix it?
Re: Low Health Increasing from Bike Falling -
IstuntmanI - 22.08.2016
Quote:
Originally Posted by Marricio
Ha! How long have you been here?
If it can be worked around and it's not even a critical problem, why Kalcor should even bother to fix it?
|
Registered Date: 2009. Stop being an as**ole.
It's still a problem which could be fixed. This board is called "Bug Reports". I know they aren't fixing sh*t.
Re: Low Health Increasing from Bike Falling -
Marricio - 22.08.2016
Quote:
Originally Posted by IstuntmanI
Registered Date: 2009. Stop being an as**ole.
It's still a problem which could be fixed. This board is called "Bug Reports". I know they aren't fixing sh*t.
|
Stinged offered you a workaround and you despised it by simply saying "don't come with workarounds, please". You asked for it.
Indeed, they don't actually fix it and if they do it takes a long time considering the intervals between the SA-MP updates. That's exactly why we "come with workarounds"!