Configuring Smart Hose
Our easy config allows you to make adjustments to Smart Hose to suit your server.
Make sure your resource folder is named "SmartHose" to allow integration with our Fire Supply Line resource if your server uses it. Do not rename the resource folder.
To begin configuring the resource, open the config.lua file within the resource folder. Some values in this config overlap with our Fire Supply Line resource, which will be explained later in this documentation page. This explains why you may see some values referencing the water tank.
Walkthrough Video
Here's a video walking you through the Smart Hose config:
Keybinds
The first part of the config.lua file allows you to adjust the different keys, such as interacting with the fire truck, switching between foam/water, shooting the hose, dropping the hose, picking up the hose and adjusting the pressure.
To find out the control number, see the FiveM Controls list here.
Try not to duplicate the use of controls, such as having the same keybind for picking up and interacting with the hose, as this may lead to issues using the resource.
Permission Checks
The next part of the config.lua file allows you to setup permissions straight out of the box for ace permissions, QBCore, ESX or vRP. If you are using another permission system, make the necessary changes in the sv_utils.lua file.
Multiple permissions can be enabled at once, such as ace permissions and a framework job check. By doing this, a user only has to have one of the enabled permissions (not both) in order to use the hose.
Ace Permissions
By enabling ace permissions, only users with the "usehose" permission are able to interact with the hose and draw it from a fire truck.
ESX
Enabling ESX in this section will switch on ESX permissions, requiring a user to have one of the configured jobs in the Jobs table, such as "fireman" which is setup by default.
ESX - Disable Aim Assist Some customers have reported being unable to use the hose on the ESX framework. We have identified one possible cause to be the DisableAimAssist ESX config value. Setting this to false will likely resolve the problem.
vRP
Enabling vRP in this section will switch on vRP permissions, requiring a user to have either a certain group or permission depending on what is enabled.
QBCore
Enabling QBCore in this section will switch on QBCore permissions, requiring a user to have either a certain group or permission depending on what is enabled.
QBX
Enabling QBX in this section will switch on QBX permissions, requiring a user to have a certain group from the Jobs table, such as "fireman" which is setup by default.
Custom Framework / Permissions
If you want to setup your own custom framework/permission check, head to the UserHasPermission function in the sv_utils.lua file and make the necessary changes. If you need any help, reach out to our team who will do their best to advise you.
Translations
All elements of the resource can be translated into another language in the translations section of the config.lua file.
Notifications
By default, Smart Hose utilises base game notifications but also provides support for QBCore, ESX, QBX and vRP notifications. If you want us to support another notification resource, get in touch and we'll do our best to integrate this.
Simply enable one of the various frameworks here in order to begin using a different notification system.
Interaction Systems
Smart Hose provides support for interaction systems straight out of the box. By default, Smart Hose uses draw text (base game) which doesn't rely on any third party resources. This can also be switched to screen prompt or the world interaction resource and enabled below in the interact type section.
Furthermore, Smart Hose also has third eye support for both qb_target and ox_target, which can be enabled in the interact type section of the config as seen above.
Rope Settings
The Rope section of the config.lua file allows you to adjust the usage of dynamic ropes within the Smart Hose resource.
Some of these configuration values won't need to be edited by most servers, so make sure you understand what they mean before making any changes.
The HoseropeInitialLength is the initial length of the rope once you draw it from a fire truck, we've set this to 32.5 which we think is an ideal length, however you can change this for your server.
The HoseropeLength is the maximum possible length of a rope. This is set to 1000 right now, however you may want to make this smaller for your server.
The DrawMarker value determines whether a marker is drawn on the floor when the hose is dropped.
Lastly, the various animation configuration values allow you to adjust the animations used when a hose is either picked up or dropped. For a full list of animations, see here.
Adding new vehicles for Smart Hose Support
To allow new vehicles to be supported by Smart Hose, jump to the WaterTank section at the bottom of the config.lua file. This section also overlaps with our Fire Supply Line resource, so if you don't have this, we just want to focus on the VehicleWaterCapacities section:
This is where you can add new vehicles to be supported by Smart Hose. If you use Supply Line, the value you set to capacity will be the size of the water tank. If you don't use supply line, you can set this to any number (or even zero) as it won't make a difference given you will have infinite water.
Vehicles will not carry foam by default so you'll need to enable carryFoam as seen above if you want them to carry foam.
The model names in the VehicleWaterCapacities section must be wrapped in backticks `` in order to allow runtime hashing for resource efficiency. This is different to "".
Vehicle Settings
After you've setup new vehicles for Smart Hose support in the VehicleWaterCapacities, you may want to make further adjustments to the number of ropes a vehicle can have and also the default offsets.
This part is optional. Once a vehicle has been added to the VehicleWaterCapacities table above, it will work with Smart Hose and no further action is needed.
To begin adjusting vehicle settings, head to the Ropes > Vehicle Settings part of the config.lua file.
The Vehicle Offsets section at allows you to setup custom offsets to which the rope will be connected to the truck at. For example, you may want ropes to connect to the truck at the side or the back where the water connection valve features in the vehicle model, enhancing realism on your server.
Each new vehicle configuration can have multiple offset values. This is the x, y and z values relative to the vehicle. Here's how they work:
The X value moves left (minus) and right (positive).
The Y value moves backwards (minus) and forwards (positive).
The Z value moves down (minus) and up (positive).
Having multiple connection points is useful for vehicles that have a valve both on the left and right hand side of the vehicle. Smart Hose will then connect the hose to whichever valve the user was closest to when they interacted with the truck to draw the hose. However, a vehicle can have only one connection point if needed.
Remember this section is optional and a vehicle does not need to have custom offsets. If this part is not setup for a certain vehicle, the rope will just connect to the centre of the vehicle. However, if you want the hose to connect exactly to the point of the vehicle hose, it may be worth setting up this part!
Setting up the offSets of the vehicle is likely going to be a game of trial and error. For example, in the pre-configured firetruk you can see we have two pre-configured offSets. These are for the left and right hand side of the truck. Let's talk through the first offSet value:
An X value of -0.9
will mean the rope connection point will be -0.9
to the left of the vehicle, as it is relative to the way the model is facing. A Y value of -0.02
will move it backwards by -0.02
. A Z value of -0.05
will move the connection point down by -0.05
. Overall, this would position the hose to the left hand side of the vehicle, slightly back and also down.
Hopefully this allows you to make sense of how vehicle offsets work and the values you are likely to need in order to connect your ropes to the right part of your fire truck.
Multiple offSets can also be used and setup in the table. For more information on finding offSets easily, see our Find Hose Positioning Developer Command below.
Max Ropes Per Vehicle
Inside the VehicleSettings config is also the maxRopes property, which sets the maximum amount of ropes that can be attached to a vehicle at once.
The max ropes per vehicle value is 2 by default, meaning only 2 ropes can be connected to a fire truck at once (however you may have multiple fire trucks at one scene). It is important for efficiency that this number is not set too high. If you want to override the default maximum number of hoses for a vehicle, then this can be done below. However, this section is optional and not filling it out will just mean it uses the default value of 2 hoses.
The max number of ropes per vehicle does not stop more people getting a hose out, it just means only X amount of people will have a rope attached to their hose.
Remember the model names must be wrapped in backticks: `` for runtime hashing.
This is different to "".
Bone Connection Points
Instead of setting a custom offSet, you also have the ability to use bone connection points, such as bones on custom models or identified bones for base game models. A good list of vehicle bones can be found here, however you might find it easier to setup custom offSets.
To setup bones, enable useBone
and then add the bone names into the bones
table, such as this:
Multiple bones can be setup easily and the resource will find the one you are closet to.
Find Hose Positioning Developer Command
To help assist you with finding the right offSet values for either the hose or supply line connection point, we've added an easy to use developer command
Here's a video explaining how to use the command:
How to use the command
To enable the /findhosepositioning command, firstly head to the config.lua file and enable the EnablePositioningCommand value (make sure to turn it off again after).
Once in-game, jump into the driver seat of your desired fire truck and run the command which will begin the process of finding the offSet values.
Next, your vehicle should turn transparent as seen here:
You should then see a football prop inside the vehicle. This can be moved using the following keys:
Arrow Up - move the prop forwards
Arrow Down - move the prop down
Arrow Left - move the prop left
Arrow Right - move the prop right
Page Up - move the prop up
Page Down - move the prop down
Ideally, you want to position this football at the point where you want the rope to connect at, which might be the valve on your fire truck or somewhere else. Once you are finished, press ENTER.
Now you have completed the process, your vehicle will return to normal and the football prop will be deleted, it was simply there to help you find the positioning.
The offSet values have now been printed into your console, you can now copy these into the VehicleOffsets section of the Smart Hose or Fire Supply Line config.
Decal & Pressure Settings
Smart Hose has decals for both water and foam, which appear both on the ground and on some objects/vehicles. To configure these decals, head to the Decals section of the config.lua file.
The decals section also allows you to make adjustments to the pressure of the hose.
The InitialPressure value allows you to set the starting, default pressure of the hose.
The MaxPressure value allows you to set the maximum possible pressure of a hose.
The LowestPressure value allows you to set the minimum possible pressure of a hose.
The PressureIncrement value allows you to set the increment of the pressure, which is the value at which it increases or decreases by when a user makes an adjustment using their arrow keys.
The DecalLife value allows you to set how long the decals will stay on the floor/objects/vehicles for.
Supply Line Values
If you are using our Fire Supply Line resource, you may want to make some changes to the WaterTank section of the config.lua file, allowing you to make changes to the usage of water tanks.
The minWaterLevel value allows you to set the minimum water level which a vehicle must have in order to shoot water.
The waterDepletionRate value allows you to set the rate at which water depletes from the tank per second when you are shooting the hose.
The MaxwaterDepletionRate value allows you to set the maximum depletion rate per second while you are shooting. This value is important as depending on the pressure of the hose, it will deplete faster - this value sets an upper limit on it and prevents it from depleting at a rate which is too fast. For example, if your pressure is set to 8.0 but your maximum depletion rate is set to 5.0, it would still allow you to use a pressure of 8.0 but your depletion/water usage would remain at 5.0
The fillRate value allows you to set the rate at which the tank will fill from a hydrant.
Last updated