Ramps/Trailers

Installation

Installation

1. Drop both resources

Your package has two resources. Copy both folders into your resources folder:

server-data/resources/[suty]/suty-rampas-assets/
server-data/resources/[suty]/suty-rampas/
Folder What it has
suty-rampas-assets The ramp and trailer models, textures and animations
suty-rampas The script

Keep both folder names exactly as they are: the items and the manifest call the resources by name.

2. Start them in server.cfg

Start them after ox_lib, ox_target, your inventory and your framework, with the assets before the script:

ensure ox_lib
ensure qbx_core
ensure ox_target
ensure ox_inventory
ensure suty-rampas-assets
ensure suty-rampas

Use qb-core or es_extended in place of qbx_core on those frameworks, and qb-inventory in place of ox_inventory if that's your inventory.

Framework and inventory are found automatically. To force one, set Config.Framework and Config.Inventory at the top of config/config.lua (Configuration).

3. Items

The script uses four items: the ramp kit and the three trailers. Add them according to your inventory. The weights are yours to change.

Item Label What it does
suty_ramp_kit Kit de rampas Two ramps for a pickup
suty_trailer_5x8 Remolque Suty 5x8 Places the 5x8 trailer
suty_trailer_7x16 Remolque Suty 7x16 Places the 7x16 trailer
suty_trailer_jetski Remolque de jetski Places the jetski trailer

Paste the entries of install/ox_inventory_items.lua inside the return { ... } table of ox_inventory/data/items.lua, then restart ox_inventory.

['suty_ramp_kit'] = {
    label = 'Kit de rampas',
    weight = 10000,
    stack = false,
    close = true,
    consume = 0,
    description = 'Dos rampas para subir un ATV o motos a la pickup. Úsalo al lado de la pickup.',
    client = { export = 'suty-rampas.useKit' }
},

['suty_trailer_5x8'] = {
    label = 'Remolque Suty 5x8',
    weight = 20000,
    stack = false,
    close = true,
    consume = 0,
    description = 'Remolque para ATV, motos y UTV pequeños. Úsalo para ponerlo en el piso; con el ojo sobre él, «Guardar remolque» lo devuelve al inventario.',
    client = { export = 'suty-rampas.useTrailer' }
},

['suty_trailer_7x16'] = {
    label = 'Remolque Suty 7x16',
    weight = 25000,
    stack = false,
    close = true,
    consume = 0,
    description = 'Remolque grande para UTV, carros y ATV. Úsalo para ponerlo en el piso; con el ojo sobre él, «Guardar remolque» lo devuelve al inventario.',
    client = { export = 'suty-rampas.useTrailer' }
},

['suty_trailer_jetski'] = {
    label = 'Remolque de jetski',
    weight = 20000,
    stack = false,
    close = true,
    consume = 0,
    description = 'Remolque con winche para un jetski. Úsalo para ponerlo en el piso; con el ojo sobre él, «Guardar remolque» lo devuelve al inventario.',
    client = { export = 'suty-rampas.useTrailer' }
},

Leave consume = 0. The script takes the item once the trailer stands on the ground, not ox_inventory.

4. Item images

Copy the images from install/ to your inventory's image folder (ox_inventory/web/images/ or qb-inventory/html/images/):

  • ramp_kit.png, renamed to suty_ramp_kit.png
  • suty_trailer_5x8.png
  • suty_trailer_7x16.png
  • suty_trailer_jetski.png

5. Admin permission

The admin tools check the ACE named in config/trailer.lua (adminAce, default admin). That's the ACE Qbox already uses, and it works the same on QB-Core and ESX. If your admin group doesn't have it yet, add this to server.cfg:

add_ace group.admin admin allow

6. Make data writable

The suty-rampas/data folder has to be writable. What admins save goes there, so it travels with the resource: ramp_profiles.json, cargo_profiles.json and jetski_fits.json.

7. Restart the server

Do a full server restart after adding the items. On a healthy boot the console prints what it found:

[suty-rampas] framework: qbx, inventario: ox_inventory

8. Set up your pickups

Ramps have to be set up once per pickup model before players can use the kit. Without that they get «Esta pickup no tiene rampas configuradas». Trailers need no setup.

As an admin, stand next to the pickup and run /rampasghost. Move the ramps until the top end rests on the open tailgate and the feet touch the ground, then right-click and pick Confirmar ambas rampas. It's saved for every pickup of that model, for everyone. See Commands for the editor keys.

9. Quick test

  1. Give yourself the items.
  2. Use suty_ramp_kit next to the pickup you set up and pick Colocar rampas. Stand on each white ring and press E.
  3. Drive an ATV behind the ramps, lined up with them, and press E. It rides up.
  4. Use suty_trailer_5x8, aim at clear flat ground and left-click. The trailer stands there.
  5. Stand on the ring by the tongue and press E to grab it, then X to drop it.
  6. With the eye on the trailer, pick Guardar remolque. The item comes back.

Merry Christmas.

From Suty.