Skip to content

Expand vehicle variants#4766

Open
Xenius97 wants to merge 2 commits intomultitheftauto:masterfrom
Xenius97:new/uncap_vehicle_variants
Open

Expand vehicle variants#4766
Xenius97 wants to merge 2 commits intomultitheftauto:masterfrom
Xenius97:new/uncap_vehicle_variants

Conversation

@Xenius97
Copy link
Copy Markdown
Contributor

Summary

This PR expands the possibilities for vehicle variants, increasing the available base limit from 6 to 253.
(254 = random default variant, 255 = reset variants)
Extras are indexed starting from 1, so for example, extra40 will be variant 39.
By default, GTA:SA can handle extras from extra1 to extra5. With this update, modelers can now use extra6 through extra253, and MTA will handle these natively. These components should be added to chassis_dummy like other variants.

Motivation

Currently, vehicle variants are quite limited by default. We use many vehicles where multiple types of the same model are available as separate variants, but often the default 6 variants are not enough, forcing us to rely on custom element data. This solution is much more performance-oriented and, incidentally, can natively handle 253 extra components without scripts.
Furthermore, in our case, there is no need to rely on custom element data, as the built-in synchronization manages this automatically.

Test plan

Start the attached resource and run setVehicleVariant(vehicle, 99, 39)
replace.zip

Checklist

  • Your code should follow the coding guidelines.
  • Smaller pull requests are easier to review. If your pull request is beefy, your pull request should be reviewable commit-by-commit.

@Xenius97 Xenius97 requested a review from a team as a code owner March 26, 2026 08:35
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.

2 participants