# Configuration

This page explains **every section** of the `config.lua` file for **Advanced Firefighter Multiplayer Job Simulator**, allowing you to fully customize the script to fit your server.

***

### File Overview

**File:** `config.lua`\
**Purpose:** Controls frameworks, inventories, missions, NPCs, vehicles, tools, animations, UI behavior, and gameplay logic.

> ⚠️ Always restart the resource or the server after modifying this file.

***

### Framework & Integration Settings

```lua
Config.Bridge = {
    framework = 'auto',
    inventory = 'auto',
    target = 'auto',
    notify = 'auto'
}
```

#### Options Explained

| Option      | Description                                                 |
| ----------- | ----------------------------------------------------------- |
| `framework` | Core framework (`qb`, `esx`, `standalone`, `auto`)          |
| `inventory` | Inventory system (`ox`, `qb`, `standalone`, `auto`)         |
| `target`    | Targeting system (`ox_target`, `qb-target`, `standalone`)   |
| `notify`    | Notification system (`qb`, `esx`, `okok`, `tablet`, `auto`) |

✅ **Recommended:** Keep everything on `auto` unless you use a custom system.

***

### Language & Debug

```lua
Config.language = English
Config.debug = false
```

#### Supported Languages

* English
* French
* Spanish
* German
* Arabic
* Chinese

#### Debug Mode

* `true` → Shows detailed logs
* `false` → Recommended for live servers

***

### Job & NPC Settings

```lua
Config.UseJob = false
Config.JobName = 'firefighter'
```

* If `UseJob = true`, **only players with the job** can use the script
* Works with ESX & QBCore jobs

***

### Clock-In NPCs

```lua
Config.ClockInPeds = { ... }
```

Each NPC includes:

* Ped model
* Coordinates
* Idle animation
* Map blip

Used for:

* Clocking in/out

***

### Static Firetrucks

```lua
Config.StaticFiretrucks = { ... }
```

These are **decorative firetrucks which will be usied for the job after requesting a vehicle** parked at stations.

| Option       | Description                 |
| ------------ | --------------------------- |
| `model`      | Vehicle model               |
| `equipments` | Enables hose & ladder props |
| `coords`     | Spawn position              |

***

### Fire Hydrants

```lua
Config.HydrantModels = {
    `prop_fire_hydrant_1`,
    `prop_fire_hydrant_2`,
    `prop_fire_hydrant_4`
}
```

Used for **refilling firetruck water tanks**.

***

### Mission System (Core Feature)

```lua
Config.Missions = { ... }
```

Each mission is **fully modular** and supports:

* Fires
* Rescue NPCs
* Vehicles
* CPR
* Extractions
* Animals
* Water rescues
* Aircraft & submarines

<i class="fa-note-sticky">:note-sticky:</i> You can add more missions to your preference.

***

#### Mission Structure

```lua
{
id = "building_fire",
        title = "TEQUI-LA-LA Fire",
        details = "The famous TEQUI-LA-LA bar is on fire! Get there fast and save anyone inside.",
        payout = {5000, 7000},
        coverImage = "building_fire.jpg",
        location = {
            center = vector4(-564.3700, 275.7020, 83.1059, 356.9714),
            fires = {
                {coords = vector3(-564.3700, 275.7020, 82.1059), size = 5}, {coords = vector3(-559.7264, 278.0800, 81.9765), size = 3},
                {coords = vector3(-560.1918, 279.6093, 81.7372), size = 5}, {coords = vector3(-558.5392, 282.7452, 81.1763), size = 3},
                {coords = vector3(-550.2381, 286.7725, 82.0152), size = 3, electric = true}, {coords = vector3(-556.6992, 291.2044, 81.7821), size = 3},
                {coords = vector3(-570.6660, 292.9890, 78.1767), size = 5}, {coords = vector3(-569.0521, 293.0618, 78.1766), size = 3},
            },
            rescue = {
                peds = {
                    { model = `a_m_m_polynesian_01`, coords = vector4(-558.5305, 282.7345, 82.1757, 211.8680), health = 0, rescueOptions = {[1] = "cpr", [2] = "carry"}, safeCoords = vector3(-571.6291, 273.5742, 82.9133) },
                    { model = `a_f_y_vinewood_04`, coords = vector4(-576.6285, 286.9007, 79.1766, 301.1328), animDict = "amb@code_human_cower@female@base", animName = "base", health = 200, rescueOptions = {[1] = "carry"}, safeCoords = vector3(-571.6291, 273.5742, 82.9133) },
                    { model = `ig_tracydisanto`, coords = vector4(-561.6536, 289.5649, 82.1763, 147.9575), animDict = "amb@code_human_cower@female@base", animName = "base", health = 200, rescueOptions = {[1] = "carry"}, safeCoords = vector3(-571.6291, 273.5742, 82.9133) },
                    { model = `a_f_y_tourist_02`, coords = vector4(-572.5610, 286.3310, 79.1767, 343.8062), animDict = "amb@code_human_cower@female@base", animName = "base", health = 200, rescueOptions = {[1] = "carry"}, safeCoords = vector3(-571.6291, 273.5742, 82.9133) },
                }
            },
        },
        tools = { "fireextinguisher", "fireextinguisher" }
    }
```

***

#### Fires

```lua
{ coords = vector3(x, y, z), size = 5, electric = true }
```

| Option     | Description             |
| ---------- | ----------------------- |
| `size`     | Fire intensity (1–10)   |
| `electric` | Requires power shutdown |

***

#### Rescue NPCs

```lua
rescueOptions = {
    [1] = "cpr",
    [2] = "carry"
}
```

Available actions:

* `carry`
* `cpr`
* `extract` (vehicles only)

NPCs can be:

* Alive
* Unconscious
* Animals
* Drowning
* Trapped in vehicles

***

#### Trapped Vehicle Victims

```lua
pedInside = {
    model = `a_f_y_business_01`,
    seat = -1,
    health = 0,
    rescueOptions = {"extract", "cpr", "carry"},
    doorIndex = 0
}
```

Requires:

* Crowbar
* Correct rescue sequence

***

#### Animal Rescue

Animals are handled automatically:

* No CPR
* Carry only
* Optional owner NPC

***

#### Water & Diving Missions

Supports:

* Oxygen tanks
* Diving gear
* Submarines
* Boats
* Rescue checkpoints

***

### Mission Tools

```lua
tools = {
    "fireextinguisher",
    "crowbar",
    "divinggear"
}
```

Tools are **granted automatically** at mission start.

Tools are granted to team host and then distribute them to team members to their preference.

***

### Inventory Item Mapping

```lua
Config.items = {
    tablet = 'firetablet',
    fireextinguisher = 'weapon_fireextinguisher',
    crowbar = 'weapon_crowbar',
    divinggear = 'diving_gear',
    oxygentank = 'diving_fill',
    parachute = 'parachute',
}
```

⚠️ **IMPORTANT**\
Item names **must match** your inventory system.

***

### Firetruck Water System

| Setting                    | Description           |
| -------------------------- | --------------------- |
| `FiretruckWaterCapacity`   | Max water             |
| `RefillTime`               | Hydrant refill time   |
| `RefillRange`              | Distance from hydrant |
| `FiretruckLaddersCapacity` | Ladder storage        |
| `FiretruckHosesCapacity`   | Hose storage          |

***

### Firefighter Uniforms

```lua
Config.Uniform = {
    male = { components = {...}, props = {...} },
    female = { components = {...}, props = {...} }
}
```

Fully customizable clothing & gear.

***

### Gameplay Timers

```lua
Config.EventCooldown = {min = 60000, max = 90000}
Config.JobAcceptTimeout = 300000
```

Controls:

* Mission frequency
* Acceptance timeout

***

### Animations

```lua
Config.Anims = { ... }
```

Includes:

* Carry
* CPR
* Door breaking
* Vehicle extraction
* Drowning
* Refill

All animations are **configurable**.

***

### UI & Tablet

```lua
Config.TabletModel = `prop_cs_tablet`
Config.TabletAnim = { ... }
```

Used for:

* Mission alerts
* Notifications
* Mission management

***

### Emergency Services

```lua
Config.ambulanceModel = `ambulance`
Config.doctorModel = `s_m_m_doctor_01`
```

Used during rescue completions.

***

### Advanced Settings

```lua
Config.HosePins = 45
Config.HoseSeg = 0.2
Config.serverCreation = false
```

`Config.HosePins` and `Config.HoseSeg` are used to increase the length of hose but it's recommended to not change these values.


---

# 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://enyo-scripts.gitbook.io/documentations/fivem-scripts/firefighter-multiplayer-job-simulator/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.
