SA-MP Forums Archive
Anti speed hack - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Anti speed hack (/showthread.php?tid=309947)



Anti speed hack - Face9000 - 09.01.2012

Hello,since i'm scripting an antispeedhack,there is a problem.

I set the max velocity for vehicles at 320km/h and for planes,heli 400km/h.

The problem is,when a player falls down from a mountain or a long road,he will sure exceed the 320km/h,how to avoid that?


Re: Anti speed hack - Vince - 09.01.2012

I presume that you could get the player/vehicle's Z velocity first and see if that exceeds a set maximum. You'd have to test a lot to find what the maximum is, though.


Re: Anti speed hack - Lee_Percox - 09.01.2012

Will if your setting them for just in a vehicle, then detect if there in a vehicle or not.

If it's on foot, couldn't in your code before it flags the warning, it just checks if the speed was due to going downwards, instead of forward / backwards?


Re: Anti speed hack - Face9000 - 09.01.2012

Quote:
Originally Posted by Lee_Percox
Посмотреть сообщение
Will if your setting them for just in a vehicle, then detect if there in a vehicle or not.

If it's on foot, couldn't in your code before it flags the warning, it just checks if the speed was due to going downwards, instead of forward / backwards?
The antispeedhack is for vehicles only,so only if player IS in a vehicle and exceeds the max speed.


Re: Anti speed hack - cessil - 09.01.2012

remember that as their z velocity increases their x and y velocity decreases


and also that hitting the side of a mountain while driving off can cause an increase on the x and y velocities, you can detect crashes using OnVehicleDamageStatusUpdate


Re: Anti speed hack - Face9000 - 10.01.2012

Can u explain better please?


Re: Anti speed hack - Mean - 10.01.2012

Instead of actually doing that, why don't you send administrators a message, that a player could possibly be hacking if it exceeds the value? Systems like this can never be 100% accurate, but admins can solve that. AFAIK very few anticheats can be 100% accurate.