DirkScripts Logo

Login With FiveM

Login

πŸ”§ Project Cars
β€Ί
Types
β€Ί

Part Item

Part Item

πŸ“„ 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
    }
}

Copyright Β© 2026 DirkScripts.

Not affiliated with or endorsed by Rockstar North, Take-Two Interactive, or any other rights holders. FiveM is a copyright and registered trademark of Take-Two Interactive Software, Inc.
Our checkout system is provided by Tebex Limited, who manage payment processing, product delivery, and billing support. Prices shown in currencies other than GBP are approximate conversions updated daily. All purchases are processed in GBP, so the final amount charged may vary depending on your bank or payment provider’s exchange rate.