Bablo ResourcesDocs

Installation

Follow these steps in order. The steps marked optional can be skipped and done later. A full server.cfg example is at the end of the page.

StepWhat you set upNeeded?
1Download the resourceYes
2server.cfg: start orderYes
3Open the admin panelYes
4Fill the vehicle catalogueYes
5Add your dealershipsYes
6The staff tablet inventory itemOptional
7Photo storage, bank loans, mileage and garagesOptional

1. Download the resource

To download the asset, you must have purchased it on your own CFX account. Otherwise, use the transfer system to move it to a different account.

After purchasing from our website, the asset is delivered to your CFX Portal. Download it there and put the bablo-dealerships folder in your resources folder.

There is no SQL to import. On every start the resource creates the bablo_dealerships_* tables it needs if they are missing.

2. server.cfg

Your framework (es_extended, qb-core or qbx_core) must be started before bablo-dealerships, or it is not detected.

PLAINTEXT
ensure oxmysql
ensure ox_lib
ensure qb-core

ensure bablo-dealerships

Use es_extended or qbx_core instead of qb-core for your framework. Start your inventory and your target resource (ox_target or qb-target) before bablo-dealerships as well, so they are picked up.

The framework, target, prompt and inventory resources are picked up on their own. To see what was found, turn Config.DEBUG on once: the console then prints lines such as Detected framework: qbcore, Detected target: ox_target and Detected inventory: qb-inventory. If the wrong resource is picked, set it by hand in config.lua. See Configuration.

Set Config.DEBUG = false in config.lua on a live server. While it is on, extra test commands exist. See Commands.

3. Open the admin panel

Everything else is set up in game. Join the server and run:

PLAINTEXT
/dealereditor

The command name comes from Config.AdminCommand. The panel opens for server admins:

FrameworkWho counts as an admin
QBCorePlayers with the admin or god permission
QboxPlayers with the admin permission
ESXPlayers in the admin or superadmin group
AllAnyone with the ACE command, or the ACE in Config.AdminAce (default bablo.dealerships.admin)

To give a group access without making it a framework admin, add one line to server.cfg:

PLAINTEXT
add_ace group.admin bablo.dealerships.admin allow

The panel has five tabs: Dealerships, Vehicles, Part prices, Photo studio and Theme. See Admin Panel.

4. Fill the vehicle catalogue

Dealerships sell vehicles from one shared catalogue, so fill that first. The quickest way is to import the vehicle list your framework already has.

  1. Open the Vehicles tab and click Import vehicles.

  2. Source: pick your framework’s list.

    FrameworkSource to pickWhere it reads from
    QBCoreQBCore vehicle list (shared/vehicles.lua)qb-core/shared/vehicles.lua
    QboxQbox vehicle listThe vehicle list of qbx_core
    ESXESX vehicles tableThe vehicles table in your database
  3. Options: the defaults are right for a first import.

    OptionDefaultWhat it does
    Only add new vehiclesOnVehicles already in the catalogue are left alone.
    Add each vehicle to dealerships that sell its categoryOnPuts each vehicle into the dealerships that sell its category. On a fresh install there are no dealerships yet, so this happens in step 5 instead.
    Skip vehicles without a priceOnEntries without a price are left out.
    Block armed and military vehiclesOnTanks, armed aircraft and weaponised cars are imported as blocked, so no dealership sells them.
  4. Review: check what will be added and skipped, then confirm. A model your server does not have is skipped.

Names, brands, categories and prices come from your framework’s list. You can change any of them afterwards on the Vehicles tab.

Add-on vehicles that are not in your framework’s list can be imported from the fourth source, Every vehicle on this server, add-ons included (no prices). That list has no prices, so switch Skip vehicles without a price off for it and set the prices afterwards. A single vehicle can also be added by hand with Add vehicle.

Every step and option is explained on Vehicle Catalogue.

5. Add your dealerships

On the Dealerships tab, click Import presets. Five dealerships are included:

DealershipSells
Premium Deluxe MotorsportRoad vehicles
Luxury AutosRoad vehicles
La Mesa Truck CentreRoad vehicles
La Puerta MarinaBoats
Los Santos Air SalesAircraft

Tick Also assign vehicles by category to put every catalogue vehicle of the right kind into the dealerships that sell its category. Imported dealerships are enabled right away. Open each one afterwards to check its zone, points and staff.

Players can now walk in, open the showroom and buy. See Showroom and Buying a Vehicle.

6. Staff tablet item

Optional. Staff of a dealership can take a tablet from the management panel and use it from their inventory inside the dealership. The item is called bdealer_tablet, and it has to exist in your inventory before a tablet can be handed out.

To assist you in managing inventories, we’ve outlined the steps to create the item for the supported inventories below. If you need guidance on creating items for other supported inventories not listed, please create a support ticket.

Navigate to ox_inventory/data/items.lua and add the following item:

LUA
['bdealer_tablet'] = {
    label = 'Dealership tablet',
    weight = 500,
    stack = false,
    close = true,
    description = 'Sell vehicles and run the showroom floor inside your dealership.',
},

The item name must be bdealer_tablet. You can find the item image in the inventoryImages folder of the resource. Copy bdealer_tablet.png to ox_inventory/web/images/.

After adding the item, restart your inventory or the server. The script makes the item usable by itself, so nothing else has to be registered.

If you want toDo this
Use another item nameChange Config.Tablet.Item to the same name.
Charge the dealership for each tabletSet Config.Tablet.Price.
Leave the tablet outSet Config.Tablet.Enabled = false.

What the tablet opens and where it works is on Staff Tablet.

7. Optional extras

ExtraWhen you need itHow
Fivemanage keyYou want the photo studio to save vehicle pictures on Fivemanage.Add set bablo_dealerships_fivemanage_key "your Fivemanage token" to server.cfg. See Photo Studio.
Bank loansYou run bablo-banking and want financed vehicles to show up as loans there.On by default through Config.Finance.Bank. See Financing.
MileageYou want mileage to lower trade-in, buy-back and pre-owned prices.Config.Mileage reads it from bablo-hud, jg-vehiclemileage or your framework. See Configuration.
GaragesBought vehicles should go to a different garage on QBCore or Qbox.Change Config.Garages. See Configuration.

Keys and tokens always go in server.cfg with set, never setr or sets, and never in config.lua. config.lua is sent to every player.

Full server.cfg example

PLAINTEXT
ensure oxmysql
ensure ox_lib
ensure qb-core
ensure ox_target
ensure ox_inventory

set bablo_dealerships_fivemanage_key "your Fivemanage token"

ensure bablo-dealerships

Leave out the Fivemanage line if you do not use it, and use your own framework, target and inventory names.

Commands to get started

WhatDefaultChange it with
Admin panel/dealereditorConfig.AdminCommand
The vehicles you are still paying off/myfinanceConfig.FinanceCommand
Give up a stock run/cancelrunConfig.StockRun.CancelCommand

Every command is listed on Commands.

Next steps

  • Go through Configuration to adjust prices, financing, ranks and the rest of config.lua.
  • Read Management Panel to see what owners and staff can do.