Ramps/Trailers
Configuration
Configuration
Two files, both in config/ and neither encrypted. Save and restart suty-rampas after changing them.
| File | What's in it |
|---|---|
config/config.lua |
Framework, inventory, ramp kit, guided loading, pickups |
config/trailer.lua |
Debug, admin permission, trailers, placing, hitching, carrying, jetskis |
config/config.lua
Framework and inventory
Config.Framework = 'auto'
Config.Inventory = 'auto'
| Option | Default | Values |
|---|---|---|
Config.Framework |
'auto' |
'auto', 'qbx', 'qb' or 'esx' |
Config.Inventory |
'auto' |
'auto', 'ox_inventory', 'qb-inventory' or 'esx' (ESX's own) |
auto takes the framework that's started and ox_inventory whenever it runs, otherwise the framework's own inventory. The server console says which ones it picked at start.
Ramp kit
Config.Kit = {
item = 'suty_ramp_kit',
}
The inventory item that places the ramps. If you rename it, rename the item in your inventory too.
Guided loading
Config.AutoLoad sets how the ride up and down the ramps feels.
| Option | Default | What it changes |
|---|---|---|
speed |
0.7 |
Riding speed, in metres per second |
distance |
6.0 |
How far from the ramp entry the E prompt shows, in metres |
bedInset |
1.6 |
How far onto the bed the vehicle stops, from the ramp hook, in metres |
rampClearance |
0.0 |
Extra tyre clearance over the ramp surface, in metres |
naturalSuspension |
true |
Keeps the suspension at its normal height on the ramps (visual only) |
alignmentTolerance |
0.35 |
Largest sideways error at the entry, in metres |
headingTolerance |
20.0 |
Largest heading error at the entry, in degrees |
motion |
table | Fine tuning of the ride: cruise, climb, descend, accel, brake, body bob, engine rpm. Each value is explained in the file. Missing keys use the defaults |
Pickups
Config.Pickups holds ramp layouts by model hash. The easy way to set up a pickup is /rampasghost in game, which saves to data/ramp_profiles.json (Commands). A layout saved in game wins over this table.
To keep a layout in the config, get its positions and rotations with /rampascoords and write them here in this format. The two entries that ship are examples for addon pickups.
Config.Pickups = {
[-593641979] = {
rotationOrder = 2,
ramps = {
{
position = { x = -0.51, y = -5.00, z = -0.35 },
relativeQuaternion = { w = 0.99, x = 0.12, y = 0.00, z = 0.00 }
},
{
position = { x = 0.53, y = -4.98, z = -0.34 },
relativeQuaternion = { w = 0.99, x = 0.12, y = 0.00, z = 0.00 }
}
}
},
}
An entry can also set atvBedInset (a bedInset for that pickup only) or atvBedY (the centre of the bed, along the vehicle).
config/trailer.lua
General
| Option | Default | What it changes |
|---|---|---|
debug |
false |
Logs everything to the server console and F8 and turns on the test commands (Troubleshooting). Leave it off on a live server |
adminAce |
'admin' |
The ACE of the admin tools. Every player can use the ramp kit, the trailers and the winch |
items |
see below | Which item places which trailer model |
items = {
suty_trailer_5x8 = 'suty_carryon58',
suty_trailer_7x16 = 'suty_carryon716',
suty_trailer_jetski = 'suty_jetski1',
},
Placing a trailer
placing:
| Option | Default | What it changes |
|---|---|---|
distance |
8.0 |
How far from the player the trailer can go, in metres |
maxSlope |
12.0 |
Steepest ground a trailer can stand on, in degrees |
turnStep |
5.0 |
Degrees per mouse wheel notch |
anyoneStores |
false |
false: only whoever placed a trailer can store it (admins always can). true: anyone can |
Hitching
| Option | Default | What it changes |
|---|---|---|
interactionDistance |
3.0 |
ox_target distance of the trailer options, in metres |
hitchDistance |
1.25 |
Enganchar a la pickup on a loaded trailer: largest distance between the ball and the coupler, in metres |
autoHitch.enabled |
false |
true: reversing slowly with the ball under the coupler hitches the trailer. The other autoHitch values set the distance, height, angle and speed it allows |
Carrying by hand
carry:
| Option | Default | What it changes |
|---|---|---|
ringDistance |
3.0 |
How far from the player the rings on the ground show, in metres (E works from 1.2 m) |
grabDistance |
8.0 |
Exports called without a trailer use the nearest loose one within this, in metres |
hitchDistance |
3.0 |
Hitching on foot: largest distance between the coupler and the ball, in metres |
maxStep |
3.5 |
Hitching on foot: how far the player walks on their own to the hitch spot, in metres |
dropKey |
'X' |
Default key to drop the trailer. Players can rebind it in the GTA key settings, FiveM section |
blockedControls |
list | GTA controls blocked while carrying: sprint, jump, enter vehicle, cover, weapons |
The other carry values (blendFrames, dropTime, hideDepth, renewInterval) tune the animation and the server lease. If you change hideDepth, keep it between 5 and 8.
Rear gate
| Option | Default | What it changes |
|---|---|---|
gateOpenTime |
1000 |
Lowering time when another script moves the gate, in ms |
gateCloseTime |
1200 |
Lifting time when another script moves the gate, in ms |
gateAnim.distance |
6.0 |
Exports called without a trailer use the nearest one within this, in metres |
gateAnim.walkTime |
6000 |
Longest walk to the gate spot before the animation, in ms |
What each trailer carries
Set in the entry of each model inside models. Cargo fills from the front.
| Option | 5x8 | 7x16 |
|---|---|---|
rows |
1 |
2 |
cars |
false |
true |
atvRows |
— | 3 |
atvHeading |
— | -90.0 |
sideBikeHeading |
— | -90.0 |
label— the trailer's name in gamerows— rows from the front. One row takes one ATV or two bikes side by sidecars— takes cars and side-by-sides too: one, alone on the trailer, if it fits between the railsatvRows— rows for ATVs when it differs fromrowsatvHeading— ATVs end turned this many degrees, so they take their width of deck.nilis straightsideBikeHeading— the last ATV row may take two bikes instead, turned this many degrees, once every row before it holds an ATV.nilis never
The other values in models and at the top level (cpl, axleY, hinge, deckZ, props...) describe the geometry of the models. Leave them as they are.
Jetskis
GTA's Seashark (seashark, seashark2, seashark3) and any model whose vehicles.meta flags it as a jetski load on their own.
jetskiModels = {}, -- e.g. { 'myjetski', 'otherjetski' }
jetskiFits = {},
| Option | What it's for |
|---|---|
jetskiModels |
Addon jetskis without that flag, by model name |
jetskiFits |
Where an addon jetski sits on the bunks when its hull differs from the Seashark's |
The easy way to fit a jetski is /ajustarjetski in game, which saves to data/jetski_fits.json and wins over this table (Commands).
A jetskiFits entry takes:
| Field | Meaning |
|---|---|
d |
Seat offset from the Seashark's, in trailer space, in metres (y towards the winch, z up) |
e |
The bow eye, in that jetski's own space |
own |
true: the model has its own bow eye, so the trailer's isn't added |
nose |
The front of its nose above the eye, { { z, y }, ... } in its own space. The strap goes round it |
resource |
Applies only while this resource is started (an addon that replaces a GTA model) |
Saved data
Admin saves are kept on the server and written to suty-rampas/data, so they travel if you move the resource to another server.
| File | Saved by |
|---|---|
data/ramp_profiles.json |
/rampasghost, /rampasghostbike |
data/cargo_profiles.json |
/ajustaratv |
data/jetski_fits.json |
/ajustarjetski |
