Speed hack giving fake data about players speed
#1

In this video a guy shows his cheat sending fake speed info (he is going like 500 KM/h while server receives 150).
Does anybody know how to detect this with PAWNO (I wanna make it, not just install other anticheats)

https://youtu.be/699ChLvGgHA
Reply
#2

Maybe what you could do is check the player's position at two very close times (definition of speed) and compare it with what it should be normally. Like get the top speed of an infernus, the distance travalled within 1s or 0.5s and compare it with what the player has travalled during the same amount of time.
Reply
#3

Server receives 500 km/h, you can't edit how values are readed by the server as they are server sided. (Example: a server side money system).

However that's an old (and not working anymore) LUA script, which the release of 0.3.7 R2 broke almost all this garbage making them incompatible with the current Sa-Mp version (R4).

I had that cheat somewhere months ago in my pc and i tried it too, as i remember even if you set 150 km/h as a speed cap, the server will always receive the real speed. (Tested months ago).

Probably their anti speed hack is garbage that's why it doesn't get triggered.

Btw, if someone has a compatible R4 version, we can try to debug it and see what it prints.
Reply
#4

You can check with Pawn.Raknet.
Reply
#5

Well you could just compare distance what is travaled with 1 second, when distance is too big, just ban player.
Vehicle speed checking can be avoided when hack teleports vehicle very fast forward, vehicle velocity doesn't change then.

example of vehicle anticheat
PHP Code:
// easy timer creation
#include <YSI_Coding\y_timers>
// definitons
#define MAX_WARNINGS            3
#define MAX_VEHICLE_DISTANCE    60.0
enum eAnticheat{
    
Float:LastPos[4],
    
LastWarning,
    
WarningCount
};
new 
Anticheat[MAX_PLAYERS][eAnticheat];
public 
OnPlayerConnect(playerid){
    
Anticheat[playerid][WarningCount] = 0;
    return 
1;
}
Float:GetDistance(Float:xFloat:yFloat:zFloat:x2Float:y2Float:z2){
    return 
VectorSize(x2y2z2);
}
ptask CheckPlayerMovement[1000](pid){
    if(
GetPlayerState(pid) == PLAYER_STATE_DRIVER && Anticheat[pid][WarningCount] != MAX_WARNINGS){
        
// get vehicle current position
        
new Float:xFloat:yFloat:z;
        
GetVehiclePos(GetPlayerVehicleID(pid), xyz);
        
// checks traveled distance
        
new Float:dis GetDistance(xyzAnticheat[pid][LastPos][0], Anticheat[pid][LastPos][1], Anticheat[pid][LastPos][2]);
        if(
dis MAX_VEHICLE_DISTANCE){
            
// warning counter, because of many false-positives
            
new time gettime();
            if(
time Anticheat[pid][LastWarning] > 10){
                
Anticheat[pid][WarningCount] = 0;
            }
            
Anticheat[pid][WarningCount] += 1;
            
Anticheat[pid][LastWarning] = time;
            if(
Anticheat[pid][WarningCount] == MAX_WARNINGS){
                
DisablePlayerAccount(pid"Vehicle teleport/speed hacking!");
            }
        }
        
// saves current position
        
Anticheat[pid][LastPos][0] = x;
        
Anticheat[pid][LastPos][1] = y
        
Anticheat[pid][LastPos][2] = z;
    }
    return 
1;
}
DisablePlayerAccount(pid, const msg[]){
    
/// ...
    
return 1;

Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)