SA-MP Forums Archive
More methods to detect cheats / block cleo / whatever - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Server (https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: More methods to detect cheats / block cleo / whatever (/showthread.php?tid=551932)



More methods to detect cheats / block cleo / whatever - Elorreli - 21.12.2014

There's always the saying in SA-MP that all anti-cheats can be scripted, this is surely not the case - not in a long shot.

How would one even begin detecting something like this?

[ame]http://www.youtube.com/watch?v=GNjDVrQYTu8[/ame]


Re: More methods to detect cheats / block cleo / whatever - Uh - 21.12.2014

it is possible like in NGG For an example it detects the "D3d9.dll" but i got no idea how to do it any 1 knows how to do it?


Re: More methods to detect cheats / block cleo / whatever - Sledgehammer - 21.12.2014

Some of these hacks are just teleporting around the map. This can be easily detected by comparing how far the player has moved in a certain amount of seconds.


Re: More methods to detect cheats / block cleo / whatever - Vince - 21.12.2014

I would say comparing their vehicle id in OnPlayerUpdate. The player has to physically enter the car to change its properties. If the old vehicleid is not equal to the new vehicleid and neither of the two is 0 then the player is telejacking. Something like:

pawn Код:
public OnPlayerUpdate(playerid)
{
    static lastVehicle[MAX_PLAYERS] = {INVALID_VEHICLE_ID, ...}; // static so this keeps in memory
    new currentVehicle = GetPlayerVehicleID(playerid);

    if(currentVehicle != lastVehicle[playerid] && currentVehicle != 0 && lastVehicle[playerid] != 0)
    {
        lastVehicle[playerid] = currentVehicle;
        // cheater ?
        return 0;
    }
    return 1;
}
Unsure if it works, would need to be tested.


Re: More methods to detect cheats / block cleo / whatever - Elorreli - 21.12.2014

Quote:
Originally Posted by Vince
Посмотреть сообщение
I would say comparing their vehicle id in OnPlayerUpdate. The player has to physically enter the car to change its properties. If the old vehicleid is not equal to <a href="http://cityadspix.com/tsclick-GQBE4OE0-JHFDQUHP?url=http%3A%2F%2Fogo1.ru%2Fmarket%2Fplans hetyi%2F95449-ASUS-The-new-Padfone-Infinity-32Gb-Titanium-Black&sa=mh&sa1=&sa2=&sa3=&sa4=&sa5=&bt=20&pt=9&lt =2&tl=3&im=OTY1NS0wLTE0MTkxOTQ1MDAtMTg1NTAzMjY%3D& fid=NDQ1NzU2Nzc1&prdct=003b0b3e0d3601390b&kw=the%2 0new" target="_blank" alt="ASUS The New Padfone Infinity 32Gb" title="ASUS The New Padfone Infinity 32Gb" style="">the new</a> vehicleid and neither <a href="http://cityadspix.com/tsclick-MIQCWPUV-GECAQBFF?url=http%3A%2F%2Fwww.sotmarket.ru%2Fprodu ct%2Fpartner-night.html&sa=mh&sa1=&sa2=&sa3=&sa4=&sa5=&bt=20&pt =9&lt=2&tl=3&im=ODI1LTAtMTQxOTE5NDUwMC0xMDI0MzE4NQ %3D%3D&fid=NDQ1NzU2Nzc1&prdct=093d0d390d37033502&k w=of%20the" target="_blank" alt="Partners of the Night" title="Partners of the Night" style="">of the</a> two is 0 then the player is telejacking. Something like:

pawn Код:
public OnPlayerUpdate(playerid)
{
    static lastVehicle[MAX_PLAYERS] = {INVALID_VEHICLE_ID, ...}; // static so this keeps in memory
    new currentVehicle = GetPlayerVehicleID(playerid);

    if(currentVehicle != lastVehicle[playerid] && currentVehicle != 0 && lastVehicle[playerid] != 0)
    {
        lastVehicle[playerid] = currentVehicle;
        // cheater ?
        return 0;
    }
    return 1;
}
Unsure if it works, would need to be tested.
I have something similar but it doesn't seem to work on specific CLEOs, he seems to be too quick for OnPlayerUpdate to register.


Re: More methods to detect cheats / block cleo / whatever - Write - 21.12.2014

Use a global timer with foreach OnPlayerUpdate registers every what.. 20-30 ms? So you go lower.