a library to speed up the development of Fivem scripts and frameworks
fivem-ts - Documentation v0.7.5 • Docs
fivem-ts - Documentation v0.7.5 / Client / VehicleModCollection
The VehicleModCollection class manages the mods for a Vehicle, including standard mods and toggleable mods such as neon lights, etc.
new VehicleModCollection(
owner):VehicleModCollection
• owner: Vehicle
client/models/VehicleModCollection.ts:22
getColorCombination():number
setColorCombination(value):void
• value: number
number
client/models/VehicleModCollection.ts:273
getColorCombinationCount():number
number
client/models/VehicleModCollection.ts:281
getCustomPrimaryColor():Color
setCustomPrimaryColor(color):void
• color: Color
client/models/VehicleModCollection.ts:302
getCustomSecondaryColor():Color
setCustomSecondaryColor(color):void
• color: Color
client/models/VehicleModCollection.ts:311
setDashboardColor(color):void
• color: VehicleColor
client/models/VehicleModCollection.ts:269
getHasAllNeonLights():boolean
boolean
client/models/VehicleModCollection.ts:90
getIsPrimaryColorCustom():boolean
boolean
client/models/VehicleModCollection.ts:320
getIsSecondaryColorCustom():boolean
boolean
client/models/VehicleModCollection.ts:324
getLicensePlate():string
setLicensePlate(text):void
• text: string
string
client/models/VehicleModCollection.ts:363
getLicensePlateStyle():LicensePlateStyle
setLicensePlateStyle(style):void
• style: LicensePlateStyle
client/models/VehicleModCollection.ts:351
getLicensePlateType():LicensePlateType
client/models/VehicleModCollection.ts:359
getLivery():number
setLivery(index):void
• index: number
number
client/models/VehicleModCollection.ts:209
getLiveryCount():number
number
client/models/VehicleModCollection.ts:199
getNeonLightsColor():Color
setNeonLightsColor(color):void
• color: Color
client/models/VehicleModCollection.ts:94
getOwner():Vehicle
client/models/VehicleModCollection.ts:24
getPearlescentColor():VehicleColor
setPearlescentColor(color):void
• color: VehicleColor
client/models/VehicleModCollection.ts:257
getPrimaryColor():VehicleColor
setPrimaryColor(color):void
• color: VehicleColor
client/models/VehicleModCollection.ts:233
getRimColor():VehicleColor
setRimColor(color):void
• color: VehicleColor
client/models/VehicleModCollection.ts:249
getSecondaryColor():VehicleColor
setSecondaryColor(color):void
• color: VehicleColor
client/models/VehicleModCollection.ts:241
getTireSmokeColor():Color
setTireSmokeColor(color):void
• color: Color
client/models/VehicleModCollection.ts:285
setTrimColor(color):void
• color: VehicleColor
client/models/VehicleModCollection.ts:265
getVehicleMods():Map<VehicleMods,VehicleMod>
Map<VehicleMods, VehicleMod>
client/models/VehicleModCollection.ts:28
getVehicleToggleMods():Map<VehicleToggleModType,VehicleToggleMod>
Map<VehicleToggleModType, VehicleToggleMod>
client/models/VehicleModCollection.ts:32
getWheelType():VehicleWheelType
setWheelType(type):void
• type: VehicleWheelType
client/models/VehicleModCollection.ts:191
getWindowTint():VehicleWindowTint
setWindowTint(tint):void
• tint: VehicleWindowTint
client/models/VehicleModCollection.ts:225
areAllNeonLightsOn():
boolean
Checks if all neon lights on the vehicle are turned on.
boolean
True if all neon lights are on, false otherwise.
client/models/VehicleModCollection.ts:108
clearCustomPrimaryColor():
void
Clears the custom primary color of the vehicle.
This method resets the vehicle’s primary color to the default value, removing any custom color that might have been set previously.
void
client/models/VehicleModCollection.ts:336
clearCustomSecondaryColor():
void
Clears the custom secondary color of the vehicle.
This method will reset the custom secondary color of the vehicle associated with the owner Handle to its default state.
void
client/models/VehicleModCollection.ts:347
getAllMods():
VehicleMod[]
Retrieves all the vehicle modifications.
An array of VehicleMod objects representing all the vehicle modifications.
client/models/VehicleModCollection.ts:77
getMod(
modType):VehicleMod
Retrieves or initializes a VehicleMod based on the specified modType.
• modType: VehicleMods
The type of vehicle modification to retrieve.
The instance of VehicleMod corresponding to the provided modType.
client/models/VehicleModCollection.ts:52
getToggleMod(
modType):VehicleToggleMod
Retrieves or creates a toggle modification for the vehicle based on the specified modification type.
• modType: VehicleToggleModType
The type of toggle modification to retrieve or create.
The toggle modification for the specified type.
client/models/VehicleModCollection.ts:65
hasNeonLight(
light):boolean
Checks if the vehicle has the specified neon light.
• light: VehicleNeonLight
The neon light position to check (Back, Front, Left, Right).
boolean
True if the vehicle has the specified neon light, false otherwise.
client/models/VehicleModCollection.ts:131
hasVehicleMod(
type):boolean
Checks if the vehicle has the specified modification type.
• type: VehicleMods
The type of vehicle modification to check for.
boolean
client/models/VehicleModCollection.ts:42
isNeonLightOn(
light):boolean
Checks if the specified neon light on the vehicle is turned on.
• light: VehicleNeonLight
The neon light to check the status of.
boolean
client/models/VehicleModCollection.ts:152
setAllNeonLightsOff():
void
Turns off all neon lights on the vehicle by iterating over each type of neon light and setting its state to off.
void
No return value.
client/models/VehicleModCollection.ts:174
setAllNeonLightsOn():
void
Turns on all neon lights of the vehicle by iterating over all available neon light types and setting each one to ‘on’ state.
void
This method does not return any value.
client/models/VehicleModCollection.ts:162
setModColor1(
paintType,color):void
• paintType: VehiclePaintType
• color: VehicleColor
void
client/models/VehicleModCollection.ts:294
setModColor2(
paintType,color):void
• paintType: VehiclePaintType
• color: VehicleColor
void
client/models/VehicleModCollection.ts:298
setNeonLightOn(
light,toggle):void
Sets the state of the specified neon light on the vehicle.
• light: VehicleNeonLight
The specific neon light to be toggled.
• toggle: boolean
The desired state of the neon light; true to turn it on, false to turn it off.
void