Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/Stuyk/rebar-altv
Browse files Browse the repository at this point in the history
  • Loading branch information
Stuyk committed Jun 16, 2024
2 parents a269200 + cf85285 commit f6c1ba9
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/main/server/vehicle/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,24 +61,36 @@ export function useVehicle(vehicle: alt.Vehicle) {
vehicle.neonColor = document.neonColor;
}

// Synchronize primary paint job
// Synchronize primary custom paint job
if (typeof document.customPrimaryColor !== 'undefined') {
vehicle.customPrimaryColor = document.customPrimaryColor;
}

// Synchronize secondary paint job
// Synchronize secondary custom paint job
if (typeof document.customSecondaryColor !== 'undefined') {
vehicle.customSecondaryColor = document.customSecondaryColor;
}

// Synchronize primary paint job
if (typeof document.primaryColor !== 'undefined') {
vehicle.primaryColor = document.primaryColor;
}

// Synchronize secondary paint job
if (typeof document.secondaryColor !== 'undefined') {
vehicle.secondaryColor = document.secondaryColor;
}

// Synchronize wheelColor
if(typeof document.wheelColor !== 'undefined') {
vehicle.wheelColor = document.pearlColor;
}

// Synchronize pearlColor
if(typeof document.pearlColor !== 'undefined') {
vehicle.pearlColor = document.pearlColor;
}

// Synchronize vehicle extras
if (document.extras) {
for (let key of Object.keys(document.extras)) {
Expand Down
16 changes: 16 additions & 0 deletions src/main/shared/types/vehicle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,22 @@ export interface Vehicle {
*/
customSecondaryColor?: alt.RGBA;

/**
* The wheel color to set on the vehicle (0-159)
*
* @type {alt.RGBA}
* @memberof Vehicle
*/
wheelColor?: number;

/**
* The pearl color to set on the vehicle (0-159)
*
* @type {number}
* @memberof Vehicle
*/
pearlColor?: number;

/**
* The number plate text for the vehicle
*
Expand Down

0 comments on commit f6c1ba9

Please sign in to comment.