Open-source FiveM scripts, MLOs, vehicles & server packs for ESX, QBCore & Qbox. Browse Shop →
All Shop
Story Vehicle Dealership

Description

A vehicle dealership script for ESX servers. Players open the dealership through qtarget on a seller ped, browse the catalog in an NUI, test drive a car and buy it with cash.

Features

  • Dealership NUI opened through qtarget on the seller ped or with the /salon command, with the vehicle list grouped by class and showing price and estimated top speed
  • Seller ped and map blip, with coordinates, label, sprite, color and scale set in Config.PedSeller and Config.Blip
  • Test drive of Config.TestTime seconds (60 by default) at its own spawn point, with a countdown; /closetest ends it early, then the vehicle is removed and the player returns to the previous position
  • Purchase takes the price from the money item in ox_inventory, spawns the car at Config.VehSpawnPoint with a generated plate and saves it to the ESX owned_vehicles table
  • Everything is set in shared/config.lua: vehicle list (price, label, spawn name, class, image), spawn points, test drive time, seller ped, blip and notification texts
  • Plain Lua source, editable

Requirements

  • ESX (es_extended)
  • oxmysql
  • ox_inventory
  • qtarget
  • Players need internet access: the NUI loads its libraries from public CDNs and the example vehicle images from imgur

Installation

  1. Copy the folder story_vehicledealership into your resources directory. No SQL import is needed, it uses the existing owned_vehicles table.
  2. Make sure es_extended, oxmysql, ox_inventory and qtarget start before it, then add ensure story_vehicledealership to your server.cfg.
  3. Edit shared/config.lua. The example list uses the spawn names golf75r and blista, replace them with vehicles that exist on your server.

Related resources

All resources →