Skip to main content

Requirements

Everything else is optional and auto-detected — see Optional integrations.

Steps

  1. Drop the resource into your server, e.g. resources/[nex]/nex_dealerships/.
  2. Add it to your server.cfg after its dependencies:
    ensure oxmysql
    ensure ox_lib
    ensure qbx_core           # or qb-core / es_extended
    ensure nex_dealerships
    
  3. Start your server. The database tables are created automatically on first start — no SQL to run.
  4. Grant admin access for the catalog panel. Either:
    add_ace group.admin nex_dealerships.admin allow
    
    …or rely on the default FiveM admin groups (group.admin, group.superadmin). Both are accepted out of the box.
  5. In-game, run /dealershipadminImport and pick your framework. This loads the bundled vehicle list from qb-core / qbox / esx into the dealership catalog.
That’s it — the four default dealerships (PDM, boats, air, trucks) appear on the map.
Vehicles only show up at a lot once the catalog has entries and the lot’s Categories match those vehicles’ categories. Step 5 is what wires those up — don’t skip it.

Manual SQL install (optional)

The resource creates all nex_dealership_* tables on boot. If you’d rather pre-create them — to inspect the schema, split maintenance windows, or pre-grant DB permissions — run the matching file from install/:
FileWhen to use
install/install-qb.sqlQBCore / Qbox servers
install/install-esx.sqlESX servers
install/existing.sqlSeeds the catalog with ~864 stock GTA vehicles. Optional — you can also seed via the admin panel’s Import tab.
All statements use CREATE TABLE IF NOT EXISTS and are safe to re-run.

Checking it worked

From F8:
lua print(GetResourceState('nex_dealerships'))
Should print started. If it prints missing or stopped, fix server.cfg and restart. To check that the framework was detected, temporarily set Config.Debug = true in shared/config.lua and restart — boot logs print the detected framework, notify system, target system, and keys system.

Updating

shared/config.lua, shared/locations.lua, shared/locale.lua, shared/vehicles.lua, and every file in integrations/ are listed under escrow_ignore and are preserved across updates. Catalog, settings, sales, loans, employees, stock, orders, and display-vehicle data all live in MySQL and are preserved automatically.
  1. Replace the resource files with the new version (keep your edited shared/ and integrations/ files).
  2. Restart the server.