Skip to content

Installation

Installation

BUPA Rental ships as a single resource with a React (Vite) interface that you build once. Follow the steps below in order.

1. Requirements

Make sure these are installed and start before the rental resource:

  • ox_lib
  • oxmysql
  • Your framework — qb-core, es_extended or qbx_core
  • Optional: a vehicle-keys resource, ox_target / qb-target, ox_inventory

2. Drop in the resource

Place the bupa-rental folder in your resources directory (inside your [BUPA] or any bracketed group).

3. Database

The resource uses oxmysql and creates its tables automatically on first start. Importing the SQL is optional and only useful for pre-provisioning.

database/install.sql (optional)
-- Optional — the resource also creates these tables on first start.
-- Import only if you want the schema provisioned ahead of time.

There is no manual schema step required. On first boot, DB.Init() runs under MySQL.ready and provisions the active and history tables.

4. Build the UI

The interface lives in web/ and compiles to web/build, which fxmanifest.lua already points to.

terminal
cd web
npm install
npm run build

Re-run npm run build after any change under web/src. For local development with mock data, use npm run dev.

5. Configure the essentials

Open config.lua and set at least:

Option Values
Config.Framework qb | esx | qbx
Config.VehicleKeys your keys resource, or custom / none
Config.Inventory framework | ox_inventory
Config.Interaction ox_target | qb-target | textui | marker

6. Add the rental contract item

The rental_contract item is optional — it only matters when Config.UseRentalDocument = true. Pick the file in install/ that matches your inventory:

Inventory File Paste into
ox_inventory install/ox_inventory.lua ox_inventory/data/items.lua
qb-inventory / qb-core install/qb-core.lua qb-core/shared/items.lua
ESX legacy DB items install/esx_items.sql run on your database
ox_inventory/data/items.lua
['rental_contract'] = {
    label = 'Rental Contract',
    weight = 0,
    stack = false,
    close = true,
    description = 'A BUPA vehicle rental agreement',
    client = { image = 'rental_contract.png' },
    server = { export = 'bupa-rental.useRentalContract' },
},

Item icon

Copy the shipped icon into your inventory's image folder:

code
bupa-rental/img/rental_contract.png  →  ox_inventory/web/images/rental_contract.png
                                     →  qb-inventory/html/images/rental_contract.png

Because img/ is shipped by the resource, you can instead point the item's image at nui://bupa-rental/img/rental_contract.png and skip the copy.

Keep the item name as rental_contract unless you also change Config.RentalDocumentItem. Restart your inventory / qb-core after editing its files.

7. server.cfg start order

server.cfg
ensure ox_lib
ensure oxmysql
ensure qbx_core        # or qb-core / es_extended
ensure ox_inventory    # if you use it
ensure bupa-rental

# Interface + notification language (English fallback)
setr ox:locale "tr"

The language is chosen globally through the ox:locale convar — set setr ox:locale "tr" (or en, de, …). See the Localization page for the full list.