How to Build a Clean Vehicle Shop in QBCore/ESX
How to Build a Clean Vehicle Shop in QBCore/ESX (With Jobs & Keys)
Every serious FiveM server eventually needs a functional vehicle shop. Whether you’re selling cars to players or setting up a dealership job, a messy or buggy setup will frustrate your community. Here’s how to build a clean vehicle shop in QBCore or ESX, with jobs, keys, and stability in mind.
1. Pick the right base resource
Start with a reliable framework shop resource designed for your framework. Most vehicle shop scripts for QBCore/ESX already include vehicle purchasing, finance options, and integration with job roles. Avoid outdated versions that lack proper key handling or don’t support multiple categories.
You can explore Business & Store assets that integrate smoothly with QBCore/ESX workflows.
2. Define dealership as a job
Both QBCore and ESX let you assign dealerships as jobs. This ensures only hired staff can sell cars, access management menus, and handle money flow. Benefits of job integration include:
- Restricting who can spawn or sell cars.
- Salary and commission systems for roleplay realism.
- Business bank accounts tied to sales revenue.
3. Implement key distribution
Nothing kills immersion faster than players driving away without ownership. Add a key system to bind ownership of the purchased vehicle to the buyer. Popular key resources support:
- Key items in player inventory.
- Transferable ownership between players.
- Lock/unlock sync across the server.
4. Organize vehicle categories
A clean vehicle shop has clear categories: sedans, SUVs, motorcycles, police, premium, etc. Avoid dumping hundreds of cars into one list. This not only improves user experience but also reduces script load. Curate your shop to focus on what your server actually uses.
5. Optimize database entries
Vehicle shops tie into your database. Check for:
- Unique spawn names to avoid conflicts.
- Consistent pricing aligned with your RP economy.
- Clear stock limits to balance rarity.
6. Testing before release
Before going live, test scenarios like:
- Multiple staff selling cars simultaneously.
- Players buying with and without enough funds.
- Key persistence across restarts.
Fixing small bugs early prevents server-wide chaos later.
Bottom line
A clean vehicle shop is not about flashy UI, it’s about stability and trust. If players know they’ll get their car and keys every time, your dealership job will thrive. Use a curated business store asset to save hours of scripting and focus on what matters: stable roleplay.