Trucking
Installation

Installation

Prerequisites

ResourcePurpose
qbx_corePlayer framework and metadata licences
ox_libNotifications, progress bars, dialogs
ox_targetDepot and boss-NPC interactions
ox_inventoryPhysical CDL license items
oxmysqlDatabase access

A working MySQL or MariaDB instance is required.

1. Drop the resource

Place the entire medit8z_trucking folder into:

resources/[scripts]/medit8z_trucking

2. Merge the license items

Open medit8z_trucking/items.lua and merge its three entries into your existing item list:

resources/[ox]/ox_inventory/data/items.lua

The entries are:

  • cdl_b_license
  • cdl_a_license
  • hazmat_license

They have no client or server hooks. The script handles add and remove via ox_inventory:AddItem / RemoveItem with player-specific metadata (firstname, lastname, birthdate, issued / expires dates, issuer).

3. Copy the icons

Copy all three PNGs from medit8z_trucking/images/ into:

resources/[ox]/ox_inventory/web/images/

4. Ensure the resource

Confirm [scripts] is ensured in server.cfg (default in a Qbox install), or add explicitly:

ensure medit8z_trucking

Database

Three tables are created automatically on first start. server/db_init.lua reads sql/trucking.sql at runtime — no manual import is needed.

medit8z_trucking_stats         -- level, xp, balance, deliveries, skill points
medit8z_trucking_owned_trucks  -- player-owned freight trucks (plate, condition, mods)
medit8z_trucking_cooldowns     -- CDL retest cooldowns

License flags themselves (cdl_b, cdl_a, hazmat booleans) live in Qbox player metadata under licences, not in a custom table.

Idempotent ALTER TABLE migrations also run from server/main.lua on every start to handle upgrades from older versions. Fresh installs see them as no-ops.

Verification

On first start the console should print:

[medit8z_trucking] trucking.sql executed (3 statements, 0 failed)
[medit8z_trucking] Database tables initialized

Spawn near the depot blip (default Cypress Flats), approach the boss NPC and confirm the ox_target prompt appears. You are ready to configure — see Configuration.