Browse docs

Server: CreateFire(payload, creator)

Reference for Server: CreateFire(payload, creator) in firejob.

All exports

Optional developer integration. Call this export from a server script in your own resource after sky_firejob has started. For normal installation and gameplay, use Installation.

Server Exports

CreateFire(payload, creator)

Creates a regular synchronized fire with Firejob's normal spread, extinguishing, dispatch, effects, and lifecycle behavior.

Argument / payload fieldTypeRequired / defaultMeaning
payloadtableRequiredFire creation data
payload.coords{ x, y, z } or vector3RequiredWorld position with numeric coordinates
payload.typestring"trash"A configured fire profile or alias
payload.metadatatableOptionalOverrides for this fire, described below
creatornumber0Player server ID for creation/dispatch context, or 0 for a scripted incident

Common metadata fields are locationType ("interior" or "exterior"), sourceScale (scale multiplier), smokeDensity (0.0–1.0), material, scenePropsEnabled, and reignitable. Reignition overrides include reignitionEnabled, reignitionChancePercent, and reignitionDelaySeconds. Omitted settings follow the fire profile and Firejob configuration.

The export returns one table:

  • Success: success = true, fireId (number), type (string), and label (string).
  • Failure: success = false and error (string). Possible errors are invalid_payload, invalid_coords, invalid_fire_type, and create_failed.
-- server.lua; choose coordinates appropriate for your incident.
local result = exports["sky_firejob"]:CreateFire({
    type = "trash",
    coords = { x = 215.0, y = -810.0, z = 30.0 },
    metadata = {
        locationType = "exterior",
        sourceScale = 1.0,
        smokeDensity = 0.8,
        scenePropsEnabled = false
    }
}, 0)

if not result.success then
    print(("Could not create fire: %s"):format(result.error))
    return
end

local fire_id = result.fireId
print(("Created fire %s (%s)"):format(fire_id, result.type))

Creation notifications are silent by default. Set metadata.silent = false and supply a player creator to send the normal creation notification. fireId identifies a Firejob fire; it is not a vehicle network ID or an oil spill ID. Regular fires follow Firejob's extinguishing and configured expiry lifecycle; this page does not provide a RemoveFire export.