mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:08:54 +00:00
eb58d4674b
setVehicleProperties passes props.color1 straight into SetVehicleColours when the secondary colour comes from the palette. If the primary is a custom RGB colour, the getter stored it as a table, so a table reaches a native that wants a paint index and the call does nothing. The secondary colour is silently lost. Any car sprayed with a custom primary and a palette secondary comes back from storage with the wrong secondary colour. Fall back to the vehicle's current primary when props.color1 is not a paint index. The custom primary was already applied by the block above, so nothing is lost. Measured in game on artifact 25770, reading properties off a car with a custom red primary and palette secondary 12, then applying them to a second car: before: color2 came back 0 after: color2 came back 12 The custom primary survives either way, mods and wheels are untouched.