# Vehicles

````

```markdown
---
description: How to configure vehicles
---

# 🚛 Vehicles

Vehicles are defined in `config/vehicles.lua`.

---

## Vehicle Structure

```lua
Config.Vehicles = {
    ['vehicle_id'] = {
        id = 'vehicle_id',          -- Unique vehicle ID
        label = 'Vehicle Name',     -- Display name
        model = 'model_name',       -- GTA model name
        requiredLevel = 1,          -- Minimum level
        rentPrice = 0,              -- Rent price ($, 0 = free)
        maxCargo = 500,             -- Max cargo capacity (display)
        speed = 'Slow',             -- Speed label (display)
        routeType = 'small'         -- 'small' or 'big'
    }
}
````

### Route Type Matching

Vehicles are **automatically matched** to routes based on `routeType`:

| Vehicle routeType | Route vehicleType | Compatible |
| ----------------- | ----------------- | ---------- |
| `small`           | `small`           | ✅ Yes      |
| `small`           | `big`             | ❌ No       |
| `big`             | `big`             | ✅ Yes      |
| `big`             | `small`           | ❌ No       |

> If a player's selected vehicle doesn't match the route type, the system will **automatically select** the best available vehicle.

\
Default Vehicles

| Vehicle        | Model           | Level | Rent   | Type  |
| -------------- | --------------- | ----- | ------ | ----- |
| Mule           | `mule`          | 1     | Free   | Small |
| Mule 3         | `mule3`         | 5     | $500   | Small |
| Hauler         | `hauler`        | 10    | $1,000 | Big   |
| Phantom        | `phantom`       | 15    | $2,000 | Big   |
| Phantom Custom | `phantomcustom` | 25    | $5,000 | Big   |

### Vehicle Spawn Points

```
Config.VehicleSpawns = {
    vector4(176.09, -3227.74, 5.60, 2.67),
    vector4(181.34, -3228.26, 5.63, 355.33),
    vector4(172.91, -3257.41, 5.74, 263.78),
    vector4(165.42, -3223.05, 5.89, 352.79)
}
```

> The system automatically checks if a spawn point is blocked before spawning.

### Adding a Custom Vehicle

```
['custom_truck'] = {
    id = 'custom_truck',
    label = 'Custom Truck',
    model = 'your_model',
    requiredLevel = 8,
    rentPrice = 1500,
    maxCargo = 1200,
    speed = 'Fast',
    routeType = 'small'
}
```

⚠️ Make sure to add the vehicle model to `Config.VehicleTypes`:

```
Config.VehicleTypes = {
    ['your_model'] = 'small',  -- Add this
}
```


---

# 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/vehicles.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.
