Skip to content
This repository was archived by the owner on Apr 29, 2025. It is now read-only.

Fix paintType application for default and custom vehicle colors #753

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MurilloGavron
Copy link

Previously, applying paintType1 and paintType2 (for Metallic, Matte, Chrome paint types) didn't work correctly.
Even when setting these values, the vehicle would ignore the desired paint type and fallback to default behavior (usually Metallic).

The issue was caused by improper handling of SetVehicleModColor_1/2, and a lack of distinction between custom RGB colors and default GTA color IDs. Also, it didn't properly clear custom colors when switching back to a stock paint ID.

This fix ensures that:

  • If color1 or color2 are numbers (GTA default colors), they are applied correctly and paintType is set properly.

  • If color1 or color2 are tables (custom RGB), they are used as custom colors and still apply paintType.

  • ClearVehicleCustomPrimaryColour and ClearVehicleCustomSecondaryColour are correctly used to avoid color conflicts.

Now the paintType properly changes the paint finish (Metallic, Matte, Chrome) as intended.

@Ehbw
Copy link
Contributor

Ehbw commented Apr 27, 2025

Please remove or translate the comments to english

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants