---
description: Check the instructions below.
---

# Configuration

#### General Settings (Common for ESX and QB)

| Field          | Description                                                              | Example Value           |
| -------------- | ------------------------------------------------------------------------ | ----------------------- |
| `SQLScript`    | Specifies the SQL database system.                                       | `"oxmysql"`             |
| `Target`       | Interaction target system. Options: `ox-target`, `qb-target`, `drawtext` | `"qb-target"`           |
| `Npc`          | List of NPCs for job registration and job pickup.                        | See below.              |
| `Trucks`       | List of available truck models.                                          | `'phantom'`, `'packer'` |
| `Trailers`     | Defines available trailer models and types.                              | See below.              |
| `Destinations` | Delivery locations.                                                      | List of `vector3`.      |

#### NPC Configuration

Define NPCs for interacting with players:

```lua
Config.Npc = {
    {
        pos = vector3(995.51, -2905.55, 4.9),
        heading = 173.25,
        model = "a_m_m_farmer_01",
        blipSprite = 477,
        blipColor = 0,
        blipText = "Trucker Job",
        truckPos = vector4(977.07, -2927.02, 4.9, 84.14),
        TrailerPos = vector4(980.36, -2913.64, 4.9, 86.91),
    },
}
```

#### Garage and Employee Settings

| Field                    | Description                                      | Example Value |
| ------------------------ | ------------------------------------------------ | ------------- |
| `GarageCapacity`         | Initial capacity per garage level.               | `1`           |
| `UpgradeGarageCost`      | Cost to upgrade the garage.                      | `5000`        |
| `EmployeeSalaryTimeout`  | Interval for paying employee salaries (seconds). | `2700`        |
| `Employee.levelPerMoney` | Money multiplier based on employee level.        | `500`         |

#### Payment and Experience

| Field                | Description                                     | Example Value |
| -------------------- | ----------------------------------------------- | ------------- |
| `basePayment`        | Base payment for deliveries.                    | `500`         |
| `distanceMultiplier` | Payment multiplier based on delivery distance.  | `1`           |
| `typeExp`            | Experience points gained for each trailer type. | See below.    |

Example:

```lua
Config.CompanySettings = {
    Exp = {
        typeExp = {
            none = 10,
            highValue = 100,
            fragile = 75,
            rare = 175,
            tanker = 225,
            military = 250,
        },
    },
}
```

***

### How to Use

1. **Start a Job**
   * Visit a job NPC location and press `[E]` (or the configured interaction key).
   * Choose a truck and trailer.
2. **Deliver Goods**
   * Attach the trailer and follow the marked destination on the map.
   * Drop off the goods to complete the delivery.
3. **Company Management**
   * Register a company by paying the registration cost.
   * Level up your company and hire employees for passive income.

***

### Notifications

Configure in `config.lua` to match your preferred system.

Example:

```lua
function Notify(text, type, length)
    QBCore.Functions.Notify(text, type or "primary", length or 5000)
end
```

***

### For Developers

#### Key Exports (QB-Core Example)

*   **Set Fuel**: Integrate with a fuel script. Example:

    ```lua
    function SetFuel(vehicle, fuel)
        exports['LegacyFuel']:SetFuel(vehicle, fuel)
    end
    ```
*   **Draw Text**: Display 3D text at specific coordinates:

    ```lua
    function DrawText3D(x, y, z, scl_factor, text)
        -- Implementation
    end
    ```
