Skip to content

New params in OnPlayerTeleport and code improvments#4

Open
Walter-Correa wants to merge 23 commits intoPatrickGTR:masterfrom
Walter-Correa:master
Open

New params in OnPlayerTeleport and code improvments#4
Walter-Correa wants to merge 23 commits intoPatrickGTR:masterfrom
Walter-Correa:master

Conversation

@Walter-Correa
Copy link

Added the parameters of the old position in OnPlayerTeleport for those who want to return the player to the old position that was instead of kicking instantly.

Added the parameters of the old position in OnPlayerTeleport for those who want to return the player to the old position that was instead of kicking instantly.
- Improved the code.

- Added per player AC_Position array.

- Added conditions to save the player's new position and prevent the hacked position from becoming the current position.

- Replaced the GetVehicleSpeed function with the improved Pottus function: https://forum.sa-mp.com/showpost.php?p=2683006&postcount=40

- Removed pds_SetPlayerInterior because it conflicts with pds_SetPlayerPos. Nobody uses SetPlayerInterior without using SetPlayerPos, so we just need pds_SetPlayerPos.

pds_SetPlayerInterior = Save the current position
pds_SetPlayerPos = Save the new position

If I use pds_SetPlayerPos and then pds_SetPlayerInterior I can save the old position as the new one.
- Improved the code.
- Fixed some identation
- Reduced the verification time to 1 second.
- Improved the code
- Added teleport detection over 50 meters(just like on foot) when the vehicle is stopped or at very low speed.
@Walter-Correa Walter-Correa changed the title New params New params in OnPlayerTeleport and code improvments Jul 18, 2020
- Removed YSI dependencies for those who do not want to use.
@Walter-Correa Walter-Correa mentioned this pull request Jul 18, 2020
- Added prevention to detect as teleport hack a player that is parachuting or falling.
- Added GetPointZPos to not save the player's position when it is below any surface.
- Added IsPlayerTeleporting to check if player still in hacked position and how many seconds.
- Improvements to prevent false positives
 - Code improvments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant