Part Item

Each part is defined as an entry in your parts table with configurable fields for how it behaves during installation, usage, and interaction with vehicles.

πŸ“„ Fields:

Field
Type
Required
Description

label

string

βœ…

The display name of the part.

searchChance

number

βœ…

Chance this item is found in a search. Set to 0 to make it unsearchable. Think of it like names in a hatβ€”more entries = higher odds.

weight

number

βœ…

Weight of the part in the inventory (e.g., 1000 = 1kg).

tools

table

❌

Tools required to fit this part. Format: { itemName = quantity }.

consumables

table

❌

Items that will be consumed when installing this part. Same format as tools.

anim

table

❌

Animation config when applying the part.

β†’ dict

string

⚠️

Animation dictionary. Must specify either dict or scenario.

β†’ clip

string

βœ…

Animation clip name.

β†’ flag

number

❌

Optional animation flags.

β†’ time

number

❌

Time in seconds to complete the install animation.

reqParts

array

❌

Names of other parts required before this one can be installed.

model

string

❌

Prop model name shown in hand or placed during install (e.g. "prop_oilcan_01a").

applyRange

number

❌

Max distance from the vehicle to allow this part to be installed.

applyAtBone

string

❌

The bone name where this part applies (e.g., "engine").

canStart

function

❌

Function run to check if the car can start based on this part. Parameters:<br/>β†’ itemExists: boolean (is part installed?)<br/>β†’ _type: string (part name)<br/>Should return: boolean, message.

removePart

function

❌

Function triggered when removing the part. Parameters:<br/>β†’ self: vehicle object<br/>β†’ entity: number (vehicle entity ID)<br/>β†’ _type: string (part name).

addPart

function

❌

Function triggered when adding the part. Same parameters as removePart.


πŸ’‘ Example

Last updated