# General Configuration

This guide will help you configure the script to suit your needs, covering all available options in the `config.lua` file. Each setting is explained step by step.

***

### **1. General Configuration**

#### **Language**

Set the language used by the script.

```lua
Config.Language = 'en' -- Available options: 'en' (English), 'fr' (French)
```

***

#### **Use Outdated Version**

Enable this option to suppress alert messages when using an older version of the script.

```lua
Config.UseOutdatedVersion = false -- Set to true if using an outdated script version.
```

***

### 2. Framework Compatibility

```lua
Config.ESX = false
Config.QB = false
```

Enable compatibility with **ESX** or **QBCore** frameworks.\
Set to `true` if you want to restrict interactions (e.g., water drop, siren control) to specific jobs defined under each plane (see `manageJobs` under the plane config).

***

### 3. Aircraft Configuration

Create as many aircraft entries as you want using their in-game model names.

```lua
Config.Plane = {
    [`cl415`] = {
        waterScale = 15.0,
        manageJobs = {'pilot'},
        manageSeat = {-1, 0},
        siren = {
            enabled = true,
            soundName = 'yelp',
            distance = 300.0
        },
        capacity = 2000,
        pumpPower = 8.0,
        waterDischargePower = 4.0
    }
}
```

* `waterScale`: Size of the water drop visual effect.
* `manageJobs`: Restrict control to jobs (only applies if ESX or QB is enabled).
* `manageSeat`: Determines which seats can operate the system. `-1` is the driver seat.
* `siren`:
  * `enabled`: Enables or disables the water drop siren.
  * `soundName`: Name of the siren sound played.
  * `distance`: Maximum distance where the siren is audible.
* `capacity`: Total water tank capacity in liters.
* `pumpPower`: Speed at which water is pumped into the tank.
* `waterDischargePower`: Flow rate of the water during drop.

***

#### 4. HUD Display

```lua
Config.HUD = {
    Text = true,
    NUI = true
}
```

* `Text`: Displays 3D text above the aircraft (example: tank quantity, instructions).
* `NUI`: Enables a HUD in the bottom-right of the screen.

***

### 5. Fire Compatibility

Compatibility with external fire systems.

```lua
Config.Fires = {
    SmartFires = {
        enabled = false,
        name = 'SmartFires',
        detectionRadius = 30.0,
        healthSpeed = 8.0
    },
    ToxicFire = {
        enabled = false,
        name = 'firescript',
        detectionRadius = 30.0,
        healthSpeed = 8.0
    },
    zFire = {
        enabled = false,
        name = 'z_fire',
        detectionRadius = 30.0,
        healthSpeed = 8.0
    }
}
```

* `enabled`: Enables compatibility with the fire system.
* `name`: Name of the resource used in your server.
* `detectionRadius`: Radius in meters around the fire where drops are registered.
* `healthSpeed`: Speed at which the fire health decreases with each drop.

{% hint style="danger" %}
**Note:** Only one system should be enabled at a time.
{% endhint %}

***

### 6. Particle Effects

Customize the visual effects for water and vapor sprays.

```lua
Config.Effect = {
    water = {
        dict = "core",
        name = "water_cannon_jet"
    },
    vapor = {
        dict = "core",
        name = "ent_amb_smoke_gaswork"
    }
}
```

* `dict`: Dictionary (resource) of the particle effect.
* `name`: Particle effect name used for visual immersion.

***

### **6. Key Bindings**

#### **Keys for Interactions**

```lua
Config.Keys = {
    DropWaterKey = 306, -- Key to drop water
    DropWaterKeyString = '~INPUT_REPLAY_ENDPOINT~', -- Key string to drop water

    SirenKey = 86, -- Key to activate the siren
    SirenKeyString = '~INPUT_VEH_HORN~' -- Key string to activate the siren
}
```

*Refer to the* [*FiveM Control Reference*](https://docs.fivem.net/docs/game-references/controls/) *for a list of control codes.*

***

### **7. Language Library**

Edit the text displayed for different actions in multiple languages.
