Developer Exports
This page serves to outline and explain the functions offered by Zea Developments' z_fire resource. These functions are designed for the purpose of collecting existing data or storing new data.
Client Exports
IsEntityOnFire
Description: Returns a boolean indicating whether the specified entity currently has an active fire attached to it.
Parameters:
entity_handle
(integer) – The entity handle to check for an active fire.
Returns:
success
(boolean) – true
if the entity is on fire, false
otherwise.
Example:
deleteFires
Description: Removes the specified fire(s) from the world using their unique identifiers.
Parameters:
fire_ids
(table) – A table containing one or more fire IDs to delete.
Returns:
success
(boolean) – true
if the fires were successfully deleted, false
otherwise.
Example:
deleteFireById
Description: Removes a single fire instance from the world using its unique identifier.
Parameters:
fire_id
(string) – The unique ID of the fire to delete.
Returns:
success
(boolean) – true
if the fire was successfully deleted, false
otherwise.
Example:
deleteSmokeById
Description:
Deletes a smoke effect using its unique identifier. Returns true
if the smoke was successfully removed, or false
if the ID is invalid.
Parameters:
smoke_id
(string) – The unique ID of the smoke to delete.
Returns:
success
(boolean) –true
if the smoke was successfully deleted,false
otherwise.
Example:
getFiresInRange
Description: Returns a table of all active fires located within a specified distance from a given world position. If no fires are found, an empty table is returned.
Parameters:
world_pos
(vector3) – The world position to search from.range
(number) – The radius (in meters) to search for fires around theworld_pos
.
Returns:
found_fires
(table) – A table containing fire IDs of all fires found within the specified range.
Example:
getSmokeInRange
Description: Returns a table of all active smoke effects located within a specified distance from a given world position. If no smoke is found, an empty table is returned.
Parameters:
world_pos
(vector3) – The center world position to search from.range
(number) – The radius (in meters) to search for smoke around theworld_pos
.
Returns:
found_smoke
(table) – A table containing smoke IDs of all smoke effects found within the specified range.
Example:
getClosestFire
Description: Finds and returns the closest active fire to the specified world position. If a fire is found, the function returns its ID, associated data, and distance from the given position.
Parameters:
world_pos
(vector3) – The world position to search from.
Returns:
fire_id
(string or nil) – The ID of the closest fire, ornil
if none found.fire_data
(table or nil) – The fire’s associated data, ornil
if none found.distance
(number or nil) – The distance to the closest fire, ornil
if none found.
Example:
getClosestSmoke
Description: Finds and returns the closest active smoke effect to the specified world position. If smoke is found, the function returns its ID, associated data, and distance from the given position.
Parameters:
world_pos
(vector3) – The world position to search from.
Returns:
smoke_id
(string or nil) – The ID of the closest smoke, ornil
if none found.smoke_data
(table or nil) – The smoke’s associated data, ornil
if none found.distance
(number or nil) – The distance to the closest smoke, ornil
if none found.
Example:
setPlayerDuty
Description: Sets the player's duty status for a specified department. Validates input and triggers a server event if the data is correct.
Parameters:
duty_status
(boolean) – Whether the player should be set on duty (true
) or off duty (false
).department_abbr
(string) – The abbreviated name of the department to set duty for (must match a configured department).
Returns:
success
(boolean) – Returnstrue
if the request was valid and the duty change event was triggered,false
otherwise.
Example:
createFire
Description:
Creates a new fire instance in the world using the provided fire data. Supports multiple fire behavior types including structure, grass, prop, and vehicle fires. When targeting an entity (e.g., vehicle or prop), the fallbackPos
field is required.
Parameters:
fire_data
(table) – A table defining the fire's particle data, behavior, and additional options. •ptfxData
(table) – Particle effect data -type
(string) – The particle effect type (e.g.,"normal2"
) -pos
(vector3) – The position or offset for the fire -scale
(number) – The scale of the fire effect -fallbackPos
(vector3) – Required for props and vehicles; world coordinates fallback •behaviourType
(string) – Type of fire ("interior"
,"grass"
,"prop"
, or"vehicle"
) •canSpread
(boolean) – Whether the fire can spread •spreadSize
(number) – The radius the fire can spread to •burnoutTime
(number) – Time (in seconds) before the fire burns out •roomHash
(integer) – (Only for interior fires) Room hash for spreading logic •networkEntity
(integer) – (Only for prop/vehicle fires) Entity to attach the fire to •origin
(table) – Origin metadata -is
(boolean) – Whether this is the origin fire -id
(string or nil) – The ID of the origin fire, if any
Returns:
uuid
(string or nil) – A unique identifier for the created fire, ornil
if creation failed.
Examples:
createSmoke
Description: Creates a smoke effect in the world using the provided data. Can optionally attach the smoke to a networked entity and configure dispersal behavior.
Parameters:
smoke_data
(table) – A table defining the smoke’s particle data and behavior: •ptfxData
(table) – Particle effect data -type
(string) – The particle effect type (e.g.,"linger1"
) -pos
(vector3) – The position where the smoke should spawn -scale
(number) – The scale of the smoke effect •networkEntity
(integer or nil) – Optional networked entity ID to attach the smoke to •canDisperse
(boolean) – Whether the smoke is allowed to disperse over time
Returns:
uuid
(string or nil) – A unique identifier for the smoke effect, ornil
if creation failed.
Example Usage:
Server Exports
isPlayerOnDuty
Description: Checks whether a specified user (by source ID) is currently marked as on duty in any registered department.
Parameters:
source_user
(integer) – The server ID of the player to check.
Returns:
is_on_duty
(boolean) – Returnstrue
if the player is currently on duty,false
otherwise.
Example:
setPlayerDuty
Description: Sets or removes a player's duty status for a given department. Returns a boolean indicating success or failure, and an optional status code describing the result.
Parameters:
source_id
(string) – The server ID of the player.department_abbr
(string) – The abbreviated name of the department.set_status
(boolean) –true
to place the player on duty,false
to remove them from duty.
Returns:
success
(boolean or nil) –true
if the operation was successful,nil
otherwise.code
(integer) – A status code providing context about the result.
Status Codes:
0
Operation successful
1
Department not found
2
Player was not on duty when trying to remove
3
Player is already on duty in another dept
createFire
Description:
Creates a fire instance in the world using the provided configuration. If a valid source
(player ID) is not provided, the system will select a random valid player to associate with the fire. This function supports all behavior types, including interior, grass, prop, and vehicle fires.
Parameters:
fire_data
(table) – A structured table defining the fire's appearance and behavior.source
(integer) – (Optional) The source player ID. Ifnil
or-1
, the system automatically assigns a random valid player with a working ping.
Returns:
uuid
(string or nil) – The unique identifier for the created fire, ornil
if creation failed.
fire_data Table Structure:
ptfxData
table
Particle effect data:
- type
(string) – Particle type, e.g., "normal2"
- pos
(vector3) – Position or offset for the fire
- scale
(number) – Scale of the particle effect
- fallbackPos
(vector3) – Required for prop
and vehicle
types; world position fallback
behaviourType
string
One of: "interior"
, "grass"
, "prop"
, or "vehicle"
canSpread
boolean
Whether the fire can spread
spreadSize
number
The radius for potential spread
burnoutTime
number
Time in seconds until the fire auto-extinguishes
roomHash
integer
(For interior fires only) GTA room hash
networkEntity
integer
(For prop/vehicle fires) The network entity ID
origin
table
Origin info:
- is
(boolean) – Whether this is an origin fire
- id
(string or nil) – Parent fire ID if applicable
Examples:
createSmoke
Description: Creates a smoke effect in the world using the provided configuration. Can optionally be attached to a networked entity and supports automatic dispersal over time.
Parameters:
smoke_data
(table) – Configuration table for the smoke instance. •ptfxData
(table) – Particle effect data: -type
(string) – The particle effect type (e.g.,"linger1"
) -pos
(vector3) – World position to spawn the smoke -scale
(number) – Scale of the smoke effect •networkEntity
(integer or nil) – Optional networked entity ID to attach the smoke to •canDisperse
(boolean) – Whether the smoke is allowed to disperse over time
Returns:
uuid
(string or nil) – A unique identifier for the created smoke effect, ornil
if creation failed.
Example:
extinguishFire
Description: Extinguishes the specified fires by their unique IDs. Triggers the internal extinguishment logic and removes the fire effects from the world.
Parameters:
fires_to_extinguish
(table) – A table containing one or more fire IDs to extinguish.
Returns:
(none) – This export does not return a value.
Example:
getAllFires
Description: Returns a table containing all currently active fires tracked by the system.
Returns:
fires
(table) – A table of all active fire instances. Each entry typically includes metadata such as ID, position, behavior type, and more.
Example:
getAllFires
Description: Returns a table containing all currently active fires tracked by the system.
Returns:
fires
(table) – A table of all active fire instances. Each entry typically includes metadata such as ID, position, behavior type, and more.
Example:
GetFiresInRange
Description:
Returns a list of all active fires located within a specified range of a world position. Fires attached to entities will use their fallbackPos
for distance calculation.
Parameters:
world_position
(vector3) – The central position from which to search for nearby fires.range
(number) – The radius (in meters) to search within. Defaults to5.0
if not specified.
Returns:
detected_fires
(table or nil) – A table of fires within range. Each entry includes: -id
(string) – The unique ID of the fire -data
(table) – The full fire data table associated with that fire
Example:
deleteFires
Description:
Deletes multiple fires from the world using a table of fire entries. Accepts a table where each item contains a fire id
field.
Parameters:
fire_table
(table) – A table of fire entries to delete. Each entry must include anid
field (usually returned bygetFiresInRange
, etc.).
Returns:
success
(boolean) –true
if the input was valid and the delete event was triggered,false
otherwise.
Example:
getAllSmoke
Description: Returns a table containing all currently active smoke effects tracked by the system.
Returns:
smoke_table
(table) – A table of all active smoke instances. Each entry typically includes the smoke's ID, particle data, attachment info, and behavior settings.
Example:
getSmokeInRange
Description: Searches for and returns all smoke effects located within a specified range of a world position.
Parameters:
world_position
(vector3) – The center point of the search area.range
(number) – The radius (in meters) to search. Defaults to5.0
ifnil
.
Returns:
detected_smoke
(table or nil) – A table of smoke entries found within the given range. Each entry contains: -id
(string) – The unique ID of the smoke -data
(table) – The full data structure for that smoke effect
Example Usage:
Last updated