
π»Towing Locations
Easily add locations for towing truck rental, these can be public use or restricted by jobs in Config.Towing
IMPORTANT INFORMATION
The
key
is the location name and must be uniqueThe image must be a
.png
file present in my vehicle-images github repo (submit a PR for custom vehicles) as these are loaded dynamically from an external linkthe prop
coords
andspawnCoords
must be vector4 for the prop and vehicle spawn locationsRestrictions can be set via the jobs table
The offset values for the ramp object must be
vector3
Define blacklisted vehicles from being attached by their
spawn name
Location Name
The
key
is the location name and must be unique
['My Towing Location Name'] = { -- the key is the location name and must be unique
},
Prop
Model is the prop model name
Coords must be
vector4
Spawn coords must be
vector4
Icon is the target icon
Label is the target label
Distance is the target distance
['My Towing Location Name'] = { -- the key is the location name and must be unique
prop = { -- prop settings
model = 'prop_parkingpay', -- prop model
coords = vector4(-214.75, -1309.08, 31.29, 3.47), -- prop coords
spawnCoords = vector4(-213.91, -1305.27, 31.35, 92.66), -- vehicle spawn coords
icon = 'fa-solid fa-car', -- target icon
label = 'Get Tow Vehicle', -- target label
distance = 3.0, -- target distance
},
---
},
Blip
If required you can enable blips for each towing location
Blip information can be found here: https://docs.fivem.net/docs/game-references/blips/
Id is the blip id
Colour is the blip colour
Scale is the blip scale
Title is the blip name
['My Towing Location Name'] = { -- the key is the location name and must be unique
---
blip = { -- blip settings
enabled = true, -- enable blip for this tow location
id = 68, -- blip id
colour = 3, -- blip colour
scale = 0.7, -- blip scale
title = 'Vehicle Towing', -- blip name
},
---
},
Job Restrictions
If required you can set restriction via job names to each towing location
The job name must be defined correctly in your jobs.lua
['My Towing Location Name'] = { -- the key is the location name and must be unique
---
jobs = { -- define jobs permitted to use this location if enabled
enabled = true, -- set to true to require a job to use
jobNames = { -- define job names
'my_job_name',
},
},
---
},
Vehicles
Define vehicles that can be spawned via this towing location
The
key
is the vehicle spawn name and must be in your vehicles.luaThe image must be a
.png
file present in my vehicle-images github repo (submit a PR for custom vehicles) as these are loaded dynamically from an external linkDefine the ramp model you wish to use for the vehicle (supports custom props if required)
The offset must be a
vec3
valueDefine blacklisted vehicles that can not be attached to the tow truck by defining their spawn names in the black listed table
['My Towing Location Name'] = { -- the key is the location name and must be unique
---
vehicles = { -- define vehicles available to spawn here
['flatbed'] = { -- the key is the vehicle spawn name
image = 'flatbed.png', -- image name
ramp = { -- define ramp settings
model = 'xs_prop_x18_flatbed_ramp', -- ramp model
offSet = vec(0.0, -8.80, -1.30), -- ramp offset
rotation = 180.0, -- ramp rotation
},
blacklisted = { -- define vehicles that are black listed from being attached
'adder',
--add more as required
},
},
['slamtruck'] = { -- the key is the vehicle spawn name
image = 'slamtruck.png', -- image name
ramp = { -- define ramp settings
model = 'xs_prop_x18_flatbed_ramp', -- ramp model
offSet = vec(0.0, -6.75, -1.45), -- ramp offset
rotation = 180.0, -- ramp rotation
},
blacklisted = { -- define vehicles that are black listed from being attached
'adder',
--add more as required
},
},
--add more vehicles as required
},
},
Finished Config
Below is an example of a fully finished config entry for a custom location with a job restriction and a black listed vehicle
['My Towing Location Name'] = { -- the key is the location name and must be unique
prop = { -- prop settings
model = 'prop_parkingpay', -- prop model
coords = vector4(-214.75, -1309.08, 31.29, 3.47), -- prop coords
spawnCoords = vector4(-213.91, -1305.27, 31.35, 92.66), -- vehicle spawn coords
icon = 'fa-solid fa-car', -- target icon
label = 'Get Tow Vehicle', -- target label
distance = 3.0, -- target distance
},
blip = { -- blip settings
enabled = true, -- enable blip for this tow location
id = 68, -- blip id
colour = 3, -- blip colour
scale = 0.7, -- blip scale
title = 'Vehicle Towing', -- blip name
},
jobs = { -- define jobs permitted to use this location if enabled
enabled = true, -- set to true to require a job to use
jobNames = { -- define job names
'my_job_name',
},
},
vehicles = { -- define vehicles available to spawn here
['flatbed'] = { -- the key is the vehicle spawn name
image = 'flatbed.png', -- image name
ramp = { -- define ramp settings
model = 'xs_prop_x18_flatbed_ramp', -- ramp model
offSet = vec(0.0, -8.80, -1.30), -- ramp offset
rotation = 180.0, -- ramp rotation
},
blacklisted = { -- define vehicles that are black listed from being attached
'adder',
--add more as required
},
},
['slamtruck'] = { -- the key is the vehicle spawn name
image = 'slamtruck.png', -- image name
ramp = { -- define ramp settings
model = 'xs_prop_x18_flatbed_ramp', -- ramp model
offSet = vec(0.0, -6.75, -1.45), -- ramp offset
rotation = 180.0, -- ramp rotation
},
blacklisted = { -- define vehicles that are black listed from being attached
'adder',
--add more as required
},
},
--add more vehicles as required
},
},
Last updated