New params in OnPlayerTeleport and code improvments#4
Open
Walter-Correa wants to merge 23 commits intoPatrickGTR:masterfrom
Open
New params in OnPlayerTeleport and code improvments#4Walter-Correa wants to merge 23 commits intoPatrickGTR:masterfrom
Walter-Correa wants to merge 23 commits intoPatrickGTR:masterfrom
Conversation
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.
Update OnPlayerTeleport.inc
- 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.
- Removed YSI dependencies for those who do not want to use.
Open
- 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
- Improvments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.