Installation ​
Requirements ​
Use a current FiveM server with OneSync and oxmysql. ESX and np_inventory are the primary framework/inventory pair. QB/QBX and standalone bridges are provided; standalone servers must supply compatible ownership storage and economy behavior.
The frontend build requires Node.js/npm; the resource’s build script invokes npm internally. The examples below use Bun to install and launch that script.
- Place the resource in your resources directory under the name
np_dealership. - Build the frontend:
cd np_dealership/web
bun install
bun run build
The build creates web/dist/index.html, web/dist/phone.html and assets used by the manifest.
- Import
sql/np_dealership.sql. Tables are also created withCREATE TABLE IF NOT EXISTSat startup; back up your database before upgrades. - Review the presets in
shared/config/dealers.lua, catalog pricing, importer costs and supply caps. - Register
car_keys,vehicle_registrationandvehicle_receiptfromshared/items.luain your inventory if it requires explicit item registration. - Start oxmysql, your framework and the optional integrations you use before the resource.
ensure oxmysql
ensure es_extended
ensure np_inventory
# Start available np_admin / np_faction / np_payments / np_phone integrations here.
ensure np_dealership
Ownership and handover ​
ESX ownership uses owned_vehicles; QB/QBX uses player_vehicles. Check your custom schema against bridge/framework/server/ before allowing purchases. Garage assignment probes a compatible np_garages API and otherwise relies on stored/default garage fields in the ownership row.
Ownership persistence, keys, registration and garage assignment span separate resources; they are not one cross-resource SQL transaction. Verify the handover steps and recovery behavior with your server’s installed versions. Interrupted or inconclusive payout credits can enter an admin review queue; see Payout reconciliation.
Verify on your server ​
Check NPC interaction, display models, quote expiry, two buyers competing for the last unit, insufficient funds, purchase ownership/keys, test-drive cleanup, resource restart, importer delivery and phone RPCs. Also test optional resources both running and stopped. Browser fixture screenshots and pure-Lua checks do not verify live OneSync or your database schema.