# Installation Guide

{% embed url="<https://www.youtube.com/watch?v=LbuML0r0qmY>" %}

{% stepper %}
{% step %}

### 1. Codesign Bridge

{% hint style="danger" icon="1" %}

#### **This script requires `cd_bridge` to be installed and running before it can function**

**`cd_bridge`** is plug-and-play and requires no setup. It automatically handles:

* Framework integration
* Database setup
* Script compatibility
* Error Handling

Once started, it will detect and connect to all supported scripts automatically.

[**👉 See the \[Full Bridge Setup Guide\] →**](https://docs.codesign.pro/paid-scripts/bridge/installation-guide)
{% endhint %}
{% endstep %}

{% step %}

### 2. Download Script

{% hint style="danger" icon="2" %}

#### Download the Script from the FiveM Portal Website

1. [**👉 Download cd\_mechanic →**](https://portal.cfx.re/assets/granted-assets?search=cd_mechanic)
2. Unzip the downloaded file.
3. In your server’s `resources` folder, create a folder named **`[codesign]`** if it does not already exist.
4. Place **`cd_mechanic`** (and all other Codesign scripts) inside the **`[codesign]`** folder.
   {% endhint %}

<div align="left" data-with-frame="true"><figure><img src="/files/sldr9FQVZ12CUPuiZihm" alt=""><figcaption><p>Example of a resources folder with a <code>[codesign]</code> directory.</p></figcaption></figure></div>
{% endstep %}

{% step %}

### 3. Install Dependencies

{% hint style="danger" icon="3" %}

#### **Required & Optional Dependencies**

* Dependencies are either included in **`[cd_mechanic/dependencies]`** or have a text file with a download link (GitHub/Cfx Portal).
* Place them in your server’s **`[codesign]`** folder
* ⚠️ Do not place them inside the `cd_mechanic` folder
* Required dependencies start automatically
  {% endhint %}

<table><thead><tr><th width="139">Resource Name</th><th width="143">Download</th><th width="105.6666259765625" data-type="checkbox">Required</th><th>Details</th></tr></thead><tbody><tr><td><code>cd_bridge</code></td><td><a href="https://portal.cfx.re/assets/granted-assets?search=cd_bridge">Cfx Portal</a></td><td>true</td><td>Required for framework, database, and compatibility.</td></tr><tr><td><code>cd_mechanicprops</code></td><td><a href="https://portal.cfx.re/assets/granted-assets?search=cd_mechanicprops">Cfx Portal</a></td><td>true</td><td>Provides mechanic props (e.g. car lift).</td></tr><tr><td><code>cd_torquemaster</code></td><td><a href="https://portal.cfx.re/assets/granted-assets?search=cd_torquemaster">Cfx Portal</a></td><td>true</td><td>Provides a minigame.</td></tr></tbody></table>
{% endstep %}

{% step %}

### 4. Database Setup (SQL)

{% hint style="danger" icon="4" %}

#### No manual SQL setup required.

The script automatically inserts all required database tables.

```lua
Config.AutoInsertSQL = true
```

Make sure this is enabled in `configs/config.lua`.
{% endhint %}
{% endstep %}

{% step %}

### 5. Items

{% hint style="danger" %}

#### Items to add to your inventory or framework

Use the link below to find copy-paste item tables for your inventory or framework.

[Items](/paid-scripts/cd_mechanic/developer-api/items.md#item-setup)
{% endhint %}
{% endstep %}

{% step %}

### 6. Configure Script

{% hint style="danger" icon="6" %}

#### Review the `config.lua` Settings

* Start by configuring `cd_mechanic/configs/config.lua` first
* This file contains the core settings required for basic script functionality
* Most feature-specific settings are located in separate config files
  {% endhint %}

{% hint style="danger" icon="6" %}

#### Review the `config_mod_prices.lua` Settings

After configuring `config.lua`, the next step is `cd_mechanic/configs/config_mod_prices.lua`.

This file contains the main pricing and economy configuration used by both player-run mechanic businesses and public LS Customs locations.

* **Parts Per Thousand**\
  Configure how many `basic_vehicleparts` are required based on repair and upgrade value.
* **Standard Mod Prices**\
  Configure the base pricing for standard vehicle upgrades as a percentage of vehicle value.

**Important Notes**

* These settings directly affect pricing and vehicle balancing on your server
* It is recommended to review all values before using the script in production
* Default values may not match your server economy or gameplay style
  {% endhint %}

{% hint style="danger" icon="6" %}

#### Review the `config_businesses.lua` Settings

After configuring `config.lua` and `config_mod_prices.lua`, the next step is `cd_mechanic/configs/config_business.lua`.

This is where you can begin configuring the main systems and features used by player-run mechanic businesses.

* **Business Upgrades**\
  Configure purchasable business upgrades, tools, and workshop equipment.
* **Crafting**\
  Configure the built-in crafting system and additional crafting recipes.
* **Mechanic Shop**\
  Configure items that mechanics can purchase through the mechanic shop.
* **Items**\
  Configure mechanic-related items such as vehicle parts, repair kits, lighting controllers, OBD scanners, stancers, hydraulics, dyno slips, and NOS items.
* **Other Settings**\
  Configure additional business-related behaviour such as work order handling, object syncing, and log expiry.

**Important Notes**

* These settings directly affect pricing, progression, and vehicle balancing on your server
* It is recommended to review all values before using the script in production
* Default values may not match your server economy or gameplay style
  {% endhint %}

{% hint style="danger" icon="6" %}

#### Review the `config_advanced_upgrades.lua` Settings

This file is used for player-run mechanic businesses only and controls the advanced upgrade system, allowing mechanics to install custom performance parts that apply handling and performance changes to vehicles.

* **Advanced Upgrade Categories**\
  Configure advanced upgrade categories such as brakes, drivetrain conversions, engine swaps, transmissions, and tyres, including pricing, handling modifiers, required tools, crafting, and mechanic shop settings.
  {% endhint %}

{% hint style="danger" icon="6" %}

#### Review the `config_parts_degradation.lua` Settings

This file controls the parts degradation system, which is a major part of the script and is used by player-run mechanic businesses.

Parts can wear down from normal mileage, vehicle crashes, NOS usage, and aggressive tuning through the tuner tablet.

* **Parts Degradation**\
  Configure serviceable vehicle parts, health loss, negative handling effects, repair costs and major failure behaviour.
* **Service Vehicle Repair**\
  Configure engine and body repair costs for mechanic service orders.
* **Vehicle Crash Degradation**\
  Configure how vehicle crashes damage serviceable parts and apply tuning penalties based on crash severity.
  {% endhint %}
  {% endstep %}

{% step %}

### 7. Business Setup & Usage

{% hint style="danger" icon="7" %}

#### **Create a Mechanic Business**

You must have admin permissions to create a business.

* Go to the location where you want the business to be set.
* Use `/mechanictablet`, open the **Admin App**, and create a business.

Businesses are linked to a job. Once assigned, all players with that job will have access.

After the admin creates the business, the business owner can finish setting it up.

👉 **See the \[Admin Setup Guide] →**
{% endhint %}

{% hint style="danger" icon="7" %}

#### Business Owner Setup

After a business is created, the owner must complete setup using the tablet.

**Required Setup**

1. **Open the Business App**\
   Use the tablet to access your business.
2. **Purchase Upgrades**\
   Go to the **Upgrades** tab and buy the required upgrades.
3. **Set Upgrade Locations**\
   Place each purchased upgrade in the **Shop Layout** tab.

**Optional Setup**

* **Billing Presets**\
  Set prices for common services
* **Commissions**\
  Set earnings per job grade
* **Manage Staff**\
  Hire and manage employees

👉 **See the \[Business Setup Guide] →**
{% endhint %}

{% hint style="danger" icon="7" %}

#### Create LS Customs (Public)

You must have admin permissions.

* Go to the location where you want LS Customs to be set.
* Use `/mechanictablet`, open the **Admin App**, and create a public LS Customs.

👉 **See the \[LS Customs Setup Guide] →**
{% endhint %}

{% hint style="danger" icon="7" %}

#### Using Mechanic Shops & LS Customs

* Go to a mechanic business or LS Customs location
* Press the interaction key (default: **E**) to open the customs menu

*Access methods can be changed in `config.lua`.*

👉 **See the \[Usage Guide] →**
{% endhint %}
{% endstep %}

{% step %}

### 8. Set Up Discord Logging

{% hint style="danger" icon="8" %}

### **Configure Discord Logging Webhooks**

The script can send important action logs to Discord using webhooks. These webhook settings can be edited in **`cd_mechanic/configs/server_webhooks.lua`**.

* **Admin Business Actions**\
  Logs when an admin creates, edits, or deletes a mechanic business.
* **Admin Customs Actions**\
  Logs when an admin creates, edits, or deletes a public LS Customs.
* **Boss business Purchase**\
  Logs when a business boss purchases upgrades, including what was bought, the quantity, and the total cost.
* **Mechanic Shop Purchase**\
  Logs when mechanic employees purchase items from the mechanic shop.
  {% endhint %}
  {% endstep %}
  {% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.codesign.pro/paid-scripts/cd_mechanic/installation-guide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
