QBCore Frameworkqbcore.netCommunity docs
On this page

Updated 2026-10-11 · 4 min read

qb-vehicleshop: dealership setup and finance

qb-vehicleshop operates public and job-managed vehicle dealerships, showroom vehicles, test drives, purchases and financed sales. This reference is based on upstream commit e865297. The resource is not a generic vehicle-inventory microservice with arbitrary create-sale exports.

Installation and ownership

  1. Start qb-core, oxmysql and the required PolyZone components. Verify qb-menu, qb-input, vehicle-key, fuel and banking integrations used by your server.
  2. Deploy the full qb-vehicleshop resource, including locales, config.lua and client/server code.
  3. Back up the current player_vehicles schema and records before comparing the bundled vehshop.sql. Do not blindly recreate a shared table that your garage and phone already use.
  4. Test a cash purchase, bank purchase, a test drive and a financed vehicle on staging.

The upstream SQL defines/extends player_vehicles. Standalone tables named vehicle_sales, dealership_inventory or vehicle_financing are not created by its bundled SQL.

Configuration

KeyDefaultMeaning
Config.UsingTargetBased on UseTarget convarShow target interactions
Config.Commission0.10Commission for full sales
Config.FinanceCommission0.05Commission for financed sales
Config.PaymentWarning10Time before finance-related repossession workflow
Config.PaymentInterval24Hours between payments
Config.MinimumDown10Minimum down-payment percentage
Config.MaximumPayments24Maximum permitted payments
Config.PreventFinanceSellingfalsePrevent transfers of financed vehicles
Config.FilterByMakefalseShow make filter
Config.SortAlphabeticallytrueSort vehicle selectors
Config.ShopsDealership definitionsShop geometry, job, showrooms and test-drive spawns

Within Config.Shops.pdm, the upstream configuration uses Type, Zone, Job, ShopLabel, VehicleSpawn, TestDriveSpawn, FinanceZone, TestDriveTimeLimit and ShowroomVehicles. There is no root-level Config.Dealerships or Config.FinancingPlans in the reviewed file.

Purchase, finance and storage events

The server registers:

NamePurpose
qb-vehicleshop:server:buyShowroomVehiclePublic outright purchase flow
qb-vehicleshop:server:financeVehiclePublic financed purchase
qb-vehicleshop:server:financePayment / financePaymentFullPayment handling
qb-vehicleshop:server:sellShowroomVehicleJob sales workflow
qb-vehicleshop:server:sellfinanceVehicleJob finance sales workflow
qb-vehicleshop:server:checkFinanceFinance state checks
QBCore callback qb-vehicleshop:server:spawnvehicleLooks up matching plate and vehicle ownership before spawn

These are resource-owned internal events/callbacks, not stable exports for arbitrary clients. The reviewed server does not register OpenDealership, CreateFinancingPlan or UpdateInventory as public exports.

Verify vehicle and money ownership

The upstream spawn callback queries player_vehicles with both plate and the player's citizen ID, then checks model matching. Do not bypass that with a client-supplied vehicle or plate in your own script. When integrating keys, grant them from a trusted server flow after establishing ownership via qb-vehiclekeys.

For job-managed vehicle sales, the source uses exports['qb-banking']:AddMoney(jobName, vehiclePrice, 'Vehicle sale') to credit a named society account. That is the banking resource's server export, not a qb-vehicleshop export.

Troubleshooting

SymptomCheck
Vehicles missing from menuShared vehicle definitions, categories and Config.Shops
Showroom/test drive doesn't spawnShop zone, spawn point and entity/network ownership
Vehicle purchased but not in garageplayer_vehicles schema, citizen ID, plate and garage integration
No car keys after purchaseServer-side vehicle handover and qb-vehiclekeys:GiveKeys
Financing does not workMinimumDown, payment interval, balance, saved finance fields
Society does not receive sale moneyCorrect named qb-banking account initialized
No such export OpenDealershipThis upstream resource does not expose that export

Update checklist

  1. Pin qb-vehicleshop, qb-core, qb-banking, qb-vehiclekeys and garage revisions.
  2. Preserve customized shop definitions and back up shared vehicle SQL before updates.
  3. Test purchases, vehicle ownership, financed repayments and keys across reconnect.
  4. Reject invalid client price/model/down-payment requests on the server.

Sources

Repository · Config · Server sales/finance · Vehicle SQL

Found an issue in this guide?

Send the page URL, the affected example, and a source or reproduction to the site maintainer. For a server or resource problem, use the support guide.

On this page

Leonida RP server website built with RPWebsite
RPWebsite

Advertisement · RPWebsite

Want a website for your server?

Launch a site with live player status, rules, and a join button in minutes.

Build your website