Skip to content
Documentation
Server Essentials4Vehicle Shop

r_vehicleshop Adding Vehicles

Add categories, base-game and add-on vehicles to r_vehicleshop, use your framework's vehicle list, and set up showcase cars and boat shops.

Every shop in config.lua has Categories (the tabs) and Vehicles (one list per tab).

Categories

Categories = {
    { key = 'super', label = 'Super' },
    { key = 'sports', label = 'Sports' },
    { key = 'motorcycles', label = 'Motorcycles' },
},

key is the list name in Vehicles, label is what players see. Each tab shows a picture of its first car, or set image = 'https://...'. A shop with one category opens straight on its cars.

Base-game vehicles

Just the model and the price. The name, brand and picture come from the game.

Vehicles = {
    super = {
        { model = 'adder', price = 900000 },
        { model = 'zentorno', price = 725000 },
    },
},

Add-on vehicles

{ model = 'mycar', label = 'My Car', brand = 'My Brand', price = 50000, image = 'https://example.com/mycar.png' },

label, brand and image are optional and override what the game gives. Models that aren't on the server are skipped. Set R.Debug = true to see which ones in F8.

Use your framework's list

QBCore and QBX have a shared vehicle list, ESX has the vehicles table (from esx_vehicleshop). Set UseFrameworkVehicles = true on a shop and its catalog comes from there, with your existing prices.

pdm = {
    UseFrameworkVehicles = true,
    Categories = {
        { key = 'super', label = 'Super' },
        { key = 'sports', label = 'Sports' },
    },
    Vehicles = {
        super = {
            { model = 'adder', price = 1500000 }, -- overrides the framework price
        },
    },
},
  • Only categories listed in Categories are shown, so emergency and the like stay out.
  • Vehicles entries are added on top and win over the same model.
  • R.Blocklist removes models you never want sold.
  • Restart the resource after changing the framework list.

Showcase cars

Showcase = {
    { Model = 'elegy2', Coords = vector4(-43.2449, -1101.9443, 26.4223, 16.8891) },
    { Model = 'vacca', Coords = vector4(-46.5361, -1101.7075, 26.4223, 16.8891) },
},

Use models that are also in the shop's list, so targeting one opens the showroom with its price.

Boats, bikes and aircraft

Any vehicle works. For a boat shop put Showroom, TestDrive and Delivery on water. The included boats shop is a ready example.