βοΈMiscellaneous
This will explain the most important configs of the script.
π cfg.vehicles
This table will contain all the configs you need to have your vehicle ready for calls ! It will define where the pump and the hose will be attached visually in your truck.
A vehicle config will look like this :
cfg.vehicles = {
[GetHashKey('firetruck')] = {
pump = {
pos = vector3(-0.78, -3.3, 0.315),
rot = vector3(0, 0, 60.0),
bone = '',
},
hose = {
pos = vector3(0.95, -3.2, 0.52),
rot = vector3(0, 0, 200.0),
bone = '',
},
},
--[...]
}Let's dive into this :
GetHashKey(['YourVehicleHere'])is the vehicle model you want the script to detect, you can add as many occurences as shown in the base configInside the table of the vehicle, you will put
pumpandhosetables, holding the pos and rot values.For each object, you will find a pos and rot fields, this is the place where your prop will be place FROM THE CENTER OF THE VEHICLE. As a reminder : x = left/right | y = front/back | z = up/down
πͺ£ cfg.pump
This is the config holding the infos of the pump (inlets, position in hands ...)
cfg.pump = {
model = "waterPump",
inletPos = vector3(-0.02, 0.33, 0.0),
outletPos = vector3(0.18, 0.075, 0.2125),
posInHand = vector3(0.0, -0.23, -0.47),
rotInHand = vector3(0.0, 0.0, 0.0),
bone = 28422,
}modelis the model name of the prop you want to use as a pumpinletPosis the position of the inlet relative to the pump where the hose will be pluggedoutletPosis the position of the outlet relative to the pump where the hose will be pluggedposInHandis the position of the pump relative to the player when carriedrotInHandis the rotation of the pump relative to the player when carriedboneis the ped bone on which the pump will be attached relative to
πΏ cfg.hose
This is the config holding the infos of the hose, similar as the pump
cfg.hose = {
model = "inctuyau",
posInHand = vector3(0.28, 0.0, -0.02),
rotInHand = vector3(45.0, 60.0, -180.0),
bone = 28422,
}modelis the model name of the prop you want to use as a hoseposInHandis the position of the hose relative to the player when carriedrotInHandis the rotation of the hose relative to the player when carriedboneis the ped bone on which the pump will be attached relatively
π cfg.water
This configuration will define all your custom zones that can be flooded.
Lets dive deeper into it :
cfg.water = {
{
adress = "5 Pump Street",
bounds = {
xmin = -265,
xmax = -249,
ymin = -455,
ymax = -429,
},
height = 27.75,
groundAtCoords = 24.4,
},
--[...]
}
addressis the address you will see in the NUI flooding managementboundsis the table holding the values specifying the position of the water quadheightis the height at which the level will rise when floodinggroundAtCoordsis the height of the ground, starting from where the script will consider the area as clear, unflooded.
πcfg.pumpSpeed
This config defines the speed of the pump to drain a flooding.
The values is expressed is meters/second.
cfg.pumpSpeed = 0.02Last updated