r_vehicleshop Configuration
r_vehicleshop config: framework, currency and payment, test drives and plates, stats and colours, blocklist, traffic, showroom options, shops and hooks.
All settings live in config.lua. Restart the resource after changing it. The vehicle lists are on
Adding Vehicles.
General
R.Framework = 'auto' -- 'auto' | 'esx' | 'qb' | 'qbox'
R.CoreName = 'es_extended' -- ESX only: change if your es_extended is renamed
R.Inventory = 'ox_inventory' -- ESX cash: 'esx' | 'ox_inventory' | 'qs-inventory' (QB / QBX use the framework cash account)
R.Target = 'ox_target' -- 'ox_target' | 'qb-target' | 'none' | 'custom'
R.TextUI = 'gta' -- 'gta' | 'ox_lib' | 'okok' | 'qb' | 'jg' | 'cd' | 'esx' | 'custom'
R.Notify = 'ox_lib' -- 'ox_lib' | 'esx' | 'qb' | 'okok' | 'custom' (edit Notify in client/cl_custom.lua)
R.Debug = false
R.EnableLogs = true -- Discord webhook logs (set the webhook in server/sv_custom.lua)
R.EnableAutoinsert = true -- create the vehicle table on first start if it is missingThe language comes from setr ox:locale in server.cfg. Add your own by copying
locales/en.json.
Prompt style and custom target
R.TextUI sets how the "press E" prompts look: gta (default, GTA help text), ox_lib, okok,
qb, jg, cd, esx or custom. For custom, edit BridgeTextUI in bridge/cl_textui.lua.
R.Target = 'none' uses the built-in key prompt, no target script needed. R.Target = 'custom'
is for any other target script: fill in BridgeCustomTarget in bridge/cl_target.lua with
AddBoxZone, AddModels, AddEntity and Remove. Each option has name, label, icon,
distance, canInteract and onSelect.
The bridge/ folder is open, so you can edit it freely.
Money
R.Currency = {
symbol = '€', -- currency symbol
after = true, -- false -> $1,000 | true -> 1,000$
separator = ' ' -- thousands separator: ',' | ' ' | '.' | '' (none)
}
R.SpeedUnit = 'kmh' -- 'kmh' | 'mph'
R.Payment = { cash = true, bank = true } -- payment methods offered in the purchase dialogTest Drives & Plates
R.TestDriveCooldown = 30 -- seconds a player has to wait after a test drive before the next one (0 = none)
R.ShowroomPlate = 'SHOWROOM' -- plate text on showroom and showcase vehicles (max 8 characters)
R.TestDrivePlate = 'TESTDRIV' -- plate text on test drive vehicles (max 8 characters)
R.Plate = { -- generated plates look like 'ABC 123'; keep letters + numbers (+ space) at 8 characters or less
letters = 3,
numbers = 3,
space = true
}Plates are always unique. The test drive length is set per shop.
Stats & Colours
R.Stats = { -- values that fill a stat bar to 100 %
maxSpeed = 250, -- km/h
maxAcceleration = 0.5,
maxBraking = 1.5,
maxHandling = 3.0
}
R.AllowColorPick = true -- colour picker in the showroom; the chosen colours are saved on the bought vehicle
R.Colors = { -- preset swatches in the colour picker
'#f4f4f5', '#0b0b0e', '#9a27ea', '#2563eb', '#dc2626', '#f59e0b', '#16a34a', '#64748b'
}If all your fast cars show a full bar, raise the max values.
Blocklist & Traffic
R.Blocklist = { 'police', 'police2', 'police3', 'police4', 'ambulance', 'firetruk' } -- never sold, even if a framework vehicle list has them
R.NoTraffic = { -- remove GTA's ambient traffic near the shop
enabled = true,
radius = 100.0, -- metres around each shop's Showroom
clearOnEnter = true -- also remove the game's own NPC vehicles that are already inside the radius when a player arrives
}Only the game's own NPC cars are removed. Player and script vehicles are never touched.
Showroom
R.ShowcaseRange = 80.0 -- showcase vehicles are spawned locally when a player is within this many metres
R.ShowroomHideRadius = 8.0 -- while browsing, showcase vehicles are hidden and any other vehicle this close to the Showroom spot is hidden too
R.HidePlayerWhileBrowsing = true -- hide the player's own ped for themselves while browsing
R.HideTopHud = true -- hide R_Tophud while the showroom is open (other HUDs: see OnShowroomOpened in client/cl_custom.lua)The showroom car is only visible to the player browsing, so it never blocks anyone.
Shops
Each shop is one entry in R.Shops. Ships with pdm (Premium Deluxe Motorsport) and boats
(Los Santos Marina). Copy one to add another.
R.Shops = {
pdm = {
Label = 'Premium Deluxe Motorsport',
Ped = { Model = 'cs_siemonyetarian', Scenario = 'WORLD_HUMAN_CLIPBOARD', Coords = vector4(-56.6807, -1098.6229, 26.4224, 23.5315) },
Blip = { Sprite = 820, Colour = 43, Scale = 0.9, Name = 'Vehicle Shop' },
Showroom = vector4(-45.9936, -1096.9407, 26.4224, 253.3419),
TestDrive = { Coords = vector4(-45.5232, -1112.4572, 26.6702, 68.3817), Time = 60, End = 'showroom' },
Delivery = {
vector4(-17.0262, -1085.0742, 27.0418, 219.34),
vector4(-59.61, -1104.74, 25.85, 70.13),
vector4(-52.34, -1107.93, 25.87, 71.63)
},
Exit = vector4(-32.7195, -1096.0895, 27.2744, 75.0),
Garage = 'pillboxgarage',
UseFrameworkVehicles = false,
Showcase = {
{ Model = 'elegy2', Coords = vector4(-43.2449, -1101.9443, 26.4223, 16.8891) },
},
Categories = { ... },
Vehicles = { ... },
},
}| Key | What it does |
|---|---|
Ped / Blip | The seller and its map blip. Remove Blip to hide it. |
Showroom | Where the showroom car stands and the camera looks. |
TestDrive | Start spot(s), Time in seconds, and End: 'showroom', 'return' (to Exit) or 'destroy' (player stays where they are). |
Delivery | Where a bought car appears. With a list, the first free spot is used. |
Exit | Where the player goes after a test drive. |
Garage | QBCore and QBX: garage saved on the bought car. |
Showcase | Display cars. Targeting one opens the showroom on that model. |
Categories / Vehicles / UseFrameworkVehicles | The catalog, see Adding Vehicles. |
Hooks
client/cl_custom.lua and server/sv_custom.lua are open, so you can connect your own scripts.
| Hook | What it's for |
|---|---|
Notify | Your notifications. |
SetFuel | Your fuel script. ox_fuel, LegacyFuel, cdn-fuel, ps-fuel and lc_fuel work already. |
OnShowroomOpened, OnShowroomClosed | Hide your own HUD while browsing. |
OnVehicleDelivered, OnTestDriveStarted | Anything extra on a bought or test car. |
GiveKeys | Your key script. qbx and qb vehicle keys work already. |
RegisterOwnedVehicle | How the car is saved. If it fails, the player is refunded. |
Log | Discord purchase logs. |
Interface Colours
R.UI = {
Accent = '#9a27ea',
Primary = "#ffffff", -- main action buttons (buy / play / confirm)
PrimaryText = "#000000", -- text on those buttons
NavActive = "", -- selected tab background, "" keeps the neutral default
NavActiveText = "#ffffff",-- selected tab text
}