Kartik Scripts

Repair & Replace Parts

๐Ÿ“„ Config file: shared/repair_config.lua

This file defines all the repair and replacement actions a mechanic can perform on each vehicle part. Every part entry specifies the item required, duration, animation, and whether it's a partial repair or a full replacement.

Repair = partially restores the part's condition using a repair kit (cheaper, faster, but doesn't fully fix it).
Replace = fully restores the part to brand new using a replacement part (more expensive, takes longer, but resets wear to 0).


Minigames & Failure Handling

๐Ÿ“„ Config file: shared/repair_config.lua

All repair and installation actions are protected by a centralized minigame system. This ensures that while everyone can use repair tools, professional mechanics have a clear advantage.

Config.Minigames = {
    enabled = true,
    mechanicNeedsMinigame = false, -- Mechanics skip the minigame if false
    damageOnFail = true,
    failDamageAmount = 150.0, -- Amount of engine damage to apply on failure
}

Configuration Options

OptionWhat it does
enabledGlobally enable or disable minigames for all repairs/installs.
mechanicNeedsMinigameIf false, players with a registered mechanic job will skip the minigame.
damageOnFailIf true, failing a minigame damages the vehicle.
failDamageAmountThe amount of health to remove from the engine and body on failure.

Body Repair

Config.BodyRepair = {
    item     = 'body_repair_kit',
    duration = 5000,
    label    = 'Repairing Body...'
}
SettingWhat it does
itemInventory item required to perform the body repair.
durationHow long the repair takes in milliseconds. 5000 = 5 seconds.
labelThe text shown on the progress bar during the repair.

This repairs the vehicle's exterior body damage (dents, scratches, deformation), not individual parts.


Cleaning Kit (Wash)

๐Ÿ“„ Config file: shared/animations.lua (for animations)

Config.CleaningKit = {
    Animation       = "base",
    AnimationDict   = "amb@world_human_maid_clean@",
    Duration        = 10000,
    Prop            = "prop_sponge_01",
    Bone            = 28422,
    Pos             = { x = 0.0, y = 0.0, z = -0.01 },
    Rot             = { x = 90.0, y = 0.0, z = 0.0 },
}

The cleaning kit uses a sponge prop and particle effects to wash the vehicle. A vehicle must have a dirt level of 0.0 before wax can be applied.


Tiered Repair Kits

๐Ÿ“„ Config file: shared/repair_config.lua

Tiered repair kits (Standard, Advanced, Helicopter) provide a more flexible way to manage multi-part repairs.

Config.RepairKits = {
    ['repair_kit'] = {
        label = "Standard Repair Kit",
        duration = 10000,
        repaints = true, -- Repairs body damage
        repairs = { 'engine', 'oil', 'spark_plug' }, -- Repairable categories
        classes = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 } -- Allowed vehicle classes
    },
    -- ...
}

Configuration Options

OptionWhat it does
labelName shown on the progress bar.
durationTime in milliseconds to complete the repair.
repaintsIf true, the kit will fix visual body damage.
repairsList of part categories this kit can fix. Valid categories: engine, oil, spark_plug, air_filter, tires, brakes, suspension, clutch, gearbox, piston, radiator, fuel_pump, alternator, turbo.
classesList of vehicle class IDs this kit is compatible with.

Part-by-Part Configuration

Each part listed in Config.RepairParts has the following structure:

PropertyWhat it does
labelDisplay name of the part.
maxMileageMaximum mileage this part supports before it needs replacement. Used as a reference value.
repair.itemThe repair kit item needed for a partial repair.
repair.amountHow much condition is restored (out of 100). 25 = restores 25% condition.
repair.durationTime in milliseconds for the repair action.
replace.itemThe full replacement part item.
replace.countHow many of the item are consumed.
replace.durationTime in milliseconds for the replacement action.

Spark Plugs

ActionItemCount/AmountDuration
Replacespark_plugs15 seconds

Spark plugs only support replacement (no partial repair).


Engine Oil

ActionItemCount/AmountDuration
Replaceengine_oil110 seconds

Oil changes are full replacements, you always use a fresh bottle.


Oil Filter

ActionItemCount/AmountDuration
Replaceoil_filter13 seconds

Air Filter

ActionItemCount/AmountDuration
Replaceair_filter13 seconds

Tires

ActionItemCount/AmountDuration
Replacetires4 (full set)5 seconds

Tire replacement always uses 4 items (one per wheel).


Brakes

ActionItemCount/AmountDuration
Repair (pad change)brake_pads_repairRestores 25%6 seconds
Replace (full service)brakeparts110 seconds

Suspension

ActionItemCount/AmountDuration
Repair (service)suspension_repairRestores 25%8 seconds
Replacesuspension_parts112 seconds

Clutch

ActionItemCount/AmountDuration
Repair (adjust)clutch_repairRestores 20%8 seconds
Replaceclutch112 seconds

Gearbox

ActionItemCount/AmountDuration
Repair (service)gearbox_repair_kitRestores 20%10 seconds
Replacegearbox_parts115 seconds

Radiator

ActionItemCount/AmountDuration
Repair (seal)radiator_repair_kitRestores 35%6 seconds
Replaceradiator110 seconds

Fuel Pump

ActionItemCount/AmountDuration
Repair (service)fuel_pump_repair_kitRestores 35%6 seconds
Replacefuel_pump18 seconds

Alternator

ActionItemCount/AmountDuration
Repair (service)alternator_repair_kitRestores 35%6 seconds
Replacealternator_battery18 seconds

Pistons

ActionItemCount/AmountDuration
Repair (service)piston_repair_kitRestores 15%12 seconds
Replaceengine_pistons120 seconds

Pistons are the most time-consuming parts to replace.


Turbo

ActionItemCount/AmountDuration
Repair (service)turbo_repair_kitRestores 50%7 seconds
Replaceturbo_s2110 seconds

All animation dictionaries and animations are also defined per-part in this config. You can change the animation played during any repair/replace action by editing the animation block in each entry.

On this page