# Configuration

## LANGUAGE

The active locale name.

```lua
LANGUAGE = 'en'
```

## POLICE\_REQUIRED

The amount of cops required to be online.

```lua
POLICE_REQUIRED = 0
```

## ROBBERY\_INTERVAL

The time to wait between two train heists.

```lua
ROBBERY_INTERVAL = 2*60*60000 -- 2 Hours
```

## BREAK\_ITEM

The name of the item required to break in the containers.

```lua
BREAK_ITEM = "grinder"  -- Required item to break into containers.
```

## QB\_MAX\_WEIGHT

The player's inventory maximum weight.\
\&#xNAN;*This is only for QB-Core users.*

```lua
QB_MAX_WEIGHT = 120000 -- Only For QB-Core
```

## LOOT

The loot configuration.

* `item`: **string**, item name.
* `stack`: **integer**, amount of item earned per stack.
* `price`: **integer**, item's selling price.

```lua
LOOT = {
    item = "gold_ingot",    -- Item Name
    stack = 25,             -- Amount of gold ingots grabbed per stack
    price = 300             -- Selling price
}
```

## START\_SCENE

The starting scene configuration.

* `enable`: **boolean**, enables the start scene. This can be disabled to start the train heist from the event: `exp_trainheist:StartHeist`
* `ped`:
  * `model`: **string**, ped's model name ([See the list of ped models](https://docs.fivem.net/docs/game-references/ped-models/))
  * `coords`: **vector3**, ped's world position.
  * `heading`: **number**, ped's heading.

```lua
START_SCENE = {
    enable = true,
    ped = {
        model = "s_m_m_highsec_01",
        coords = vector3(-687.82, -2417.1, 12.9445),
        heading = 320.78
    }
}
```

## GUARDS

The guards configuration.

* `models`: **table**, list of strings, ped model names. ([See the list of ped models](https://docs.fivem.net/docs/game-references/ped-models/))
* `amount`: **integer**, amount of guards to spawn.
* `spawn_range`: **number**, maximum distance from the train center to spawn guards.
* `weapons`: **table**, list of strings, weapon model names. ([See the list of weapon models](https://forge.plebmasters.de/weapons))
* `armour`: **number** (0-100), amount of armor given to guards.
* `accuracy`: **number** (0-100), level of accuracy for the guards.

```lua
GUARDS = {
    models = {
        "s_m_y_blackops_01"
    },
    amount = 15,
    spawn_range = 30.0,
    weapons = {
        "WEAPON_PISTOL"
    },
    armour = 50,
    accuracy = 50
}
```

## TRAIN

The train configuration.

* `position`: **vector3**, locomotive's world position.
* `heading`: **vector3**, locomotive's heading.
* `length`: **integer**, number of train parts (without the locomotive).
* `angle`: **number**, pitch of the train. Useful for hills.

```lua
TRAIN = {
    position = vector3(-3.21, 3441.62, 49.58),
    heading = 59.28,
    length = 5,
    angle = 1.0
}
```

## TRAIN\_PARTS

The list of train part vehicle models.\
\&#xNAN;*"freightcar" is the model used to spawn containers. Putting it in the list allows the train to have multiples freightcar parts, instead of just one.*

```lua
TRAIN_PARTS = {"freightcar", "freightcont1", "freightcont2", "freightgrain", "tankercar"}
```


---

# 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://gtadocs.gta-explore.com/train-heist/configuration.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.
