SA-MP Forums Archive
Teleport 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: Teleport Hack (/showthread.php?tid=656484)



Teleport Hack - Xportaler - 17.07.2018

Can someone give me an idea how to detect teleport hack.. in foot and in vehicle? i was thinking with get distance beetwen points but i need some explain more detailed
Thanks


Re: Teleport Hack - NaS - 17.07.2018

You'll need to check the distance travelled in X time, that's basically the core idea. Also it's very important to respect server-side teleports, or client-side teleports (interior enter/exits, tuning garages, bugs, dying/spawning, lag, falling through the map, extreme vehicle speeds (eg for freeroam servers with boost function), etc).

It's quite a lot to do and prone for false detections if not done right.

For a start I would disable all default interior enter exits and replace them with a server-sided system to have full control over it.
Then hook SetPlayer/VehiclePos and update the last checked position with the target position, so that the server knows it is a legit teleport. Also add a delay to give the client some time to send the updated positions after a teleport (a few seconds for example).

I would also refrain from instant bans/kicks, but rather work with warnings and admin notifications so that players dont get banned for nothing in case it's not working 100% accurately.

I'm not sure if it is still up-to-date but it's certainly well done and you can take a look to get an idea of how it should work:
https://github.com/PatrickGTR/OnPlayerTeleport

It lacks a few things, like actual checks if an interior teleport is valid, or vehicle speeds, surfing etc.