Low Health Increasing from Bike Falling
#1

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.
Reply
#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
#3

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.
Reply
#4

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?
Reply
#5

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.
Reply
#6

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"!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)