Configuration

All configuration is done in config.lua. This page explains the most important sections and how they affect gameplay.

Framework & core settings

Config.Framework   = 'esx'   -- 'esx' or 'qb' / 'qbcore'
Config.Locale      = 'en'    -- 'en' or 'hr'
Config.Currency    = 'bank'  -- which account is charged (ESX/QB)
Config.UseNUIOnly  = true    -- true = full NUI flow, false = also show helptext
Config.UseOxTarget = true    -- use ox_target for interactions
  • Framework – tells the script which framework helpers to prefer. Actual detection also happens in server/utils.lua.

  • Locale – which dictionary from locales/*.lua to use (en.lua / hr.lua).

  • Currency – which money account is used for vehicle purchases.

  • UseNUIOnly – if true, the script relies on NUI prompts instead of 3D helptext.

  • UseOxTarget – if true, spawns ox_target zones around NPCs and vehicles.

Webhooks

Config.Webhooks = {
  Purchase = '',
  Finance  = '',
  Repo     = '',
  Consign  = ''
}

These are optional webhook URLs (e.g. Discord) that receive events when:

  • A vehicle is purchased.

  • A finance contract is created or paid.

  • A vehicle is repossessed.

  • A vehicle is consigned or sold from the used lot.

If you do not want webhooks, leave them empty.

Notification bridge

The script never calls notification exports directly. Instead, it:

  1. Triggers 3m:notify with a key (e.g. purchased_ok).

  2. Uses client/notify.lua to map keys to localized text and dispatch to the configured provider.

Supported providers out of the box:

  • oxox_lib notifications.

  • esxESX.ShowNotification.

  • okokokokNotify.

  • brutal – placeholder for your own notification export.

You can also use the exported Notify function from client/notify.lua and server/notify.lua inside your own scripts if you wish to unify notifications.

Keys system

  • System – which key system you are using.

  • GiveKeyExport / RemoveKeyExport – how to call that system to give/remove keys.

This configuration is used for:

  • Delivering keys after purchase.

  • Issuing test drive keys.

  • Handling repossession and consignment transfers.

If you have a custom keys resource, set System = 'custom' and fill in the export info.

Dealerships (multiple locations)

Each dealership defines:

  • Salesman NPC – opens the NUI.

  • Key NPC – hands over keys and starts the cinematic delivery.

  • Blip – map icon for the dealership.

  • Preview – where the preview vehicle and NUI camera are positioned.

  • Delivery – where purchased vehicles are delivered.

  • Test drive – spawn for test drive vehicles.

  • Showroom – world-placed static vehicles shown in the NUI list.

  • Key NPC window – time window the player has to pick up keys for purchased vehicles.

If you only want a single dealership, keep just one entry in this table.

For backwards compatibility, Config.Dealer can be converted into a single Config.Dealerships entry automatically.

Test drive settings

Key behaviour:

  • Starts from a configured spawn point (per-dealer spawn overrides this global one).

  • Uses a timer visible in the UI.

  • Optionally ends the drive when the player leaves the vehicle.

  • Can block garage saving, upgrades and despawn the car if the player tries to leave the area.

Dynamic market (48h window)

  • WindowHours – rolling window for counting sales.

  • TriggerSoldThreshold – how many sales are needed before the price moves.

  • StepPercent – how much the price moves per step.

  • CapUp / CapDown – maximum total movement above/below base price.

  • RecomputeIntervalMin – soft interval for recalculating the market table.

Prices are always based on:

  1. shared/vehicle.prices.lua (base price per model).

  2. Config.PriceFallbackByClass if a model has no explicit entry.

Finance (credit)

  • DownPaymentPct – upfront payment percentage (e.g. 20%).

  • FinanceMarkupPct – increase over cash price when buying on finance.

  • Min/MaxInstallments – allowed range of installments.

  • DuePerPlaytimeHours – how often a new installment becomes due, based on in-game playtime.

  • GraceMisses – how many missed installments are allowed before repo.

  • Repo.ScanIntervalSec – how often repossession checks run.

  • Repo.DespawnOnRepo – whether repossessed vehicles are removed from the ownership table.

  • EarlyPayoffDiscountPct – discount if a loan is paid early.

If Config.Finance.Enabled is false, the finance tab is hidden from the NUI.

Consignment (used vehicles) & payouts

  • NPC – main consignment NPC for listing and managing used cars.

  • LotSlots – world positions used to spawn listed vehicles as previews.

  • MaxPerPlayer – per-player limit of active listings.

  • MaxDescLen – max length of description text.

  • ShowBulletproof / AllowMileage / AllowService – extra metadata flags shown in the UI (optional).

The consignment system uses vehicle_consignment table and, on purchase, transfers ownership back into your configured owned-vehicles schema.

The payout NPC is used to pay the seller their cut if they are online; otherwise, you can adapt the payouts_offline table for queued payouts.

Price data & fallbacks

  • PriceData – JSON snapshot used by the UI (data/prices.json).

  • PriceFallbackByClass – if a model has no explicit price, its vehicle class is mapped into this table to determine a min/max range.

To adjust prices, follow these steps:

1

Edit base prices

Edit shared/vehicle.prices.lua for base prices and categories.

2

Update UI price snapshot (optional)

(Optionally) regenerate or edit data/prices.json to match your server’s economy.