# Exports

## Client

This is used for fire targeting, which allows you to use external scripts to attack fires.

#### exports.pickle\_firefighterjob:EnableFireTarget(damagePerTick, attackFunction)

```lua
local damagePerTick = 0.1 -- This is how much to damage the fire while attacking.
local range = 10.0 -- Effective range for putting out fires.
exports.pickle_firefighterjob:EnableFireTarget(damagePerTick, function(index, dist)
    return dist < range and IsDisabledControlPressed(1, 24)
end)
```

#### exports.pickle\_firefighterjob:DisableFireTarget()

This is used for when you want to disable fire targeting.

<pre class="language-lua"><code class="lang-lua"><strong>exports.pickle_firefighterjob:DisableFireTarget()
</strong></code></pre>

#### exports.pickle\_firefighterjob:IsFireTargetActive()

This is used for when you want to check if fire targeting is active.

<pre class="language-lua"><code class="lang-lua"><strong>if (exports.pickle_firefighterjob:IsFireTargetActive()) then 
</strong><strong>    print("Target is active!")
</strong>end
</code></pre>

## Server

#### exports.pickle\_firefighterjob:StartFire(coords, (opt) data)

This is used to start a fire, data will allow you to use custom fire data.

<pre class="language-lua"><code class="lang-lua"><strong>local coords = vector3(0.0, 0.0, 0.0)
</strong><strong>local data = {
</strong>    flame = {
        dict = "core",
        particle = "fire_object",
        stack = 3,
        height = 0.4,
        scale = 3.0,
        fireRadius = 1.25,
    },
    smoke = {
        dict = "des_gas_station",
        particle = "ent_ray_paleto_gas_plume_L",
        stack = 3,
        height = 6.0,
        scale = 1.0,
    }
}
local index = exports.pickle_firefighterjob:StartFire(coords, data)
print("Fire Index:", index)
</code></pre>

#### exports.pickle\_firefighterjob:RemoveFire(index)

This is used to remove a fire using the index.

```lua
local index = 10
exports.pickle_firefighterjob:RemoveFire(index)
```

#### exports.pickle\_firefighterjob:StartScenario(index)

This is used to start a scenario using the scenario index.

```lua
local index = 1
exports.pickle_firefighterjob:StartScenario(index)
```

#### exports.pickle\_firefighterjob:StopScenario()

This is used to stop the active fire scenario.

```lua
exports.pickle_firefighterjob:StopScenario()
```
