### Complete Environmental Lighting Configuration Example (Lua) Source: https://docs.zeadevelopment.com/our-resources/z_els/resource-configuration This comprehensive Lua example demonstrates a full environmental lighting configuration for a single extra. It includes settings for 'types', 'rgb', 'distance', 'brightness', 'radius', and 'falloff', providing a template for detailed customization. ```lua ['envLighting'] = { -- * Extra Start (extra_1) * -- [1] = { types = {'backward_rearLeft', 'diagonal_frontLeft', 'front_sideLeft'}, rgb = {0, 0, 255}, distance = 50.0, brightness = 0.9, radius = 45.0, falloff = 150.0 }, -- * Extra End (Ensure that the closing bracket has a comma)* -- } ``` -------------------------------- ### Configure Department JSON Example Source: https://docs.zeadevelopment.com/our-resources/z_fire/json-configuration Example of a departments.json file structure. It defines a department with properties like district, shortCode, name, description, minimum staff online, incident intervals, framework configurations, icon, color, and a unique ID. ```json { "LSCFD": { "district": "district_index_1", "shortCode": "LSCFD", "name": "Los Santos City Fire Department", "description": "Fire department for the City of Los Santos 2", "minStaffOnline": 1, "interval": { "min": 10, "max": 60 }, "frameworks": { "ESX": { "enabled": true, "jobs": [ "Fire" ], "autoBook": true } }, "icon": "fa-house", "color": "#ff5733", "id": "department_index_1" } } ``` -------------------------------- ### Lua Multiple Ladder Types Vehicle Configuration Example Source: https://docs.zeadevelopment.com/our-resources/z_ladders/resource-configuration/configuring-vehicle Demonstrates configuring a vehicle to support multiple types of ladders. This example shows how to define different ladder types, their respective quantities, and unique placement offsets for each. ```lua return { ["9"] = { offset = vector3(0.91, -4.54, 2.45), amount = 2, }, ["105"] = { offset = vector3(0.02, -4.51, 2.39), amount = 2, } } ``` -------------------------------- ### Configure District JSON Example Source: https://docs.zeadevelopment.com/our-resources/z_fire/json-configuration Example of a districts.json file structure. It defines a district with properties including description, color, name, and a unique ID. This ID is used to link departments to specific districts. ```json { "district_index_1": { "description": "City of Los Santos", "color": "#3366ff", "name": "Los Santos City", "id": "district_index_1" } } ``` -------------------------------- ### Customize Commands (Lua) Source: https://docs.zeadevelopment.com/our-resources/z_fire/resource-configuration Defines commands available to users, including their names, descriptions, parameters, and cooldown periods. This example shows the configuration for the 'deletesmoke' command. ```lua ['deleteSmoke'] = { command = 'deletesmoke', description = 'Delete a existing smoke.', parameters = { ['range'] = { name = "Range", help = "| 0 - 100 |" } }, cooldown = 3000 }, ``` -------------------------------- ### Define Resource Models - Lua Source: https://docs.zeadevelopment.com/our-resources/z_ppvfan/resource-configuration Specifies the models used by the resource. This allows mapping internal names to actual game model names. The example maps 'ppv_fan' to the 'zea_ppvfan' model. ```lua cfg.models = { ['ppv_fan'] = `zea_ppvfan` } ``` -------------------------------- ### Lua Single Ladder Type Vehicle Configuration Example Source: https://docs.zeadevelopment.com/our-resources/z_ladders/resource-configuration/configuring-vehicle An example illustrating how to configure a vehicle to carry a single type of ladder. It specifies the ladder type ID, the quantity, and the precise offset for interaction. ```lua return { ["9"] = { offset = vector3(0.94, -3.54, 1.16), amount = 1, }, } ``` -------------------------------- ### Ladder '105' Configuration (Lua) Source: https://docs.zeadevelopment.com/our-resources/z_ladders/resource-configuration/configuring-ladders Configuration for a mid-sized ladder type ('105') that supports modular extension. It includes base, middle, end sections, and a full prop, with example hash models and attachment bone indices. ```lua ["105"] = { _base = { ... }, _middle = { ... }, _end = { ... }, _full = { ... } } -- hash examples: 105base, 105mid, 105end, 105full -- attach.bone: 20 for middle and end, 28422 for full prop ``` -------------------------------- ### Set Resource Keybinds - Lua Source: https://docs.zeadevelopment.com/our-resources/z_ppvfan/resource-configuration Allows customization of key bindings for resource interactions. Keys are configured as string values, referencing FiveM's control list. This example sets the 'toggle_power' action to the 'E' key. ```lua cfg.keybinds = { toggle_power = 'E', } ``` -------------------------------- ### Customize Resource Commands - Lua Source: https://docs.zeadevelopment.com/our-resources/z_ppvfan/resource-configuration Allows customization of resource commands, including their name, description, and cooldown period. The cooldown is specified in milliseconds, with 0 disabling it. This example defines a 'spawnFan' command. ```lua ['spawnFan'] = { command = 'spawnFan', description = 'Spawn a PPV Fan.', cooldown = 3000 --@comment: In Miliseconds } ``` -------------------------------- ### Configure zWigWags Integration with Lua Source: https://docs.zeadevelopment.com/our-resources/zturnout-system/resource-configuration This Lua configuration enables integration with zWigWags for station mobilization alerts. It defines wigwag group IDs and turnout system configurations, linking station details to specific wigwag setups. Ensure that the block numbers in `cfg.turnoutSystems` match the intended wigwag group IDs in `cfg.wigwagGroups` for proper functionality. ```lua -- // zWigWags: Config.lua cfg.wigwagGroups = { -- BLOCK START -- [1] = { { coordinates = vector3(0.0, 0.0, 0); rotation = vector3(0.0, 0.0, 0); stopRadius = 15.0 }; { coordinates = vector3(0.0, 0.0, 0); rotation = vector3(0.0, 0.0, 0); stopRadius = 15.0 } }; -- BLOCK END -- } -- // zTurnout-System : Config.lua cfg.turnoutSystems = { -- BLOCK START -- [1] = { stationName = 'Bolton Central Fire Station'; stationCallsign = 'G50'; -- / Station Appliances: ['stationAppliances'] = { 'G50P1'; 'G50P2'; }; -- / Countertop Location: ['counterLocation'] = { coordinates = vector3(0.0, 0.0, 0.0); rotation = vector3(0.0, 0.0, 0.0) }; -- / Printer Location: ['printerLocation'] = { coordinates = vector3(0.0, 0.0, 0.0); rotation = vector3(0.0, 0.0, 0.0) }; -- / lollipop Settings: ['lollipopSettings'] = { allow = true; coordinates = vector3(0.0, 0.0, 0.0); rotation = vector3(0.0, 0.0, 0.0); colours = { ['BLUE'] = 'G50P1'; ['AMBER'] = 'G50P2'; ['RED'] = ''; ['GREEN'] = ''; ['WHITE'] = ''; }; displayTime = 30 }; -- / Speaker Settings: ['speakerSettings'] = { coordinates = vector3(0.0, 0.0, 0.0); soundFile = 'LIFERISK'; distance = 25.0 }; }; -- BLOCK END -- } ``` -------------------------------- ### Set RGB Color for Environmental Lighting (Lua) Source: https://docs.zeadevelopment.com/our-resources/z_els/resource-configuration This Lua example shows how to define the 'rgb' color parameter for environmental lighting. The 'rgb' value is a table containing three integers representing the red, green, and blue components of the desired color. ```lua ['envLighting'] = { -- * Extra Start (extra_1) * -- [1] = { types = {'backward_rearLeft', 'diagonal_frontLeft', 'front_sideLeft'}, rgb = {0, 0, 255}, }, -- * Extra End (Ensure that the closing bracket has a comma)* -- } ``` -------------------------------- ### Configure Ladder Placement Options Source: https://docs.zeadevelopment.com/our-resources/z_ladders/resource-configuration Defines how ladders are placed in the game environment. Options include using a Gizmo tool for precise placement ('useGizmo') and displaying a visual indicator on the ground before placement ('placementIndicator'). ```lua ---@section LadderPlacement cfg.LadderPlacement = { useGizmo = false, placementIndicator = true } -- Enables the Gizmo tool for placement useGizmo = true -- Shows a visual guide on the ground placementIndicator = true ``` -------------------------------- ### Configure Turnout System Station in Lua Source: https://docs.zeadevelopment.com/our-resources/zturnout-system/resource-configuration This Lua code snippet demonstrates how to configure a single turnout system station within the cfg.turnoutSystems configuration. It includes details for station name, callsign, appliances, and various locations like countertop and printer, along with lollipop and speaker settings. Ensure unique IDs for each station block. ```lua cfg.turnoutSystems = { -- BLOCK START -- [1] = { stationName = 'Bolton Central Fire Station'; stationCallsign = 'G50'; -- / Station Appliances: ['stationAppliances'] = { 'G50P1'; 'G50P2'; }; -- / Countertop Location: ['counterLocation'] = { coordinates = vector3(0.0, 0.0, 0.0); rotation = vector3(0.0, 0.0, 0.0) }; -- / Printer Location: ['printerLocation'] = { coordinates = vector3(0.0, 0.0, 0.0); rotation = vector3(0.0, 0.0, 0.0) }; -- / lollipop Settings: ['lollipopSettings'] = { allow = true; coordinates = vector3(0.0, 0.0, 0.0); rotation = vector3(0.0, 0.0, 0.0); colours = { ['BLUE'] = 'G50P1'; ['AMBER'] = 'G50P2'; ['RED'] = ''; ['GREEN'] = ''; ['WHITE'] = ''; }; displayTime = 30 }; -- / Speaker Settings: ['speakerSettings'] = { coordinates = vector3(0.0, 0.0, 0.0); soundFile = 'LIFERISK'; distance = 25.0 }; }; -- BLOCK END -- } ``` -------------------------------- ### Initialize Environmental Lighting Table (Lua) Source: https://docs.zeadevelopment.com/our-resources/z_els/resource-configuration This code snippet shows the basic structure for initializing the 'envLighting' table in a Lua configuration file. It serves as a placeholder before defining specific lighting configurations for different vehicle extras. ```lua ['envLighting'] = { -- Table Contents } ``` -------------------------------- ### Get Unique Id Source: https://docs.zeadevelopment.com/our-resources/z_taser/developer-resources/client-exports Returns a string value, which serves as a unique identifier for the user's taser. ```APIDOC ## Get Unique Id ### Description This export will return a string value, which serves as a unique identifier for the user's taser. No other taser will share this identifier within the same session. ### Method EXPORTS ### Endpoint `exports["z_taser"]:getUniqueId()` ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - None ### Request Example ```lua exports["z_taser"]:getUniqueId() ``` ### Response #### Success Response (200) - **uniqueId** (string) - A unique identifier for the taser. #### Response Example ```json { "uniqueId": "taser_abc123" } ``` ``` -------------------------------- ### Define Lighting Pattern Sequence (Lua) Source: https://docs.zeadevelopment.com/our-resources/z_els/creating-patterns This snippet shows how to populate a newly created pattern table with a sequence of light activations and delays. Each table within the pattern defines a single flash, specifying which extras to activate and for how long. ```lua patterns['rearReds'] = { -- Table Start -- ['Slow-Reds'] = { { activate = {7}, delay = 250 }, { activate = {}, delay = 75 }, { activate = {9}, delay = 250 }, { activate = {}, delay = 75 }, }, -- Table End -- -- Table Start -- ['PATTERN_NAME'] = { { activate = {1, 2}, delay = 250 }, { activate = {}, delay = 75 }, { activate = {3, 4}, delay = 250 }, { activate = {}, delay = 75 }, }, -- Table End -- } ``` -------------------------------- ### Configure Interaction System Settings (Lua) Source: https://docs.zeadevelopment.com/our-resources/z_taser/resource-configuration This Lua code snippet defines the configuration table for the interaction system. It allows enabling/disabling the system, setting keybinds, controlling hint visibility, adjusting camera distance for interaction radius, and defining color themes for the UI. ```lua ---@section InteractionThemes cfg.InteractionSystem = { use = true, use_keybind = false, use_hints = true, camera_distance = 0.05, themes = { main_theme = "rgba(0, 168, 255, 0.7)", text_theme = "#f8f8f8", stroke_theme = "#f8f8f8", } } ``` -------------------------------- ### Get Cartridge Count Source: https://docs.zeadevelopment.com/our-resources/z_taser/developer-resources/client-exports Returns an integer value indicating the number of cartridges currently loaded in the user's taser. ```APIDOC ## Get Cartridge Count ### Description This export will return an integer value indicating the number of cartridges currently loaded in the user's taser. No parameters are required. ### Method EXPORTS ### Endpoint `exports["z_taser"]:getCartridgeCount()` ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - None ### Request Example ```lua exports["z_taser"]:getCartridgeCount() ``` ### Response #### Success Response (200) - **cartridgeCount** (integer) - The number of cartridges currently loaded. #### Response Example ```json { "cartridgeCount": 5 } ``` ``` -------------------------------- ### Get Is Armed Source: https://docs.zeadevelopment.com/our-resources/z_taser/developer-resources/client-exports Returns a boolean value indicating whether the user's taser is armed (safety switch disengaged). ```APIDOC ## Get Is Armed ### Description This export will return a boolean value indicating whether the user's taser is armed. Specifically, it reflects whether the safety switch is disengaged, allowing the taser to fire. No parameters are required. ### Method EXPORTS ### Endpoint `exports["z_taser"]:isTaserArmed()` ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - None ### Request Example ```lua exports["z_taser"]:isTaserArmed() ``` ### Response #### Success Response (200) - **isTaserArmed** (boolean) - True if the taser is armed, false otherwise. #### Response Example ```json { "isTaserArmed": true } ``` ``` -------------------------------- ### Get Is Flashlight Active Source: https://docs.zeadevelopment.com/our-resources/z_taser/developer-resources/client-exports Returns a boolean value indicating whether the user's current taser has its flashlight activated. ```APIDOC ## Get Is Flashlight Active ### Description This export will return a boolean value indicating whether the user's current taser has its flashlight activated. ### Method EXPORTS ### Endpoint `exports["z_taser"]:isFlashlightActive()` ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - None ### Request Example ```lua exports["z_taser"]:isFlashlightActive() ``` ### Response #### Success Response (200) - **isFlashlightActive** (boolean) - True if the flashlight is active, false otherwise. #### Response Example ```json { "isFlashlightActive": true } ``` ``` -------------------------------- ### Get Is Laser Active Source: https://docs.zeadevelopment.com/our-resources/z_taser/developer-resources/client-exports Returns a boolean value indicating whether the user's current taser has its laser activated. ```APIDOC ## Get Is Laser Active ### Description This export will return a boolean value indicating whether the user's current taser has its laser activated. ### Method EXPORTS ### Endpoint `exports["z_taser"]:isLaserActive()` ### Parameters #### Path Parameters - None #### Query Parameters - None #### Request Body - None ### Request Example ```lua exports["z_taser"]:isLaserActive() ``` ### Response #### Success Response (200) - **isLaserActive** (boolean) - True if the laser is active, false otherwise. #### Response Example ```json { "isLaserActive": true } ``` ``` -------------------------------- ### Get Taser Unique ID Source: https://docs.zeadevelopment.com/our-resources/z_taser/developer-resources/client-exports Returns a string that is a unique identifier for the user's taser within the current session. No parameters are required. ```lua exports["z_taser"]:getUniqueId() ``` -------------------------------- ### Configure Ladder Gameplay Commands Source: https://docs.zeadevelopment.com/our-resources/z_ladders/resource-configuration Controls the availability and behavior of ladder-related gameplay commands. The 'use' parameter enables or disables the entire command system. Commands like 'collect', 'store', 'climb', and 'pickup' are defined with their respective triggers, descriptions, and parameters. ```lua ---@section Commands cfg.Commands = { use = true, } collect = { input = "ladder:collect", description = "Collect ladder from vehicle.", parameters = { { name = "type", help = "<9> <105> <135>" } } } store = { input = "ladder:return", description = "Return ladder to vehicle." } climb = { input = "ladder:climb", description = "Climb ladder infront." } pickup = { input = "ladder:pickup", description = "Pickup ladder infront." } ``` -------------------------------- ### Get Taser Cartridge Count Source: https://docs.zeadevelopment.com/our-resources/z_taser/developer-resources/client-exports Returns an integer representing the number of cartridges currently loaded in the user's taser. This function requires no parameters. ```lua exports["z_taser"]:getCartridgeCount() ``` -------------------------------- ### Get All Active Fires - Lua Source: https://docs.zeadevelopment.com/our-resources/z_fire/developer-exports Retrieves a list of all currently active fire instances in the system. The returned table contains detailed information for each fire. ```lua local all_fires = exports['z_fire']:getAllFires() for id, fire in pairs(all_fires) do print(("Fire ID: %s at position: %s"):format(id, tostring(fire.ptfxData.pos))) end ``` -------------------------------- ### Configure Interaction Methods (Lua) Source: https://docs.zeadevelopment.com/our-resources/z_hose/resource-configuration Allows integration of custom targeting and interaction systems. Supports 'z_interactions' (default) and 'ox_target'. The 'ox_target' method requires explicit selection to be active. ```lua ---@section interactions cfg.interactions = { method = 'z_interactions', ---|> | 'z_interactions' | 'ox_target' | distance = 0.2 ---|> Distance which users can view and interact. } ``` -------------------------------- ### Set Resource Language - Lua Source: https://docs.zeadevelopment.com/our-resources/z_ppvfan/resource-configuration Configures the primary language for the resource. The available languages can be defined in the cfg.languages section. This example sets the language to English ('en'). ```lua cfg.language = 'en' ``` -------------------------------- ### Ladder '9' Configuration (Lua) Source: https://docs.zeadevelopment.com/our-resources/z_ladders/resource-configuration/configuring-ladders Configuration for the simplest ladder type ('9'), which includes only base, end, and a full static prop. It specifies the hash models for each part and an increment speed. ```lua ["9"] = { _base = { ... }, _end = { ... }, _full = { ... } } -- _base.hash: 9base -- _end.hash: 9end -- _full.hash: 9mfull -- increment_speed: 0.005 ``` -------------------------------- ### Get Fires in Range Source: https://docs.zeadevelopment.com/our-resources/z_fire/developer-exports 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. ```APIDOC ## POST /websites/zeadevelopment/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. ### Method POST ### Endpoint /websites/zeadevelopment/getFiresInRange ### Parameters #### Path Parameters * None #### Query Parameters * None #### Request Body * **world_pos** (vector3) - Required - The world position to search from. * **range** (number) - Required - The radius (in meters) to search for fires around the `world_pos`. ### Request Example ```json { "world_pos": {"x": 100.0, "y": 200.0, "z": 50.0}, "range": 50.0 } ``` ### Response #### Success Response (200) * **found_fires** (table) - A table containing fire IDs of all fires found within the specified range. #### Response Example ```json { "found_fires": ["fireA", "fireB"] } ``` ``` -------------------------------- ### Define Resource Keybinds Source: https://docs.zeadevelopment.com/our-resources/z_ladders/resource-configuration Allows customization of keybinds for various resource actions. These keybinds are strings representing keyboard keys and control specific actions such as collecting, returning, climbing, picking up, extending, and retracting ladders. ```lua ---@section Keybinds cfg.Keybinds = { collect_ladder = "E", return_ladder = "E", drop_ladder = "LEFT_ALT", climb_ladder = "G", pickup_ladder = "M", climb_up_ladder = "LEFT_SHIFT", climb_down_ladder = "LEFT_CTRL", slide_down_ladder = "SPACEBAR", extend_ladder = "LEFT_SHIFT", retract_ladder = "LEFT_CTRL" } ``` -------------------------------- ### Get Smoke in Range Source: https://docs.zeadevelopment.com/our-resources/z_fire/developer-exports 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. ```APIDOC ## POST /websites/zeadevelopment/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. ### Method POST ### Endpoint /websites/zeadevelopment/getSmokeInRange ### Parameters #### Path Parameters * None #### Query Parameters * None #### Request Body * **world_pos** (vector3) - Required - The center world position to search from. * **range** (number) - Required - The radius (in meters) to search for smoke around the `world_pos`. ### Request Example ```json { "world_pos": {"x": 150.0, "y": 250.0, "z": 60.0}, "range": 75.0 } ``` ### Response #### Success Response (200) * **found_smoke** (table) - A table containing smoke IDs of all smoke effects found within the specified range. #### Response Example ```json { "found_smoke": ["smokeX", "smokeY"] } ``` ``` -------------------------------- ### Define Multiple Extras for Environmental Lighting (Lua) Source: https://docs.zeadevelopment.com/our-resources/z_els/resource-configuration This Lua code demonstrates how to define environmental lighting configurations for multiple vehicle extras. Each extra is represented by a numerical key within the 'envLighting' table, allowing for specific settings per extra. ```lua ['envLighting'] = { -- * Extra Start (extra_1) * -- [1] = { -- > Table Contents }, -- * Extra End (Ensure that the closing bracket has a comma)* -- -- * Extra Start (extra_2) * -- [2] = { -- > Table Contents }, -- * Extra End (Ensure that the closing bracket has a comma)* -- -- * Extra Start (extra_3) * -- [3] = { -- > Table Contents }, -- * Extra End (Ensure that the closing bracket has a comma)* -- -- * Extra Start (extra_4) * -- [4] = { -- > Table Contents }, -- * Extra End (Ensure that the closing bracket has a comma)* -- } ``` -------------------------------- ### Configure Auto-Detect Taser Setting Source: https://docs.zeadevelopment.com/our-resources/z_taser/resource-configuration This setting controls whether the resource automatically detects a configured taser, simplifying setup for servers with inventory systems. It's a boolean value. ```lua ---@section autoDetectTaser cfg.autoDetectTaser = false ``` -------------------------------- ### storeLadder Source: https://docs.zeadevelopment.com/our-resources/z_ladders/developer-resources/client-exports Stores a ladder with optional animation. Requires network_id and type. ```APIDOC ## storeLadder ### Description Store a ladder with optional animation and specified parameters. ### Method `exports.z_ladders:storeLadder` ### Parameters #### Path Parameters - **should_animate** (boolean) - Optional - Whether to animate the storing process. - **network_id** (integer) - Required - The network ID of the vehicle to store in. - **type** (string) - Required - The ladder type or category. ### Request Example ```lua local success = exports.z_ladders:storeLadder(false, 12345, "9") if success then print("Ladder stored successfully!") end ``` ### Response #### Success Response - **Result** (any) - The result from `Ladder.store`. ``` -------------------------------- ### Get Fires within Range - Lua Source: https://docs.zeadevelopment.com/our-resources/z_fire/developer-exports Finds all active fires within a specified spherical radius from a given world coordinate. It's useful for detecting nearby fire hazards. ```lua local firesNearby = exports['z_fire']:getFiresInRange(vector3(200.0, 300.0, 45.0), 10.0) for _, fire in pairs(firesNearby) do print(("Found fire ID %s at pos %s"):format(fire.id, tostring(fire.data.ptfxData.pos))) end ``` -------------------------------- ### Configure Ladder Interaction UI Source: https://docs.zeadevelopment.com/our-resources/z_ladders/resource-configuration Controls the appearance and functionality of the ladder system's interaction user interface. The 'use' parameter enables or disables the UI, while the 'themes' subtable allows customization of colors for the main background, text, and stroke elements. ```lua ---@section InteractionSystem cfg.InteractionSystem = { use = true, themes = { main_theme = "rgba(0, 168, 255, 0.7)", text_theme = "#f8f8f8", stroke_theme = "#f8f8f8" } } ``` -------------------------------- ### Get Closest Fire Source: https://docs.zeadevelopment.com/our-resources/z_fire/developer-exports 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. ```APIDOC ## POST /websites/zeadevelopment/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. ### Method POST ### Endpoint /websites/zeadevelopment/getClosestFire ### Parameters #### Path Parameters * None #### Query Parameters * None #### Request Body * **world_pos** (vector3) - Required - The world position to search from. ### Request Example ```json { "world_pos": {"x": 120.0, "y": 220.0, "z": 55.0} } ``` ### Response #### Success Response (200) * **fire_id** (string or nil) - The ID of the closest fire, or `nil` if none found. * **fire_data** (table or nil) - The fire’s associated data, or `nil` if none found. * **distance** (number or nil) - The distance to the closest fire, or `nil` if none found. #### Response Example ```json { "fire_id": "fireClosest", "fire_data": {"intensity": 5}, "distance": 10.5 } ``` ``` -------------------------------- ### Configure Decal Properties (Lua) Source: https://docs.zeadevelopment.com/our-resources/z_hose/resource-configuration Sets up the properties for world decals generated by water and foam effects. This includes the type of decal, its color in RGBA format, and whether it can cover other entities. These settings control the visual appearance and behavior of effects. ```lua ---@section decals cfg.decals = { ['water'] = { decalType = 9004, decalColour = {R = 45, G = 45, B = 45, A = 0.5}, canCoverEntities = false }, ['foam'] = { decalType = 1050, decalColour = {R = 255, G = 255, B = 255, A = 0.7}, canCoverEntities = true } } ``` -------------------------------- ### Get Vehicle Foam Level (Lua) Source: https://docs.zeadevelopment.com/our-resources/z_hose/developer-resources/client-exports Retrieves the foam tank level of a vehicle. Returns a float on success, or nil and an error message on failure. Requires a vehicle handle as input. ```lua local foamLevel, errorMsg = exports['z_hose']:getFoamLevel(vehicleHandle) if foamLevel ~= nil then print('foamLevel:', foamLevel) else print('errorMsg:', errorMsg) end ``` -------------------------------- ### Customize Keybinds (Lua) Source: https://docs.zeadevelopment.com/our-resources/z_taser/resource-configuration This Lua table provides a centralized location for customizing all resource-related keybindings. It maps actions to specific keys or keymaps, with standard key inputs being directly configurable here and keymaps adjustable in user settings. Refer to `Enumerators.lua` (`Enum.eUserInputs`) for available inputs. ```lua ---@section Keybinds cfg.Keybinds = { toggle_laser = "L", toggle_flashlight = "J", arc_switch = "N", safety_switch = "X", reload_taser = "R", inspect_prongs = "E", remove_prongs = "E", third_eye_interaction = "LEFT_ALT" } ``` -------------------------------- ### Get Vehicle Water Level (Lua) Source: https://docs.zeadevelopment.com/our-resources/z_hose/developer-resources/client-exports Retrieves the water tank level of a vehicle. Returns a float on success, or nil and an error message on failure. Requires a vehicle handle as input. ```lua local waterLevel, errorMsg = exports['z_hose']:getWaterLevel(vehicleHandle) if waterLevel ~= nil then print('waterLevel:', waterLevel) else print('errorMsg:', errorMsg) end ``` -------------------------------- ### Configure Synchronization Interval (Lua) Source: https://docs.zeadevelopment.com/our-resources/z_hose/resource-configuration Defines the interval in seconds for client-side rope synchronization. Lower values improve visual quality at a potential performance cost, while higher values prioritize performance over visual fidelity. ```lua ---@section syncInterval ---@description: This is the interval during which the hose synchronization occurs between clients. cfg.syncInterval = 1 ``` -------------------------------- ### Get Closest Smoke Source: https://docs.zeadevelopment.com/our-resources/z_fire/developer-exports 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. ```APIDOC ## POST /websites/zeadevelopment/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. ### Method POST ### Endpoint /websites/zeadevelopment/getClosestSmoke ### Parameters #### Path Parameters * None #### Query Parameters * None #### Request Body * **world_pos** (vector3) - Required - The world position to search from. ### Request Example ```json { "world_pos": {"x": 180.0, "y": 280.0, "z": 70.0} } ``` ### Response #### Success Response (200) * **smoke_id** (string or nil) - The ID of the closest smoke, or `nil` if none found. * **smoke_data** (table or nil) - The smoke’s associated data, or `nil` if none found. * **distance** (number or nil) - The distance to the closest smoke, or `nil` if none found. #### Response Example ```json { "smoke_id": "smokeClosest", "smoke_data": {"density": 0.8}, "distance": 15.2 } ``` ``` -------------------------------- ### Implement Fire Extinguish Payout Logic Source: https://docs.zeadevelopment.com/our-resources/z_fire/resource-configuration Customize the payout system for players who extinguish fires. The `processExtinguishPayout` function in `client bridge.lua` receives fire data and can be modified to credit players accordingly. ```lua function processExtinguishPayout(extinguishedFireData) -- Example: Loop through each extinguished fire and credit the player for _, fireData in ipairs(extinguishedFireData) do -- Customize payout logic here based on fireData.id, fireData.behaviourType, etc. print('Crediting player for extinguishing fire ID: ' .. fireData.id) end end ``` -------------------------------- ### Get Closest Fire (Lua) Source: https://docs.zeadevelopment.com/our-resources/z_fire/developer-exports Finds and returns the closest active fire to a specified world position. It takes a world position vector and returns the fire's ID, data, and distance. ```lua local fire_id, fire_data, distance = exports['z_fire']:getClosestFire(world_pos) ``` -------------------------------- ### Get Closest Smoke (Lua) Source: https://docs.zeadevelopment.com/our-resources/z_fire/developer-exports Finds and returns the closest active smoke effect to a specified world position. It requires a world position vector and returns the smoke's ID, data, and distance. ```lua local smoke_id, smoke_data, distance = exports['z_fire']:getClosestSmoke(world_pos) ``` -------------------------------- ### Configure Keybinds for Script Features (Lua) Source: https://docs.zeadevelopment.com/our-resources/z_els/resource-configuration Customize keyboard and controller keybinds for various script functions such as toggling sirens, lights, and UI. Refer to the provided FiveM documentation links for valid keybind identifiers. The input is a nested table for keyboard and controller configurations. ```lua --@type keybinds: table> --@comment: Allow for the customization of keybinds utilized by the resource. --@comment: Keyboard: https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/ --@comment: controller: https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/pad_analogbutton/ cfg.keybinds = { ['keyboard'] = { primary_onscene = 'Q', toggle_siren = 'G', switch_siren = 'R', dual_tones = 'LMENU', bullhorn = 'E', rear_reds = 'K', rear_blues = 'N', front_whites = 'U', front_blues = 'B', alley_lights = 'X', message_board = 'M', right_indicator = 'Right', left_indicator = 'Left', hazard_lights = 'Back', nui_focus = 'CAPSLOCK' }, ['controller'] = { primary_onscene = 'L1_INDEX', toggle_siren = 'LDOWN_INDEX', switch_siren = 'RRIGHT_INDEX', bullhorn = 'L3_INDEX' } } ``` -------------------------------- ### Configure Hose Weapons and Objects (Lua) Source: https://docs.zeadevelopment.com/our-resources/z_hose/resource-configuration Enables configuration of hose weapons (spawn hash) and their corresponding ground props (prop names). Supports customization for both water and foam hoses, including attachment and particle offsets. ```lua ---@section hoses cfg.hoses = { ['foam'] = { weapon = `WEAPON_FOAMBRANCH`, object = `w_me_foambranch`, attachment= { ---|> Offset where the rope attaches to the weapon offset = vector3(-0.15, 0.0, -0.01) }, particles = { ---|> Position and Rotation of particles emitted offset = vector3(0.57, 0.05, -0.35), rotation = vector3(15.0, 0.0, -90.0) } }, ['water'] = { weapon = `WEAPON_REELBRANCH`, object = `w_me_reelbranch`, attachment= { ---|> Offset where the rope attaches to the weapon offset = vector3(-0.2, 0.0, 0.01) }, particles = { ---|> Position and Rotation of particles emitted offset = vector3(0.1, 0.0, 0.015), rotation = vector3(0.0, 0.0, -90.0) } } } ``` -------------------------------- ### Get Ladder Carrying Data - Lua Source: https://docs.zeadevelopment.com/our-resources/z_ladders/developer-resources/client-exports Retrieves data about the ladder currently being carried by the user. The returned object contains the ladder's handle (integer) and optionally its type (string). This function takes no parameters. ```lua local data = exports.z_ladders:getCarryingData() print("Carrying ladder handle:", data.handle) if data.type then print("Ladder type:", data.type) end ``` -------------------------------- ### Check if Emergency Lights are On (Lua) Source: https://docs.zeadevelopment.com/our-resources/z_hose/resource-configuration/configuration-modules Verifies if a vehicle's emergency lights are active. It integrates with the 'z_els' resource by default. If 'z_els' is not available or started, it returns false. This function updates the vehicle page status. ```lua ---@param vehicle int ---@return boolean | nil areEmergencyLightsOn = function(vehicle) if GetResourceState('z_els') ~= 'started' then return false end return exports['z_els']:is999ModeActive(vehicle) end ``` ```lua ---@param vehicle int ---@return boolean | nil areEmergencyLightsOn = function(vehicle) if GetResourceState('z_els') ~= 'started' then return false end return exports['z_els']:is999ModeActive(vehicle) end ``` ```lua ---@param vehicle int ---@return boolean | nil areEmergencyLightsOn = function(vehicle) return IsVehicleSirenOn(vehicle) end ``` -------------------------------- ### Customize Resource Keybinds (Lua) Source: https://docs.zeadevelopment.com/our-resources/z_hose/resource-configuration Allows for the customization of keybinds used by the resource. Each keybind is defined as a string corresponding to a specific in-game control. This configuration enables users to rebind actions to their preferred keys for better usability. ```lua ---@section keybinds ---@description: Allow for the customization of keybinds utilized by the resource. ---@comment: https://docs.fivem.net/docs/game-references/controls/ ---@comment: core > client > classes > enums.lua > enums.keybinds cfg.keybinds = { -- % View Pump % ['view_pump'] = 'Z', -- % Hose Reel % ['use_reel'] = 'E', ['return_reel'] = 'E', -- % Supply Line % ['connect_supply'] = 'G', ['disconnect_supply'] = 'G', -- % Relay Line % ['connect_relay'] = 'G', ['disconnect_relay'] = 'G', -- % Pick Ups % ['pickup_hosebranch'] = 'E', ['pickup_foambranch'] = 'E', -- % Drop Hose % ['drop_hosebranch'] = 'G', -- % Cancel Hose % ['cancel_hose'] = 'X', -- % Drop Light Portable Pump % ['drop_lpp'] = 'G', -- % Standpipe % ['connect_standpipe'] = 'G', -- % Refill Foam % ['refill_foam'] = 'G', -- % Cancel Action % ['cancel_action'] = 'X', } ``` -------------------------------- ### Developer Exports for z_hose Integration Source: https://docs.zeadevelopment.com/our-resources/z_hose This snippet demonstrates essential developer exports provided by z_hose for integrating its functionality with other server resources. These functions allow for programmatic control over hoses and pumps, enabling advanced customization and interaction with other scripts. ```Lua --- Create a new hose entity -- @param config table | Table of hose configurations -- @return hose entity | The created hose entity exports('createHose', function(config) -- Implementation details... end) --- Set the status of a pump -- @param pumpId string | The ID of the pump to control -- @param status boolean | The desired status (true for active, false for inactive) exports('setPumpStatus', function(pumpId, status) -- Implementation details... end) ``` -------------------------------- ### Trigger Mobilise Server Event in Lua, JavaScript, and C# Source: https://docs.zeadevelopment.com/our-resources/zturnout-system/trigger-events Demonstrates how to trigger the 'Turnout-System:Mobilise' server event across different programming languages. This event is used to generate a mobilization ticket and send it to stations, requiring detailed incident information. Ensure all parameters are correctly formatted for successful event invocation. ```lua TriggerServerEvent("Turnout-System:Mobilise", { callsigns = 'G50P1, G50P2', itype = 'F4A6 - Traffic Incident - Vehicle Fire - Large', iaddress = '7 Grove Stret', idetails = 'PASSER BY HAS CALLED IN A VEHICLE FIRE.', inumber = '#146774', talkgroup = 'GMFO-1', timedate = '13:40 31/10/23', mapref = 'Postal 128', }) ``` ```javascript emitNet("Turnout-System:Mobilise", { callsigns: 'G50P1, G50P2', itype: 'F4A6 - Traffic Incident - Vehicle Fire - Large', iaddress: '7 Grove Stret', idetails: 'PASSER BY HAS CALLED IN A VEHICLE FIRE.', inumber: '#146774', talkgroup: 'GMFO-1', timedate: '13:40 31/10/23', mapref: 'Postal 128', }) ``` ```csharp TriggerServerEvent("Turnout-System:Mobilise", { callsigns = "G50P1, G50P2", itype = "F4A6 - Traffic Incident - Vehicle Fire - Large", iaddress = "7 Grove Stret", idetails = "PASSER BY HAS CALLED IN A VEHICLE FIRE.", inumber = "#146774", talkgroup = "GMFO-1", timedate = "13:40 31/10/23", mapref = "Postal 128", }) ``` -------------------------------- ### Configure Alarm System - Lua Source: https://docs.zeadevelopment.com/our-resources/zcustody-alarm/resource-configuration Defines the structure for configuring alarm systems, including station names, addresses, panel locations, alarm settings, and activation points. Each station's configuration is a distinct block identified by a unique ID. ```lua cfg.alarmSystems = { -- BLOCK START -- [1] = { stationName = 'NAME OF STATION'; stationAddress = 'ADDRESS OF STATION'; ['panelLocation'] = { coordinates = vector3(0.0, 0.0, 0.0); rotation = vector3(0.0, 0.0, 0.0) }; ['alarmSettings'] = { alarmSpeaker = vector3(0.0, 0.0, 0.0); alarmDistance = 25.0 }; ['activationPoints'] = { -- BLOCK START -- { type = 'Button'; location = 'Custody Desk'; coordinates = vector3(0.0, 0.0, 0.0); rotation = vector3(0.0, 0.0, 179.9283) }; -- BLOCK END -- -- BLOCK START -- { type = 'Alarm Bar'; location = 'Interview Room'; coordinates = vector3(0.0, 0.0, 0.0); distance = 1.5 }; -- BLOCK END -- } }; -- BLOCK END -- } ``` -------------------------------- ### Get Fires in Range (Lua) Source: https://docs.zeadevelopment.com/our-resources/z_fire/developer-exports Returns a table of all active fires within a specified distance from a given world position. It requires a world position vector and a range number, returning a table of found fire IDs. ```lua local found_fires = exports['z_fire']:getFiresInRange(world_pos, range) ``` -------------------------------- ### Configure Resource Objects (Lua) Source: https://docs.zeadevelopment.com/our-resources/z_hose/resource-configuration Allows modification of objects used by the resource, such as pumps and standpipes. Object names must be enclosed in backticks. ```lua ---@section objects cfg.objects = { ['light_portable_pump'] = `prop_generator_01a`, ['standpipe'] = `standpipe` } ```