
Configuration Modules
This page will outline and explain how to create a configuration module and how to configure the vehicle for its setup.
Creating a configuration module
Tanks
This table facilitates the customization of the vehicle's foam and water tanks. Here, you can select whether the vehicle should carry water or foam, as well as specify the storage capacity for each.
---@section tanks
---@description: This table facilitates the configuration of the vehicles' foam and water tanks.
['tanks'] = {
canCarryWater = true,
canCarryFoam = true,
['water'] = {start = 1800.0, capacity = 1800.0}, ---|> Measured in liters
['foam'] = {start = 200.0, capacity = 200.0}, ---|> Measured in liters
},Panel offset
This vector3 value represents the offset in which you can find the pumping panel interaction on the vehicle You can use this free ressource to help you with the vector3
---@section panelOffset
---@description: This parameter enables the configuration of the panel interaction position on the vehicle.
panelOffset = vector3(0.9, 0.5, 0.75),Valves
This table allows for the creation and editing of the vehicles valves, These valves are section into sub tables of Intakes and discharges.
When creating an intake valve, you will be provided with two variables: label and offset. The label represents the text displayed on the pump interface, allowing for easy identification of the valve, while the offset indicates the valve's position on the vehicle.
{
label = 'Pump Intake',
offset = vector3(0.899999, 0.460000, -0.350000)
},If you are developing a discharge valve, you will receive three variables: label, offset, and type. The label represents the text displayed on the pump interface, facilitating easy identification of the valve. The offset indicates the valve's position on the vehicle, while the type allows for customization of the valve's purpose. There are four types of discharges available: water, foam, water & foam, and relay.
{
label = 'Driver Cross Lay',
offset = vector3(-0.919, 0.959, 0.63),
type = 'water&foam' --@comment 'water' | 'foam' | 'water&foam' | 'relay'
},Misc
This table includes various functions related to the Pumping User Interfaces vehicle page. These functions have been designed to be open, allowing you to specify and configure them for your vehicles.
Example for vehicles that utilize .ycd animations.
---@param vehicle int
---@return boolean
areLockersOpen = function(vehicle)
if not IsVehicleAConvertible(vehicle, true) then
return false
end
local state = GetConvertibleRoofState(vehicle)
return state == 1 or state == 2 or state == 6
endExample for vehicles that utilize toggleable extras.
---@param vehicle int
---@return boolean
areLockersOpen = function(vehicle)
local extras = {4, 5}
local isOpen = false
for _, extra in pairs(extras) do
if DoesExtraExist(vehicle, extra) then
if IsVehicleExtraTurnedOn(vehicle, extra) then
isOpen = true
break
end
end
end
return isOpen
endExample for vehicles that utilize toggleable doors
---@param vehicle int
---@return boolean
areLockersOpen = function(vehicle)
local doors = {1, 2}
local isOpen = false
for _, door in pairs(doors) do
if IsVehicleDoorDamaged(vehicle, door) or GetVehicleDoorAngleRatio(vehicle, door) > 0 then
isOpen = true
break
end
end
return isOpen
end.
Example of vehicles that utilize z_els
---@param vehicle int
---@return boolean | nil
areEmergencyLightsOn = function(vehicle)
if GetResourceState('z_els') ~= 'started' then
return false
end
return exports['z_els']:is999ModeActive(vehicle)
endExample of vehicles that utilize regular sirens
---@param vehicle int
---@return boolean | nil
areEmergencyLightsOn = function(vehicle)
return IsVehicleSirenOn(vehicle)
endExample of vehicles that utilize z_els
---@param vehicle int
---@return boolean | nil
areSceneLightsOn = function(vehicle)
if GetResourceState('z_els') ~= 'started' then
return false
end
return exports['z_els']:areSceneLightsActive(vehicleHandle)
endExample for vehicles that utilize toggleable extras.
---@param vehicle int
---@return boolean | nil
areSceneLightsOn = function(vehicle)
local extras = {4, 5}
local isOn = false
for _, extra in pairs(extras) do
if DoesExtraExist(vehicle, extra) then
if IsVehicleExtraTurnedOn(vehicle, extra) then
isOn = true
break
end
end
end
return isOn
endExample of vehicles that utilize z_els
---@param vehicle int
---@return boolean | nil
isAdvisorLightOn = function(vehicle)
if GetResourceState('z_els') ~= 'started' then
return false
end
return exports['z_els']:areRearRedsActive(vehicle)
endExample for vehicles that utilize toggleable extras.
---@param vehicle int
---@return boolean | nil
isAdvisorLightOn = function(vehicle)
local extras = {4, 5}
local isOn = false
for _, extra in pairs(extras) do
if DoesExtraExist(vehicle, extra) then
if IsVehicleExtraTurnedOn(vehicle, extra) then
isOn = true
break
end
end
end
return isOn
endLast updated