Bablo ResourcesDocs

Vehicle Catalogue

The catalogue is the one vehicle list every dealership sells from. It lives on the Vehicles tab of the Admin Panel, and only server admins can change it. A vehicle that is not in the catalogue can’t be sold, ordered or test-driven anywhere.

Each vehicle has a spawn name, a type (road vehicle, boat or aircraft), a category, a base price and a list of dealerships that sell it. The dealerships keep their own stock and sale price for it.


The vehicle list

ColumnWhat it shows
VehiclePicture, brand and name, the spawn name, and a Blocked tag when the vehicle is blocked.
Type and categoryRoad vehicle, boat or aircraft, and the category.
Base priceThe catalogue price. See Pricing.
Price limitsThe lowest and highest price a dealership may ask, when set.
Units for saleUnlimited, or how many are left on the server and when more arrive.
Sold atThe dealerships that have the vehicle on their stock list.

Search by name, model or dealership … filters the list. The filter menu narrows it by Vehicle type, Category, Dealership (with Not sold anywhere) and Units for sale, and sorts by name, price or newest.


Adding and editing a vehicle

Add vehicle opens an empty form. Edit on a row opens the same form for an existing vehicle.

FieldWhat it does
ModelThe spawn name the game uses, lower case and without spaces. Check confirms the game has it. It can’t be changed once the vehicle exists.
Brand, NameWhat players see. The brand is optional and shown in front of the name.
Vehicle typeDecides which dealerships can sell it. For a new vehicle the type follows what the game reports for the model.
CategoryOne of the categories in Config.Categories, or one that is already used in the catalogue.
Base priceDealerships start selling at this price and pay a share of it when they order stock.
Limit the price managers can setA Lowest price, a Highest price or both.
Limit how many are for sale on the serverUnits for sale on the server, 1 to 99,999. Stock orders of player-owned dealerships and sales at public dealerships count together. Pre-owned sales do not count.
Restock when sold outOnce none are left, Units per restock become available again after Hours after selling out (up to 8760).
BlockedThe vehicle stays in the catalogue but can’t be bought, ordered or test-driven anywhere.
Sold atThe dealerships that sell it. Only dealerships of the same type are listed.

For a new vehicle, the dealerships that sell its category are ticked for you under Sold at. A ticked dealership gets the vehicle on its stock list at the base price, with no units in stock.

Unticking a dealership under Sold at, or changing the Vehicle type, takes the vehicle off that dealership’s stock list together with the units it has in stock.

When you edit a vehicle, Reset every dealership’s price to the base price overwrites the sale price every manager has set for it. Without it, existing prices stay and are only moved to fit new price limits.

Delete on a row removes the vehicle after a confirmation. It disappears from every dealership’s stock, and open orders for it are refunded. Past sales stay in the records.


Importing vehicles

Import vehicles fills the catalogue from a list your server already has. It has three steps: Source, Options and Review.

Source

You see the vehicle list of your own framework and, on every server, the game list:

SourceWhere it comes from
QBCore vehicle list (shared/vehicles.lua)The vehicles in shared/vehicles.lua of QBCore, with brand, name, category and price.
Qbox vehicle listThe vehicle list of qbx_core, with brand, name, category and price.
ESX vehicles tableThe vehicles database table, with name, category and price. It has no brands.
Every vehicle on this server, add-ons included (no prices)Every vehicle model your own game knows, add-on vehicles included. Names and brands come from the game.

A source that is empty or can’t be read is shown as Unavailable.

Options

OptionOn by defaultWhat it does
Only add new vehicles / Also update existing onesOnly addUpdating overwrites brand, name, category and base price. Price limits, the units for sale and dealership prices stay.
Add each vehicle to dealerships that sell its categoryYesRoad vehicles go to road dealerships, boats to boat dealerships and aircraft to aircraft dealerships, with no units in stock.
Skip vehicles without a priceYesOff: entries without a price are imported with a base price of 0.
Block armed and military vehiclesYesNew vehicles on the block list are imported as blocked. See Blocked vehicles.

The game list has no prices. To import from it, switch Skip vehicles without a price off, then give the vehicles a base price afterwards. With the option on, every new vehicle from that source is skipped.

Review

The last step lists what will be added, updated and skipped, with the reason for each skip, for example This model is not installed on the server. Nothing changes until you press Import 250 vehicles (with your own number).

The import checks every model against your game. A model your game does not have is skipped, and boats, helicopters and planes get their type and category from the game instead of from the source.


Syncing stock

A dealership’s stock list is filled when the dealership is created. If you later change its categories, add vehicles without assigning them or import without the assign option, the stock list no longer matches. Sync stock fixes that for one dealership at a time:

  1. Choose the dealership.
  2. The first list, for example Add 12 vehicles, holds the catalogue vehicles of the right type in a category it sells that are not on its stock list yet. It is ticked for you.
  3. The second list, for example Remove 3 vehicles, holds what is on its stock list but no longer something it sells. It is only applied if you tick it.
  4. Press Apply. Nothing changes before that.

Added vehicles join the stock list at the base price with no units in stock. Removed vehicles disappear from the dealership together with the units it has in stock.


Categories

LUA
Config.Categories = {
    compacts = 'Compacts', sedans = 'Sedans', suvs = 'SUVs', coupes = 'Coupes', muscle = 'Muscle',
    -- ...
}

The key is the category id stored with each vehicle, the value is the name players see. A category without a line here shows its id with a capital first letter. To add your own category, add a line and restart the resource; it then shows in the Category list of the vehicle form.

Each dealership picks the categories it deals in, see Dealership Creator.


Vehicle pictures

LUA
Config.VehicleImages = 'https://assets.babloresources.com/vehicles/{car}.webp'

{car} is replaced with the spawn name. For each vehicle the UI tries, in this order:

  1. Your own picture, taken with the Photo Studio.
  2. The address from Config.VehicleImages, while Use the Bablo CDN for vehicles without an own picture is on in the Photo studio tab.

A vehicle without a working picture shows an outline of a car, boat or aircraft. You can point Config.VehicleImages at your own host: put {car} where the spawn name goes.

Config.VehicleImages = false shows no vehicle pictures at all, including the ones you took in the photo studio.


Blocked vehicles

A blocked vehicle stays in the catalogue and keeps its price and its dealerships, but it is left out of every showroom and every dealership’s vehicle list, so it can’t be bought, ordered or test-driven. There are three ways to block:

WhereWhat it blocks
Blocked in the vehicle formThat one vehicle.
Blocked groups on the Vehicles tabEvery vehicle in a group. Click a group to block it; click a fully blocked group to put its vehicles on sale again.
Block armed and military vehicles on importNew vehicles from the block list, as they are imported.

Blocked groups has two special groups, Armed vehicles and Trailers, and one group for every category in the catalogue. Each group shows how many of its vehicles are blocked.

LUA
Config.BlockedVehicles = {
    Categories = { 'military' },
    Trailers = { 'tr2', 'tr3', 'tr4', 'trflat', 'tanker', 'tanker2', 'armytanker', 'cablecar' },
    Models = { 'rhino', 'khanjali', 'apc', 'halftrack' }, -- shortened, the full list is in config.lua
}
KeyUsed by
ModelsThe Armed vehicles group and the import option.
CategoriesThe import option: every new vehicle in these categories is imported as blocked.
TrailersThe Trailers group, together with every model that has trailer in its spawn name.

The list only decides what the group buttons and the import option pick. A vehicle is blocked or on sale because of its own Blocked switch, so you can unblock single vehicles afterwards.