Installation
Prerequisites
| Resource | Purpose |
|---|---|
qbx_core | Player framework and metadata licences |
ox_lib | Notifications, progress bars, dialogs |
ox_target | Depot and boss-NPC interactions |
ox_inventory | Physical CDL license items |
oxmysql | Database access |
A working MySQL or MariaDB instance is required.
1. Drop the resource
Place the entire medit8z_trucking folder into:
resources/[scripts]/medit8z_trucking2. 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.luaThe entries are:
cdl_b_licensecdl_a_licensehazmat_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_truckingDatabase
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 cooldownsLicense 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 initializedSpawn 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.