Exports and events

Start a fire from your own resource

TriggerEvent("FireScriptV2:StartFireExternal", x, y, z, flames, spread, firetype, location)
TriggerEvent("FireScriptV2:StartFireExternal", 100.0, 200.0, 30.0, 20, 5, "chemical", "Refinery")

Feed live wind and weather in

TriggerEvent('FireScriptV2:SetWind', directionDegrees, strength0to1)
TriggerEvent('FireScriptV2:SetWeatherWet', true)
TriggerEvent('FireScriptV2:SetWind', 270.0, 0.8)
If a weather resource is pushing values in with SetWeatherWet, turn Config.Weather.AutoDetect off or the two will fight.

Read the current wind

local wind = exports.firescriptv2:GetWind()
-- { degrees, strength, wet }

Put fires out from your own script

Raise this client-side and any burning flame inside the radius is knocked down:

TriggerEvent('FireScriptV2:WaterHit', x, y, z, radius)

This is exactly how Fire Hose V2 does it — the hose raises FireHoseV2:WaterHit on every client for every sprayer, and FireScript listens. That single event is the whole contract between the two resources.

Whether a knocked-down flame flares back up is a roll the server makes, so everyone sees the same result at the same moment.

Send calls to another dispatch system

Config.Dispatch.External in config.lua is a server-side function called once for every new dispatch call, after the de-dupe. Call your dispatch resource's own server export or event inside it:

Config.Dispatch.External = function(call)
    -- call.id, call.type ("fire" / "incident"), call.label, call.coords (vector3),
    -- call.fires, call.fireId, call.incidentId
    TriggerEvent("your_dispatch:server:newCall", {
        title = call.type == "incident" and "Fire incident" or "Structure fire",
        message = call.label,
        coords = call.coords,
        jobs = { "fire" },
    })
end

An error inside your function is printed to the server console and never stops FireScript's own call. If your dispatch only accepts calls from a client, forward the call to one from here with your own event.

Can't find what you need? Ask on Discord — response in under 5 hours.