Skip to content

feat(extra-natives-five): add native to restore a broken vehicle wheel#3933

Open
spacevx wants to merge 2 commits into
citizenfx:masterfrom
spacevx:feat/restore-vehicle-wheel
Open

feat(extra-natives-five): add native to restore a broken vehicle wheel#3933
spacevx wants to merge 2 commits into
citizenfx:masterfrom
spacevx:feat/restore-vehicle-wheel

Conversation

@spacevx
Copy link
Copy Markdown
Contributor

@spacevx spacevx commented Apr 16, 2026

Goal of this PR

Introducing a new native to restore vehicle wheels, with the native BreakOffVehicleWheel we didn't have a way to reattach wheel on the vehicle. Please beaware this native is not synced (compared to BreakOffVehicleWheel who is synced to others players in the onesync range)

How is this PR achieving the goal

Clear the broken-off wheel state, restore the wheel health and reattach its fragment back to the vehicle, without touching other broken parts

This PR applies to the following area(s)

FiveM

Successfully tested on

Game builds: 3258 (still needs to be tested on other gamebuilds)

Platforms: Windows

Checklist

  • Code compiles and has been tested successfully.
  • Code explains itself well and/or is documented.
  • My commit message explains what the changes do and what they are for.
  • No extra compilation warnings are added by these changes.

Fixes issues

https://forum.cfx.re/t/add-native-to-reattach-vehicle-wheels-by-index/5394134
https://forum.cfx.re/t/add-a-fixwheel-native-as-the-counterpart-of-breakoffvehiclewheel/5204684

@github-actions github-actions Bot added the invalid Requires changes before it's considered valid and can be (re)triaged label Apr 16, 2026
@spacevx spacevx changed the title feat(extra-natives-five): new native to RestoreVehicleWheel feat(extra-natives-five): add native to restore a broken vehicle wheel Apr 16, 2026
Copy link
Copy Markdown
Contributor

@AvarianKnight AvarianKnight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should have the note that this isn't networked in the native docs.

Comment thread ext/native-decls/RestoreVehicleWheel.md Outdated
@AvarianKnight
Copy link
Copy Markdown
Contributor

Question though, will this be restored for new players that enter the range of the vehicle or will it still be broken off?

@spacevx
Copy link
Copy Markdown
Contributor Author

spacevx commented Apr 16, 2026

Question though, will this be restored for new players that enter the range of the vehicle or will it still be broken off?

Will still be broken, i can still try to hook SetVehicleHealth to achieve/correct this but don't know if it's okay

Co-authored-by: Dillon Skaggs <dillon@dillonskaggs.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid Requires changes before it's considered valid and can be (re)triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants