← RD Vehicle Shop

Documentation

RD Vehicle Shop

v1.0ESX

Requirements

ResourceWhat it is used forDownload
oxmysqlDatabase (all shop data, sales, financing, marketplace)Latest release
ox_libCallbacks, notifications, text UILatest release
ox_targetVendor, desk tablet, showcase cars (ALT), test drive returnLatest release
FrameworkMoney, jobs, admin groups, player identitysee Framework
MySQL / MariaDBDatabase server (MariaDB is recommended by oxmysql)MariaDB Community

Always download the release ZIP (oxmysql.zip, ox_lib.zip, ox_target.zip), not "Source code".
The source code is not built and causes errors such as No such export ... in resource oxmysql.

Optional
ResourceWhat it addsDownload
screenshot-basicAdmin panel → Take photo: a catalogue photo of any vehicle in one clickcitizenfx/screenshot-basic
cd_garage (Codesign)Keys are given automatically after a purchase or marketplace sale (Admin → Settings → General)Codesign docs
Any key systemHook Config.Keys.onVehicleOwned / onTestDriveVehicle in config.lua–
Discord webhookAdmin action log, sales log, financing log–

Installation

Installation

1. Dependencies

Download the release ZIPs of oxmysql, ox_lib and ox_target (links above) and put them into your resources folder.

2. The resource

Put the rd_vehicleshop folder into resources. Keep the folder name rd_vehicleshop.

3. Database

Import sql/install.sql into your server database (HeidiSQL, phpMyAdmin, …).

  • Every table uses CREATE TABLE IF NOT EXISTS, so an existing owned_vehicles table from ESX is not touched.
  • The script also creates any missing table or column by itself on start, so a later update needs no SQL.
4. server.cfg

The connection string must be set before any resource starts, and the order matters:

set mysql_connection_string "mysql://root:password@localhost:3306/fivem"

ensure oxmysql
ensure ox_lib
ensure es_extended        # or qb-core / qbx_core
ensure ox_target
# ensure screenshot-basic # optional
# ensure cd_garage        # optional

ensure rd_vehicleshop
5. config.lua
  • Config.Framework = 'esx' (or 'qb' / 'qbox')
  • Config.OwnedVehiclesTable: the table your garage reads (default owned_vehicles)
  • Config.ExtraColumnsSingle / Config.ExtraColumnsCart: extra columns your garage needs (e.g. in_garage, garage_id). Missing columns are added automatically.

Everything else (shops, vehicles, prices, positions, language, marketplace, plates, test drive) is set in game in the admin panel.

6. Admin access

There are two ways, and either one is enough:

-- config.lua: ESX groups / QB permissions
Config.AdminGroups = {'admin', 'superadmin', 'owner'}
# server.cfg: ACE permission (framework-independent)
add_ace group.admin rd.vehicleshop.admin allow
add_principal identifier.license:YOUR_LICENSE group.admin

Optional: limit someone to their own shops with Config.AdminRoles (shop_manager).

7. First start in game
  1. Type /vehicleshopadmin.
  2. Shops → Edit → Positions in the world: place the vendor, vehicle delivery, test drive start, vehicle preview spot and the desk tablet (look at the spot, mouse wheel / arrows rotate, E confirms, ESC cancels).
  3. Vehicles: add or edit vehicles (type the spawn code, and seats, speed and type are detected automatically). The Showcase tab adds cars that stand in the shop.
  4. Settings: language, plates, daily deal, test drive, 2D/3D tablet, Discord webhook.
8. Vehicle images

The catalogue shows nui/img/vehicles/<model>.png. You can add images in three ways:

  • put a PNG / JPG / WEBP named after the spawn code into nui/img/vehicles/,
  • set an https:// image URL on the vehicle in the admin panel,
  • or use Take photo in the vehicle form (requires screenshot-basic).

A car without an image shows a placeholder icon, so nothing breaks.

FAQ

FAQ

How do I open the admin panel?
/vehicleshopadmin. The command name is Config.AdminCommand.

Where do I add shops, vehicles and categories? There is nothing in config.lua.
In the admin panel. shared/defaults.lua is only the starting catalogue for a fresh install. After that, the database wins.

How do I change the language?
Admin panel → Settings → Language. Included: English, Slovak, Czech, German.

How do I add my own language?

  1. Copy locales/en.lua to locales/xx.lua.
  2. Change Locales['en'] to Locales['xx'] and translate the texts.
  3. Set date_locale, e.g. 'fr-FR'.

It appears in Settings automatically.

Can I sell addon vehicles?
Yes. The model must be streamed on your server. Type its spawn code in Add vehicle, and seats, speed and type are read from the model.

The car in the vehicle detail floats in an empty studio / in the sky.
Place the Vehicle preview spot for that shop (Edit → Positions in the world). Without it the empty studio is used.

Players don't get keys after buying.

  • cd_garage: enable the key integration in Settings → General.
  • Any other key system: add your export to Config.Keys.onVehicleOwned in config.lua.

Bought cars don't appear in my garage.
Check that Config.OwnedVehiclesTable is the table your garage reads, and set the extra columns it needs in Config.ExtraColumnsSingle / Config.ExtraColumnsCart. For QBCore / QBox, see the Framework note.

How does financing work? Can players lose the car while offline?

  • The player pays a down payment and gets the car right away. Instalments are charged automatically from Config.Financing.account.
  • With onlineOnly = true (default) the due date waits while the player is offline.
  • After maxMissed missed instalments the car is repossessed.

How do company (job) shops work?
Set a job on the shop in the admin panel. Only employees can enter and they pay from the company account. A built-in account works out of the box. To use your own society system, fill Config.CompanyMoney.

How do I turn off the 3D tablet?

  • Admin → Settings → Display: set the default view and whether players may switch.
  • To disable 3D completely, set Config.Tablet3D.enabled = false.

My ox_target key is not ALT.
The label above the showcase cars only shows text. Change it with Config.Showcase.label.key.

How does a player end a test drive early?
Leave the vehicle, use the target on it, or type /returncar.

Can I limit how many cars a player owns?
Yes, with Config.MaxVehiclesPerPlayer (0 = no limit).

Can I edit prices in bulk?

  • Select vehicles in the admin panel and use bulk edit.
  • Or use Export / Import CSV. The files are in rd_vehicleshop/csv/.

Common errors

Common errors

Error / symptomCauseFix
Could not find dependency ox_lib for resource rd_vehicleshop (or ox_target / oxmysql)Dependency missing or started laterInstall it and keep the ensure order from step 4
No such export ... in resource oxmysqloxmysql "Source code" downloaded, or it starts too lateDownload the release oxmysql.zip, and start it first (oxmysql docs)
oxmysql cannot connect to the databaseWrong connection string, or reserved characters (@ / : #) in the passwordCheck mysql_connection_string; try the user=...;password=...;host=...;port=...;database=... format (oxmysql docs)
UI does not open / ox_lib errors right after startox_lib "Source code" downloaded instead of the releaseDownload the release ox_lib.zip (releases bundle extra files the source does not)
[rd_vehicleshop] Insert into owned_vehicles failed (...)Your garage table needs a column with no default valueAdd the column with a value to Config.ExtraColumnsSingle / Config.ExtraColumnsCart (it is created automatically)
"You don't have permission" on /vehicleshopadminGroup not in Config.AdminGroups and no ACEAdd the group, or the add_ace / add_principal lines from step 6
Shop "pdm": no desk for the tablet was found in front of the vendorNo table in front of the vendorPlace Tablet on the desk in the admin panel. Until then the shop opens via the vendor / zone
WARNING: Config.Locale = "xx", but no locales/xx.lua was loadedWrong locale file nameThe file name and Locales['xx'] must match. Falls back to English
The 3D tablet could not start (...) - using the flat view.DUI not available on the clientUpdate the server artifacts. The shop keeps working in the flat (2D) view
Invalid ped model "..." - the ped will not be created.Typo in the vendor ped modelFix the model in the shop form
Plate shows TakenThat plate already exists in the vehicles tableChoose another text
Car is not in the QB garageQB garages read player_vehiclesSee the Framework note
Vehicle images missingNo file nui/img/vehicles/<model>.pngSee Vehicle images
Preview floor missing / car falls in the previewPreview spot far from the player and not streamed yetNormally handled (Config.PreviewFocusDistance). Place the preview spot inside or near the shop

Turn on Debug in Admin → Settings to print detailed loading information to the server console ([rd_vehicleshop DEBUG] ...).

Still stuck? Ask in our Discord.

REVOLUTION

FiveM scripts for roleplay communities, with the license delivered automatically the moment payment confirms.

Store

Community

Legal

Payments

Checkout and payment are handled by Tebex. This site never sees your card.

© 2026 Revolution Development. All rights reserved.Built for FiveM roleplay communities.