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
get
ColorCombination():number
set
ColorCombination(value
):void
• value: number
number
client/models/VehicleModCollection.ts:273
get
ColorCombinationCount():number
number
client/models/VehicleModCollection.ts:281
get
CustomPrimaryColor():Color
set
CustomPrimaryColor(color
):void
• color: Color
client/models/VehicleModCollection.ts:302
get
CustomSecondaryColor():Color
set
CustomSecondaryColor(color
):void
• color: Color
client/models/VehicleModCollection.ts:311
set
DashboardColor(color
):void
• color: VehicleColor
client/models/VehicleModCollection.ts:269
get
HasAllNeonLights():boolean
boolean
client/models/VehicleModCollection.ts:90
get
IsPrimaryColorCustom():boolean
boolean
client/models/VehicleModCollection.ts:320
get
IsSecondaryColorCustom():boolean
boolean
client/models/VehicleModCollection.ts:324
get
LicensePlate():string
set
LicensePlate(text
):void
• text: string
string
client/models/VehicleModCollection.ts:363
get
LicensePlateStyle():LicensePlateStyle
set
LicensePlateStyle(style
):void
• style: LicensePlateStyle
client/models/VehicleModCollection.ts:351
get
LicensePlateType():LicensePlateType
client/models/VehicleModCollection.ts:359
get
Livery():number
set
Livery(index
):void
• index: number
number
client/models/VehicleModCollection.ts:209
get
LiveryCount():number
number
client/models/VehicleModCollection.ts:199
get
NeonLightsColor():Color
set
NeonLightsColor(color
):void
• color: Color
client/models/VehicleModCollection.ts:94
get
Owner():Vehicle
client/models/VehicleModCollection.ts:24
get
PearlescentColor():VehicleColor
set
PearlescentColor(color
):void
• color: VehicleColor
client/models/VehicleModCollection.ts:257
get
PrimaryColor():VehicleColor
set
PrimaryColor(color
):void
• color: VehicleColor
client/models/VehicleModCollection.ts:233
get
RimColor():VehicleColor
set
RimColor(color
):void
• color: VehicleColor
client/models/VehicleModCollection.ts:249
get
SecondaryColor():VehicleColor
set
SecondaryColor(color
):void
• color: VehicleColor
client/models/VehicleModCollection.ts:241
get
TireSmokeColor():Color
set
TireSmokeColor(color
):void
• color: Color
client/models/VehicleModCollection.ts:285
set
TrimColor(color
):void
• color: VehicleColor
client/models/VehicleModCollection.ts:265
get
VehicleMods():Map
<VehicleMods
,VehicleMod
>
Map
<VehicleMods
, VehicleMod
>
client/models/VehicleModCollection.ts:28
get
VehicleToggleMods():Map
<VehicleToggleModType
,VehicleToggleMod
>
Map
<VehicleToggleModType
, VehicleToggleMod
>
client/models/VehicleModCollection.ts:32
get
WheelType():VehicleWheelType
set
WheelType(type
):void
• type: VehicleWheelType
client/models/VehicleModCollection.ts:191
get
WindowTint():VehicleWindowTint
set
WindowTint(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