screwdriver-wrenchAndrew's Vehicle Repair

triangle-exclamation

Dependency Required.

Overview

Andrew’s Vehicle Repair is a FiveM script that allows players to repair their vehicles while deducting a configurable fee using the Andrew Money Script.

Key Features:

  • Charges players a set amount (configurable) for vehicle repairs.

  • Fully customizable repair mechanics locations.

  • Customizable vehicle damage handling and visual deformation.

  • Supports repair messages for realism/fun.

  • Optional whitelisting for certain players.

  • Integrated with a standalone money system (Andrew Money Script) to handle payments.

Important: This script was adapted from a pre-existing Realistic Vehicle Damage script. Credit for the base script is not claimed.


Script Requirements

  • Andrew Money Script (to charge players for repairs)

  • FiveM server running the resource

  • Optional: ACE permissions for restricting repair features to certain players


Workflow

1️⃣ Repairing a Vehicle

  1. Player drives to a mechanic location (defined in the config).

  2. The mechanic examines the vehicle (repair timeout configurable).

  3. Player is charged a set amount of money via Andrew Money Script.

  4. Vehicle is repaired according to configuration settings.

  5. A repair message is displayed to the player, randomly selected from fixMessages.

2️⃣ No Repairs Needed

  • If the vehicle does not require repairs, a message is displayed from the noFixMessages list.


Configuration

Basic Payment

Tip: Always define amounts as a floating-point number (e.g., 100.0) for compatibility.


Vehicle Handling & Damage Settings (cfg)

Option
Type
Description

repairTimeoutMS

number

Time in milliseconds the mechanic inspects the vehicle before repairing (default: 5000).

deformationMultiplier

float

How much vehicles visually deform from collisions. -1 = no change. Range: 0.0–10.0

deformationExponent

float

Compresses handling deformation setting toward 1.0. 1 = no change.

collisionDamageExponent

float

Compresses collision damage toward 1.0. 1 = no change.

damageFactorEngine

float

Multiplier for engine damage (1–100 recommended).

damageFactorBody

float

Multiplier for body damage (1–100 recommended).

damageFactorPetrolTank

float

Multiplier for petrol tank damage (1–200 recommended).

engineDamageExponent

float

Compress engine damage setting toward 1.0.

weaponsDamageMultiplier

float

Vehicle damage from weapons (0.0–10.0, -1 = untouched).

degradingHealthSpeedFactor

float

Speed of slow vehicle health degradation.

cascadingFailureSpeedFactor

float

Speed of rapid health drop once critical threshold reached.

degradingFailureThreshold

float

Health value below which degradation starts.

cascadingFailureThreshold

float

Health value below which cascading failure triggers.

engineSafeGuard

float

Prevents total engine destruction.

torqueMultiplierEnabled

bool

Reduces engine torque as damage increases.

limpMode

bool

Prevents full engine failure; vehicle can always reach mechanic.

limpModeMultiplier

float

Torque multiplier for limp mode (0.05–0.25 recommended).

preventVehicleFlip

bool

Prevents vehicles from flipping upside-down.

sundayDriver

bool

Slows accelerator/brake response for easier driving.

sundayDriverAcceleratorCurve

float

Controls slow acceleration curve (0–10).

sundayDriverBrakeCurve

float

Controls slow brake curve (0–10).

displayBlips

bool

Display mechanic blips on the map.

compatibilityMode

bool

Prevents other scripts from modifying fuel tank health.

randomTireBurstInterval

number

Minutes of driving over 22mph before random tire burst. 0 = disabled.


Class Damage Multiplier

  • Multiplies damageFactorEngine, damageFactorBody, and damageFactorPetrolTank by class.

  • Allows adjusting damage per vehicle class for balance.


Mechanic Locations (repairCfg.mechanics)

Each mechanic is defined as:

Field
Type
Description

name

string

Display name of the mechanic/NPC.

id

number

Ped model ID for the mechanic.

r

float

Radius around the mechanic where vehicles can be repaired.

x, y, z

float

3D world coordinates of the mechanic.

The script includes 24 pre-defined mechanics covering Los Santos, Sandy Shores, Paleto Bay, and other locations.


Repair Messages

  • Successful Repair (fixMessages)

    • Randomly selected messages for flavor/fun.

    • Example: "You tightened the oil pan screw and stopped the dripping"

  • No Repair Needed (noFixMessages)

    • Messages when vehicle is already fine.

    • Example: "You checked the oil plug. It's still there"

  • Message Counts

These must match the number of entries in the respective message arrays.


Whitelist Options

  • RepairEveryoneWhitelisted: true/false — only whitelisted players can repair vehicles.

  • RepairWhitelist: Array of Steam IDs or IPs allowed to use repair features.


Integration with Andrew Money Script

  • Charges player automatically using your standalone money resource.

  • Configurable amount via config.amount.

  • Example: 100 in config = 200 final charge.

Recommended Setup:

  1. Ensure Andrew Money Script is running.

  2. Confirm player has enough funds before allowing repair.

  3. Deduct money on repair success only.


Usage

  1. Drive to a mechanic location (blip appears on map if displayBlips=true).

  2. Park vehicle within the mechanic radius.

  3. Wait for repairTimeoutMS milliseconds.

  4. Vehicle is repaired, money is deducted, and a repair message displays.


Customization Tips

  • Adjust cfg values to tune vehicle damage realism.

  • Add/remove mechanics in repairCfg.mechanics for server-specific locations.

  • Customize repair messages for roleplay flavor.

  • Update RepairWhitelist to restrict usage for specific players.

  • Change config.amount to balance repair costs with economy.


Notes

  • Always use floating-point numbers for configuration (e.g., 10.0 instead of 10) to avoid errors.

  • Visual vehicle deformation may not sync with other players; deformationMultiplier=-1 disables visual changes.

  • Compatibility mode prevents conflicts with other vehicle damage scripts.

Last updated