Buying a Vehicle
Customers buy from the Showroom: choose a vehicle, a colour and, where offered, tuning parts, then press Purchase. This opens the Purchase vehicle dialog (Purchase pre-owned vehicle for a vehicle from the pre-owned lot), where you decide how to pay. Nothing is charged until you press the Purchase for … button.
The Purchase button needs Customers can purchase to be on for the dealership. With it off, staff sell in person, see Staff Sales. A public dealership has unlimited stock unless the model has a supply limit. A player-owned dealership sells what it has in stock, and the money goes to its dealership account.
The purchase dialog
The dialog shows the vehicle with its colour (and plate and mileage for a pre-owned one), then these parts:
| Part | What it does |
|---|---|
| Buy with tuning | Shown when you picked parts at a dealership where tuning can be bought. Lists every part with its price. Switch it off to buy the vehicle stock. |
| Buy as | Personal or Company. Only shown when you may buy for a job or gang, see Buying for a company. |
| Payment plan | Pay in full or Finance. Only shown when financing is open to you. |
| Pay with | The payment methods the dealership accepts, each with your balance. Refresh balances reads them again. |
| Trade in a vehicle | Hand in a vehicle you own for credit, see Trade-ins. |
| Summary | List price (with Promotion and Sale price when the model is on promotion), Own colour, Tuning, Trade-in and Due today. |
The confirm button reads Purchase for $ 149,900. It is disabled and reads Not enough money, No payment method available or Choose a company first while something is missing.
Payment methods
Config.PaymentMethods = {
{ id = 'bank', label = 'Bank account', account = 'bank', finance = true },
{ id = 'cash', label = 'Cash', account = 'cash', finance = false },
}account is the framework money account that is charged, and finance = true allows the method for a financed purchase. Each dealership picks the methods it takes under Accepted payment methods in the Dealership Creator. A method that is not accepted is refused with That payment method is not accepted here. See Payment methods.
Pay in full or finance
Pay in full charges the whole amount now. Finance charges the Down payment today and collects the rest in instalments. The dialog lists Instalments, Collected, Interest and Total payable and warns that missed payments lead to repossession. Only payment methods with finance = true are offered for it, and it is for personal purchases only. See Financing.
Tuning parts
At a dealership with Showroom tuning set to Can be bought, the parts you fitted in the Tuning tab are charged with the vehicle and fitted before delivery. The server prices every part again from the vehicle’s price. If a part is no longer valid the purchase stops with One of the chosen parts is no longer available for this vehicle.
At a Preview only dealership the dialog reminds you that The parts you tried are for preview only. This dealership delivers its vehicles stock. Pre-owned vehicles are sold with the parts they already have.
Plate
The plate is drawn at random when you buy: two digits, three letters and three digits, for example 47KDM912, and never one that is already registered. The dialog has no field for a plate of your own. A pre-owned vehicle gets a fresh plate too. The Plate style part in the tuning tab only changes the look of the plate.
Buying for a company
With Config.CompanyPurchases.Enabled = true and Company purchases on for the dealership, Buy as offers Company. Pick the company (a job shows as Business, a gang as Organisation, each with its balance) and the price is charged to that account. The vehicle is registered to you, not to the company. See Company purchases.
| Rule | Detail |
|---|---|
| Who may buy | Bosses of the job or gang. With Config.CompanyPurchases.MinGrade set to a number, that grade and every grade above it may buy as well. |
| Dealership list | When the dealership has rows under Access (Which companies may buy for their fleet), only those jobs and gangs at their minimum grade can buy. Being a boss is not enough then. |
| Excluded | The job in Config.UnemployedJob. |
| Account | With bablo-banking and its societies switched on, the job’s society account there (jobs only). Otherwise the framework account: Renewed-Banking, qb-banking or qb-management on QBCore, the same plus qbx_management on Qbox, and esx_addonaccount (society_<job>, jobs only) on ESX. A company without an account is not listed. |
| Not possible | Financing and trade-ins. |
If the account is short, the purchase stops with a message such as Northside Taxi only has $ 42,000 in its account.
Delivery
After the payment the dialog shows It’s yours with the new plate. The showroom then closes and:
- The vehicle appears on the first free Purchased vehicles spawn point of the dealership (no vehicle within 3 metres). If every point is taken, the first one is used.
- It has the colour and parts you bought, the new plate and a full tank.
- You get the keys and are placed in the driver’s seat, with the message Your new vehicle is ready. Plate …
If the vehicle cannot be brought out, you still own it: The vehicle is yours, but it could not be parked here. Collect it from your garage.
Registration
| Framework | Where the vehicle is saved |
|---|---|
| QBCore, Qbox | player_vehicles, in the garage from Config.Garages for the dealership’s kind, marked as out of the garage. |
| ESX | owned_vehicles with the type car, boat or aircraft, marked as not stored. |
Config.Garages = { land = 'pillboxgarage', sea = 'lsymc', air = 'intairport' }Use garage names that exist in your garage script, see Garages. The colour and parts are saved to the vehicle from the one that was parked at the dealership.
Keys and fuel
| What | Supported resources, the first one that is started |
|---|---|
| Keys | zyke_vehiclekeys, qbx_vehiclekeys, qb-vehiclekeys, wasabi_carlock |
| Fuel | ox_fuel, LegacyFuel, cdn-fuel, ps-fuel |
The tank is set to 100. For another key or fuel script, edit GiveKeys and SetFuel in frameworks/<framework>/client.lua. The file is not encrypted.
Out of stock and failed purchases
A vehicle that is out of stock shows Out of stock (or Sold out for a model with a supply limit) instead of Purchase. At a player-owned dealership that takes requests the button becomes Request this vehicle, see Vehicle Requests.
The server checks everything again when you confirm:
| Situation | What happens |
|---|---|
| Someone buys the last one first | The last … has just been sold. or This pre-owned vehicle has just been sold. Nothing is charged. |
| A limited model runs out at a public dealership | … is sold out on this server., followed by More arrive in about … when the model restocks. |
| Not enough money | You only have $ 12,400 available with that payment method. |
| The payment is refused | The payment did not go through. Nothing was charged. The vehicle goes back into stock. |
| The vehicle cannot be registered | The amount is paid back to the same payment method, or to the company account, and the vehicle goes back into stock: The vehicle could not be registered to you. You were refunded. |
| The colour was taken off the dealership’s list | That colour is no longer offered here. Choose another one. |
| The trade-in is no longer yours or is financed | That vehicle cannot be traded in. |
| A player-owned dealership cannot afford the trade-in payout | The dealership cannot pay out this trade-in right now. |
After a failed attempt the dialog reads your balances again, so you can change the payment method and try once more.

