Browse documentationqr-vehicleshop
On this page
Resource guide

qr-vehicleshop

One storefront for cars, boats, and aircraft.

QboxQBCoreOX LibOX MySQLOX TargetQB TargetLunar Garage schema
Resource page View source
Version
v1.0.1-qbox
Updated
Aug 15, 2026
License
MIT
01 / OVERVIEW

Start here

This QR Vehicle Shop fork supports Qbox and QBCore dealerships for cars, boats, helicopters, and planes. It uses ox_lib and oxmysql, requires a target provider for normal shop access, and can write the garage, type, stored, and state columns used by the compatible Lunar Garage build.

02 / REQUIREMENTS

What you need

Frameworkqbx_core or qb-core
Requiredox_lib and oxmysql
Databaseplayer_vehicles with required base ownership columns
Interactionox_target or qb-target
Resource nameMust remain qr-vehicleshop
03 / INSTALLATION

Install and start

  1. 01

    Back up the player_vehicles table and existing dealership configuration.

  2. 02

    Place qr-vehicleshop in your resources without renaming it.

  3. 03

    For an existing Qbox/Lunar database, review and import qbox_lunar_vehicle_columns.sql rather than replacing the table.

  4. 04

    Configure the framework, target, shops, garage identifiers, fuel, keys, payment account, and test-drive behavior before starting the resource.

Recommended start orderplain text
ensure oxmysql
ensure ox_lib
ensure qbx_core            # or qb-core
ensure ox_target           # or qb-target
ensure ox_fuel             # default; configure another provider if needed
ensure qbx_vehiclekeys     # optional; or qb-vehiclekeys
ensure lunar_garage        # recommended, not a hard dependency
ensure qr-vehicleshop
04 / CONFIGURATION

Configuration checkpoints

01

Select the framework and target

Set Config.Framework to auto, qbox, or qb and Config.Target to auto, ox_target, or qb-target. For predictable startup, explicitly select the resources installed on the server.

Exampleplain text
Config.Framework = 'qbox'
Config.Target = 'ox_target'
02

Define every dealership

Configure each shop's label, vehicle type, categories, ped, target, blip, test-drive location, purchase spawn, and default garage. Garage identifiers must exactly match the installed garage configuration.

03

Prepare the ownership schema

Back up player_vehicles before importing qbox_lunar_vehicle_columns.sql. The insert always requires license, citizenid, vehicle, hash, mods, and plate; only the extra garage, type, state, stored, job, fuel, engine, and body fields are conditionally detected. Do not replace a live framework table with the full base SQL file.

04

Configure fuel and keys

The default fuel setting is ox_fuel. Choose auto, native, LegacyFuel, ps-fuel, or cdn-fuel when appropriate. KeySystem none does not fully suppress key grants when qbx_vehiclekeys or qb-vehiclekeys is running, so use it only after correcting or validating that server helper.

05

Tune purchases and test drives

Review the payment account, maximum purchase distance, purchase cooldown, plate format, test-drive duration, cancel-on-exit setting, and player or vehicle invincibility before opening the shops.

06

Keep database state aligned with the spawned vehicle

The success handler still spawns a purchased vehicle outside even when PurchasedVehicleState and PurchasedVehicleStored are set to 1. Those values do not create a true buy-direct-to-garage flow; keep them consistent with an outside vehicle unless the client spawn path is also customized.

05 / USAGE

Validate the resource

Test every shop type

Use the configured target on the auto, boat, and air dealership peds. Browse categories, search, start and end a test drive, then purchase one vehicle from each enabled shop.

Validate the ownership handoff

Confirm the purchased plate appears once in player_vehicles with the intended type, garage, stored, and state values, then park and retrieve it through the selected garage system.

Confirm rejection and spawn checks

Test the server's insufficient-funds, excessive-distance, invalid-model, and database-failure paths, then manually keep each configured purchase spawn point clear and test it. The purchase is charged and inserted before the client spawn attempt, so a client spawn failure does not trigger an automatic refund.

06 / TROUBLESHOOTING

Common checks

The dealership ped has no interaction

Start the selected target before qr-vehicleshop, confirm Config.Target matches it, and verify the shop ped model and target coordinates.

Purchases do not complete

Confirm qbx_core or qb-core was running before the shop, the payment account exists, and the server console shows no validation or player_vehicles insert error. The internal fallback is not a standalone economy adapter.

A purchased vehicle is missing from the garage

Verify the shop's garage identifier exists, the vehicle type matches that garage, and the columns expected by the selected garage integration are present and synchronized.

Fuel, keys, or images are missing

Start the configured fuel and key resources before the shop. KeySystem none may still grant keys through a running supported key resource in the current server helper. Vehicle models without bundled images use a remote FiveM documentation image fallback, which requires client network access.

07 / REFERENCE

Source and release notes

  • Lunar Garage compatibility is database-schema and garage-name compatibility, not a hard runtime API dependency.
  • The resource name must remain qr-vehicleshop because NUI image paths reference it directly.
  • The inherited screenshot and video predate the Qbox, multi-shop, boat, aircraft, and Lunar-compatible changes.
  • The repository README's upstream releases link does not contain DrSnyder's fork changes; download this fork from its own source repository.
  • This MIT fork retains QR Development and original copyright credit.