Enforce server-side jetpack state#4595
Open
DmitriyColeman wants to merge 13 commits intomultitheftauto:masterfrom
Open
Enforce server-side jetpack state#4595DmitriyColeman wants to merge 13 commits intomultitheftauto:masterfrom
DmitriyColeman wants to merge 13 commits intomultitheftauto:masterfrom
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
Member
|
Okay, you’re actually right. There’s no way for a player to have a jetpack on the client side. |
Nico8345
suggested changes
Jan 16, 2026
Co-authored-by: Nico <122193236+Nico8345@users.noreply.github.com>
Co-authored-by: Nico <122193236+Nico8345@users.noreply.github.com>
Co-authored-by: Nico <122193236+Nico8345@users.noreply.github.com>
Co-authored-by: Nico <122193236+Nico8345@users.noreply.github.com>
Co-authored-by: Nico <122193236+Nico8345@users.noreply.github.com>
Co-authored-by: Nico <122193236+Nico8345@users.noreply.github.com>
FileEX
approved these changes
Jan 17, 2026
qaisjp
requested changes
Jan 19, 2026
Member
qaisjp
left a comment
There was a problem hiding this comment.
great suggestion. some questions
Comment on lines
+4323
to
+4326
| // Remove jetpack if he has one | ||
| if (pPed->IsPlayer() && pPed->HasJetPack()) | ||
| pPed->SetHasJetPack(false); | ||
|
|
Member
There was a problem hiding this comment.
Why do we need this change? Is this because we need to account for all the scenarios where the client automatically unsets the jetpack state?
| pPlayer->SetHealth(0.0f); | ||
| pPlayer->SetArmor(0.0f); | ||
| pPlayer->SetPosition(Packet.m_vecPosition); | ||
| pPlayer->SetHasJetPack(false); |
Comment on lines
+3367
to
+3370
| // Remove jetpack from him | ||
| if (pPed->IsPlayer() && pPed->HasJetPack()) | ||
| pPed->SetHasJetPack(false); | ||
|
|
Contributor
Author
There was a problem hiding this comment.
Yes, I’m working on it. I think I’ll find time for it over the weekend.
|
|
||
| pSourcePlayer->SetInWater(flags.data.bIsInWater); | ||
| pSourcePlayer->SetOnGround(flags.data.bIsOnGround); | ||
| pSourcePlayer->SetHasJetPack(flags.data.bHasJetPack); |
Member
There was a problem hiding this comment.
Is this the specific important change for ignoring the client's opinion on the jetpack state?
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.
On most MTA servers, a jetpack can only be granted by an moderator or administrator. Allowing clients to spoof a jetpack state can mislead players into thinking the cheater is a member of the administration or development team, which could later be exploited for scamming.
This PR forces the server-side jetpack state when synchronizing players. There is no legitimate way to grant a jetpack on the client side, so relying on client-provided jetpack data is inherently suspicious and should not be used.