Health Hacks detection
#1

Well hello guys. I was just wondering is there a way to detect health hacks? Serverside or soemthing. Its easy to store players health at a variable but how will its gonna be reduced when the player got shooted or something?
Reply
#2

Making the health completely serversided isnt an easy thing. It is possible, but always susceptible to bugs, as you cant detect if a player shoots another player 100% safe, and if your script says you hit him, but GTA says you missed, you will detect him as a hacker falsely. There are also things like fall damage, getting hit by a car, etc that are hard or imposssible to detect accurately.
The most common ways to detect health hackers are:
Reducing a players health by one from time to time, wait a second, and check if it was reset to the old value.

Using OnPlayerUpdate to see when a player's health increases only. This way is more difficult, as you have to consider all things that can increase the health (vending machines, wanted SetPlayerHealth, ...) and filter these, so you can be sure a player hacked when his health increased without any reason. This way you can at least ignore detecting when the health decreases.
Reply
#3

Quote:
Originally Posted by Mauzen
Посмотреть сообщение
Making the health completely serversided isnt an easy thing. It is possible, but always susceptible to bugs, as you cant detect if a player shoots another player 100% safe, and if your script says you hit him, but GTA says you missed, you will detect him as a hacker falsely. There are also things like fall damage, getting hit by a car, etc that are hard or imposssible to detect accurately.
The most common ways to detect health hackers are:
Reducing a players health by one from time to time, wait a second, and check if it was reset to the old value.

Using OnPlayerUpdate to see when a player's health increases only. This way is more difficult, as you have to consider all things that can increase the health (vending machines, wanted SetPlayerHealth, ...) and filter these, so you can be sure a player hacked when his health increased without any reason. This way you can at least ignore detecting when the health decreases.
Both those methods are old, and will not be detected by most new cheat engines.
Reply
#4

Armor cheats are easier to detect as the only place you can get armor from, in an empty server is Ammunation. Block the ammunation, make your own armor function and check if the player has more armor than what you last gave them. Health cheats are really hard to detect, because SA-MP doesn't sync the client side SCM scripts (stunt bonus, candy machines, casinos, etc).
Reply
#5

Thanky ou all guys. I already made a custom armour hack detectios that works perfect. I thought of a way to detect health hacks. By seting players health to 99.0 maximum so if the players reach 100 means he hacks. With some work i think its gonna work good
Reply
#6

Quote:
Originally Posted by tour15
Посмотреть сообщение
Thanky ou all guys. I already made a custom armour hack detectios that works perfect. I thought of a way to detect health hacks. By seting players health to 99.0 maximum so if the players reach 100 means he hacks. With some work i think its gonna work good
Negative. Sprunk machines would just give him 100 health points.
Reply
#7

Ye i had this problem but i disabled the anticheat at sprunk machines coordiates and used
pawn Код:
public OnPlayerUpdate(playerid)
{
    if( IsPlayerNearSprunkMachine(playerid ) )
    {
           new Float:fHealth;
           GetPlayerHealth(playerid, fHealth);
           if ( fHealth >= 100 )
           {
                 SetPlayerHealth(playerid, 99.0 );
                  return 1;
           }
     }
Reply
#8

Quote:
Originally Posted by tour15
Посмотреть сообщение
Ye i had this problem but i disabled the anticheat at sprunk machines coordiates and used
pawn Код:
public OnPlayerUpdate(playerid)
{
    if( IsPlayerNearSprunkMachine(playerid ) )
    {
           new Float:fHealth;
           GetPlayerHealth(playerid, fHealth);
           if ( fHealth >= 100 )
           {
                 SetPlayerHealth(playerid, 99.0 );
                  return 1;
           }
     }
This way who is near the machine will have your life set to 99.

He doesn't want this.

PHP код:
public IsAtSprunk(playerid)
{
    if(
IsPlayerInRangeOfPoint(playerid2, -2420.219984.57844.297)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid22522.90063477,-1676.26159668,15.50074005)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid22095.81884766,-1152.15747070,26.57176781)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid21868.72546387,-2004.01831055,13.64391136)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid22794.65478516,-1626.48095703,10.90424728)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid22550.91748047,-960.45068359,82.56876373)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid21066.86608887,-345.73233032,74.08922577)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2670.88018799,-1275.47229004,13.73050690)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2613.35998535,-612.06079102,17.32359886)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2, -2420.180985.94544.297)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid22225.203, -1153.4221025.906)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid22576.703, -1284.4301061.094)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid22155.9061606.7731000.055)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid22209.9061607.1951000.055)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid22222.2031606.7731000.055)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2495.969, -24.3201000.734)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2501.828, -1.4301000.734)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2373.828, -178.1411000.734)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2330.680178.5001020.070)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2331.922178.5001020.070)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2350.906206.0861008.477)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2361.563158.6171008.477)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2371.594178.4531020.070)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2374.891188.9771008.477)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid22155.8441607.8751000.063)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid22202.4531617.0081000.063)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid22209.2421621.2111000.063)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid22222.3671602.6411000.063)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2500.563, -1.3671000.734)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2379.039, -178.8831000.734)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid22480.86,-1959.27,12.9609)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid21634.11,-2237.53,12.8906)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid22139.52,-1161.48,23.3594)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid22153.23,-1016.15,62.2344)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2, -1350.12,493.859,10.5859)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2, -2229.19,286.414,34.7031)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid21659.46,1722.86,10.2188)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid22647.7,1129.66,10.2188)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid22845.73,1295.05,10.7891)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid21398.84,2222.61,10.4219)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2, -1455.12,2591.66,55.2344)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2, -76.0312,1227.99,19.125)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2662.43,-552.164,15.7109)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2, -253.742,2599.76,62.2422)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid22271.73,-76.4609,25.9609)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid21789.21,-1369.27,15.1641)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid21729.79,-1943.05,12.9453)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid22060.12,-1897.64,12.9297)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid21928.73,-1772.45,12.9453)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid22325.98,-1645.13,14.2109)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid22352.18,-1357.16,23.7734)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid21154.73,-1460.89,15.1562)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2, -1350.12,492.289,10.5859)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2, -2118.97,-423.648,34.7266)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2, -2118.62,-422.414,34.7266)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2, -2097.27,-398.336,34.7266)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2, -2092.09,-490.055,34.7266)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2, -2063.27,-490.055,34.7266)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2, -2005.65,-490.055,34.7266)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2, -2034.46,-490.055,34.7266)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2, -2068.56,-398.336,34.7266)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2, -2039.85,-398.336,34.7266)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2, -2011.14,-398.336,34.7266)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2, -1980.79,142.664,27.0703)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid22319.99,2532.85,10.2188)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid21520.15,1055.27,10.00)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid22503.14,1243.7,10.2188)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid22085.77,2071.36,10.4531)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2, -862.828,1536.61,21.9844)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2, -14.7031,1175.36,18.9531)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2, -253.742,2597.95,62.2422)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid2201.016,-107.617,0.898438)) return 1;
    else if(
IsPlayerInRangeOfPoint(playerid21277.84,372.516,18.9531)) return 1;
    else return 
0;

Reply
#9

Its not just the code is a part of it dude. Works perfect without any detection problems
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)