| Resource | What it is used for | Download |
|---|---|---|
| oxmysql | Database (all shop data, sales, financing, marketplace) | Latest release |
| ox_lib | Callbacks, notifications, text UI | Latest release |
| ox_target | Vendor, desk tablet, showcase cars (ALT), test drive return | Latest release |
| Framework | Money, jobs, admin groups, player identity | see Framework |
| MySQL / MariaDB | Database 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 asNo such export ... in resource oxmysql.
| Resource | What it adds | Download |
|---|---|---|
| screenshot-basic | Admin panel → Take photo: a catalogue photo of any vehicle in one click | citizenfx/screenshot-basic |
| cd_garage (Codesign) | Keys are given automatically after a purchase or marketplace sale (Admin → Settings → General) | Codesign docs |
| Any key system | Hook Config.Keys.onVehicleOwned / onTestDriveVehicle in config.lua | – |
| Discord webhook | Admin action log, sales log, financing log | – |
Download the release ZIPs of oxmysql, ox_lib and ox_target (links above) and put them into your resources folder.
Put the rd_vehicleshop folder into resources. Keep the folder name rd_vehicleshop.
Import sql/install.sql into your server database (HeidiSQL, phpMyAdmin, …).
CREATE TABLE IF NOT EXISTS, so an existing owned_vehicles table from ESX is not touched.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_vehicleshopConfig.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.
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.adminOptional: limit someone to their own shops with Config.AdminRoles (shop_manager).
/vehicleshopadmin.The catalogue shows nui/img/vehicles/<model>.png. You can add images in three ways:
nui/img/vehicles/,https:// image URL on the vehicle in the admin panel,screenshot-basic).A car without an image shows a placeholder icon, so nothing breaks.
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?
locales/en.lua to locales/xx.lua.Locales['en'] to Locales['xx'] and translate the texts.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.
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?
Config.Financing.account.onlineOnly = true (default) the due date waits while the player is offline.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?
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?
rd_vehicleshop/csv/.| Error / symptom | Cause | Fix |
|---|---|---|
Could not find dependency ox_lib for resource rd_vehicleshop (or ox_target / oxmysql) | Dependency missing or started later | Install it and keep the ensure order from step 4 |
No such export ... in resource oxmysql | oxmysql "Source code" downloaded, or it starts too late | Download the release oxmysql.zip, and start it first (oxmysql docs) |
| oxmysql cannot connect to the database | Wrong connection string, or reserved characters (@ / : #) in the password | Check mysql_connection_string; try the user=...;password=...;host=...;port=...;database=... format (oxmysql docs) |
| UI does not open / ox_lib errors right after start | ox_lib "Source code" downloaded instead of the release | Download 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 value | Add the column with a value to Config.ExtraColumnsSingle / Config.ExtraColumnsCart (it is created automatically) |
"You don't have permission" on /vehicleshopadmin | Group not in Config.AdminGroups and no ACE | Add 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 vendor | No table in front of the vendor | Place 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 loaded | Wrong locale file name | The 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 client | Update 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 model | Fix the model in the shop form |
| Plate shows Taken | That plate already exists in the vehicles table | Choose another text |
| Car is not in the QB garage | QB garages read player_vehicles | See the Framework note |
| Vehicle images missing | No file nui/img/vehicles/<model>.png | See Vehicle images |
| Preview floor missing / car falls in the preview | Preview spot far from the player and not streamed yet | Normally 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.