Part Item

Project Cars
Updated 7 months ago · v1.1.4

Fields:

FieldTypeRequiredDescription
labelstring✅The display name of the part.
searchChancenumber✅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.
weightnumber✅Weight of the part in the inventory (e.g., 1000 = 1kg).
toolstable❌Tools required to fit this part. Format: { itemName = quantity }.
consumablestable❌Items that will be consumed when installing this part. Same format as tools.
animtable❌Animation config when applying the part.
→ dictstring⚠️Animation dictionary. Must specify either dict or scenario.
→ clipstring✅Animation clip name.
→ flagnumber❌Optional animation flags.
→ timenumber❌Time in seconds to complete the install animation.
reqPartsarray❌Names of other parts required before this one can be installed.
modelstring❌Prop model name shown in hand or placed during install (e.g. "prop_oilcan_01a").
applyRangenumber❌Max distance from the vehicle to allow this part to be installed.
applyAtBonestring❌The bone name where this part applies (e.g., "engine").
canStartfunction❌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.
removePartfunction❌Function triggered when removing the part. Parameters:<br/>→ self: vehicle object<br/>→ entity: number (vehicle entity ID)<br/>→ _type: string (part name).
addPartfunction❌Function triggered when adding the part. Same parameters as removePart.

Example

lua
luaCopyEditparts = {
    oil_filter = {
        label        = "Oil Filter",
        searchChance = 15,
        weight       = 250,
        tools        = { wrench = 1 },
        consumables  = { oil = 1 },
        anim         = {
            dict  = "anim@amb@clubhouse@tutorial@bkr_tut_ig3@",
            clip  = "machinic_loop_mechandplayer",
            flag  = 16,
            time  = 5
        },
        reqParts     = { "engine_cover" },
        model        = "prop_oilcan_01a",
        applyRange   = 2.0,
        applyAtBone  = "engine",
        canStart     = function(installed, part)
            return installed, installed and "" or "Engine won't start without oil filter."
        end,
        removePart   = function(self, entity, part)
            -- custom logic to clean up or detach
        end,
        addPart      = function(self, entity, part)
            -- apply tuning or set vars
        end
    }
}
Was this page helpful?
This page was last updated on 8 July 2025
DIRKSCRIPTS
All you need for your FiveM server.10% off your first order

Unsubscribe any time.

Copyright © 2026 DirkScripts. Not affiliated with or endorsed by Rockstar North or Take-Two Interactive.