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:

Smart Hose Config Walkthrough

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.

Keys = {
        Interact = 38,          -- E 
        SwitchDecalTypeKey = 47,-- G
        ShootHose = 24,         -- INPUT_ATTACK
        DropHose = 38,          -- E 
        PickupHose = 47,        -- G
        IncreasePressure = 172, -- Arrow Up
        DecreasePressure = 173, -- Arrow Down
},

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

AcePermissions = {
            Enabled = false,
            Permission = "usehose"
            -- This enables ace permissions on the /salesign command
},

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

ESX = {
            Enabled = false,
            CheckJob = {
                Enabled = false, -- Enable this to use ESX job check
                Jobs = {"fireman"} -- A user can have any of the following jobs, allowing you to add multiple
            }
},

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

vRP = {
            Enabled = false,
            CheckGroup = {
                Enabled = false, -- Enable this to use vRP group check
                Groups = {"fireman"}, -- A user can have any of the following groups, meaning you can add different jobs
            },
            CheckPermission = {
                Enabled = false, -- Enable this to use vRP permission check
                Permissions = {"fireman.usehose"} -- A user can have any of the following permissions, allowing you to add multiple
            },
},

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

QBCore = {
            Enabled = false,
            CheckJob = {
                Enabled = false, -- Enable this to use QBCore job check
                Jobs = {"fireman"}, -- A user can have any of the following jobs, meaning you can add different jobs
            },
            CheckPermission = {
                Enabled = false, -- Enable this to use QBCore permission check
                Permissions = {"fireman.usehose"}, -- A user can have any of the following permissions, allowing you to add multiple
            },
},

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

QBX = {
            Enabled = false,
            CheckJob = {
                Enabled = false, -- Enable this to use QBX job check
                Jobs = {"fireman"}, -- A user can have any of the following jobs, meaning you can add different jobs
            }
},

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.

Translations = {
        storeHoseMessage = "Press E to store hose",
        cannotStoreHoseMessage = "You can only store the hose in the vehicle you grabbed it from.",
        vehicleUnavailableMessage = "The vehicle you grabbed the hose from is no longer available.",
        grabHoseMessage = "Press E to grab hose",
        qbTargetMessage = "Grab/Store Hose",
        grabHoseWorldInteraction = "Grab Hose",
        tankIsEmpty = "Tank is empty! Cannot shoot water!",
        maxRopes = "This vehicle has reached the maximum number of ropes.",
        waterTypeDisplay = "Hose Type ~INPUT_DETONATE~ (Water)\nPressure ~INPUT_CELLPHONE_UP~ | ~INPUT_CELLPHONE_DOWN~ ",
        foamTypeDisplay = "Hose Type ~INPUT_DETONATE~ (Foam)\nPressure ~INPUT_CELLPHONE_UP~ | ~INPUT_CELLPHONE_DOWN~ ",
        maximumPressure = "Maximum pressure reached!",
        minimumPressure = "Minimum pressure reached!",
        noPermission = "You do not have access to use the hose."
},

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.

Notifications = {
        Enabled = true,
        Framework = {
            QBCore = false,
            QBX = false,
            ESX = false, 
            vRP = false, 
        }
},

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.

InteractType = {
        TruckInteraction = {
            Drawtext = true,
            ScreenPrompt = false,
            WorldInteraction = false,

            ThirdEye = {
                enabled = false,
                qbTarget = false,
                oxTarget = false,
            }
        },
},

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.

Hose = {
            HoseropeInitialLength = 32.5,  -- Initial rope length (recommended)
            HoseropeLength = 1000.0,      -- Rope Max length (recommended)
            DrawMarker = true, -- Draw marker on the floor when the hose is dropped.
            GrabAnimationDict = 'anim@scripted@freemode@tunprep_ig_grab_midd@male@',
            GrabAnimationName = 'tunprep_ig_grab_midd',
            PickupAnimationDict = 'veh@common@bicycle@ds',
            PickupAnimationName = 'pickup',
},

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:

VehicleWaterCapacities = {
            [`firetruk`] = { capacity = 99500, carryFoam = true },
            [`exampletruck`] = { capacity = 99500, carryFoam = true },
            [`newvehicle`] = { capacity = 99500, carryFoam = true },
}

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.

VehicleSettings = {
            [`firetruk`] = {
                useBone = false,
                bones = {}, -- to add bones do "bone_name" you can have multiple by doing "bonename", "bonename_2"
                offsets = {
                    { x = -0.90, y = -0.02, z = -0.050 },
                    { x = 0.87, y = -0.1050, z = 0.0140 },
                    {x = -0.57, y = -3.68, z = 0.0},
                },
                maxRopes = 2,
            },
}

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:

{x = -0.90, y = -0.02, z = -0.050},

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:

bones = {"engine", "bone2"},

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:

Find Hose Positioning Command - Demonstration Video

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.

Decals = {
        InitialPressure = 0.5,    -- Starting Pressure
        MaxPressure = 1.5, -- Maximum Pressure Possible
        LowestPressure = 0.3, -- Minimum Pressure Possible
        PressureIncrement = 0.1,    -- How much the Pressure goes up / down
        DecalLife = 20.0 -- How long the decals stay on the floor.
},

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.

WaterTank = {
        minWaterLevel = 1,      -- Minimum water level to shoot water
        waterDepletionRate = 1,  -- Water depletion rate per second when shooting
        MaxwaterDepletionRate = 50, -- Maximum water depletion rate -> Highest Pressure Possible will always remove this amount of water
        fillRate = 150,

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