# Troubleshooting

| Problem                | Solution                                           |
| ---------------------- | -------------------------------------------------- |
| Tables not created     | Import SQL manually                                |
| NUI not showing        | Check `ui_page` in fxmanifest                      |
| Target not working     | Check `Config.UseTarget` and `Config.TargetSystem` |
| Keys not given         | Check `Config.GiveKeys` and `Config.KeySystem`     |
| Framework not detected | Check `Config.Framework` value                     |

````
---

## 📄 SAYFA 3: Configuration

```markdown
---
description: Complete configuration reference
---

# ⚙️ Configuration

All configuration files are located in the `config/` folder.

---

## 📁 config/main.lua

### Framework Settings

```lua
Config.Framework = 'qb'        -- 'esx' or 'qb'
Config.Locale = 'tr'           -- 'en' or 'tr'
Config.Debug = false           -- Enable debug prints
````

#### Target Settings

```
Config.UseTarget = true        -- true = target system, false = 3D text + marker
Config.TargetSystem = 'qb'    -- 'ox' (ox_target) or 'qb' (qb-target)
```

#### Interaction Settings

```
Config.TargetSettings = {
    npc = {
        icon = 'fas fa-truck',
        label = 'Trucking Job Center',
        distance = 2.5
    },
    pickup = {
        icon = 'fas fa-box',
        label = 'Load Cargo',
        distance = 3.0
    },
    delivery = {
        icon = 'fas fa-dolly',
        label = 'Deliver Cargo',
        distance = 3.0
    }
}
```

#### Job Settings

```
Config.UseOxLib = true             -- Use ox_lib progress bars
Config.LevelLock = false           -- true = level lock active
Config.RequireLicense = false      -- Require truck license
Config.LicenseName = 'trucklicense'
Config.MaxActiveJobs = 1           -- Max simultaneous jobs per player
Config.DeliveryTimeLimit = 600     -- Global time limit (seconds)
```

#### Vehicle Key System

```
Config.GiveKeys = true         -- Give vehicle keys on spawn
Config.KeySystem = 'auto'     -- 'auto' or specific system name
```

When set to `'auto'`, the script will automatically detect your key system.

**Supported key systems:**

* `qb-vehiclekeys`
* `qs-vehiclekeys`
* `Renewed-Vehiclekeys`
* `wasabi_carlock`
* `cd_garage`
* `okokGarage`
* `vehicles_keys`

#### Discord Logging

```
Config.DiscordLog = true
Config.DiscordWebhook = 'YOUR_WEBHOOK_URL'
Config.DiscordBotName = 'Elena Truck Job V2'
Config.DiscordColor = 3447003
```

#### Delivery System

```
Config.DeliverySystem = {
    boxCount = {
        ['short']  = 3,      -- Boxes per route type
        ['medium'] = 5,
        ['long']   = 4,
        ['vip']    = 6
    },
    boxProp = 'prop_box_ammo04a',   -- Box prop model
    boxPickupTime = 3000,            -- Time to pick up box (ms)
    boxDropTime = 2000,              -- Time to drop box (ms)
    boxDropDistance = 3.0,           -- Drop distance
    trailerModel = 'trailers',       -- Trailer model for big routes
    trailerAttachTime = 4000,        -- Trailer attach time (ms)
    trailerDetachTime = 3000,        -- Trailer detach time (ms)
    returnDistance = 10.0,           -- Vehicle return distance
    returnTime = 3000                -- Vehicle return time (ms)
}
```

#### Vehicle Return Point

```
Config.VehicleReturn = {
    coords = vector3(152.38, -3210.87, 5.91),
    heading = 271.08,
    marker = {
        type   = 1,
        r      = 0,
        g      = 100,
        b      = 255,
        a      = 150,
        size   = 6.0,
        height = 0.8
    }
}
```

#### Vehicle Types

```
Config.VehicleTypes = {
    ['mule']     = 'small',    -- Box loading system
    ['mule3']    = 'small',
    ['mule4']    = 'small',
    ['hauler']   = 'big',      -- Trailer system
    ['phantom']  = 'big',
    ['phantom3'] = 'big',
    ['packer']   = 'big'
}
```

#### Markers (for marker mode)

```
Config.MarkerPickup = {
    type = 1, r = 255, g = 165, b = 0, a = 150,
    size = 5.0, height = 0.8
}

Config.MarkerDelivery = {
    type = 1, r = 0, g = 200, b = 0, a = 150,
    size = 5.0, height = 0.8
}
```


---

# 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://elena-scripts.gitbook.io/elenascripts/jobs-and-activities/truck-job-v2/troubleshooting.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.
