Trucker Job: Installation
Get the player run trucking business, its tablet and the admin panel running on your server.
Before you start
The script talks to your framework, target, fuel and vehicle keys resources through hype-core, which comes with your purchase. Make sure OneSync is enabled and your server artifact is build 7290 or newer.
Requirements
| Resource | Required | Notes |
|---|---|---|
| oxmysql | Yes | Businesses, employees, fleet, invoices, loans and stats are stored in SQL |
| ox_lib | Yes | Callbacks, locales, notifications, text UI and progress bars |
| hype-core | Yes | Framework and module bridge, included with your purchase |
| qbx_core / qb-core / es_extended | Yes | One of them, detected by hype-core |
| ox_target / qb-target | Yes | Interaction with the business NPCs, picked by hype-core |
| Fuel and vehicle keys resource | Recommended | Truck fuel and keys, set with Fuel and VehicleKeys in hype-core's config |
| esx_license | ESX only | Needed for the driver license check on ESX |
| MugShotBase64 | Optional | Tablet profile photo for players without a Discord avatar |
The server needs OneSync, artifact 7290+ and MySQL 8.0+ or MariaDB 10.2+ (the recent activity queries use window functions).
See Dependencies for download links and the start order.
Setup
Download the resource
Get the latest version from portal.cfx.re. hype-core is granted with the same purchase. See Download your purchase.
Keep the folder names
Keep the folders named hype-truckerjob and hype-core. The script calls hype-core by its resource name.
Database
Run INSTALL/install.sql once in your database (HeidiSQL, phpMyAdmin or the MySQL console). It creates every table
the script uses:
| Table | Content |
|---|---|
hype_truckerjob_personel | Driver XP, deliveries, earnings, distance and ratings |
hype_truckerjob_businesses | Owned businesses with name, cash, fleet, blip and rent dates |
hype_truckerjob_employees | Employees with role, commission and custom permissions |
hype_truckerjob_istatistic | Delivery, earning and distance totals per business |
hype_truckerjob_activity | Dispatch log of every job |
hype_truckerjob_npc_workers | Hired NPC workers, their XP, skills and current job |
hype_truckerjob_invoices | Rent, NPC wage and loan installment invoices |
hype_truckerjob_challenges | Daily and weekly challenge progress |
hype_truckerjob_loans | Business loans that are not paid off yet |
Do not skip this step
On start, the script only creates the last four tables and adds missing columns on its own. The business, employee
and stats tables come from install.sql alone. Without them the console prints
Failed to load businesses and nobody can buy a business.
Start the resources
Add them to server.cfg after oxmysql, ox_lib, your framework and your target resource. hype-core must start
before hype-truckerjob.
ensure oxmysql
ensure ox_lib
ensure qbx_core # or qb-core / es_extended
ensure ox_target # or qb-target
# HypeScripts
ensure hype-core
ensure hype-truckerjobThe language is set with ox_lib's convar, see Locales.
Set the basics
Open config/config.lua and check at least PaymentType, Currency, BusinessLocations, Rent and
RequiredDriverLicense. In hype-core's config/config.lua, set Fuel and VehicleKeys to the resources you use.
See Configuration for every option.
Spawn points for every business
Only business 1 ships with locations (truck and trailer spawn points). Businesses 2 to 5 can be bought, but
their routes are refused with This business has no vehicle spawn location configured until you add locations
to them. See Business locations.
Verify
Set Config.Debug = true and start the server. Look for these lines in the console:
[DEBUG] [SUCCESS] Database ready (4 tables, 15 migrations checked)
[DEBUG] [SUCCESS] Loaded 0 business row(s) and 0 employee row(s)Join the server. Every business shows a Trucker Station blip and an NPC. Target the NPC at business 1 (the docks) and pick Buy the business. The price is taken from your bank.
Target the NPC again and pick Open Trucker Menu. The tablet opens with a guided tour. The business already owns
the first truck of Config.Vehicles (a free Mule by default).
Deposit some money into the business, buy a route's truck (and trailer) with business cash, start the route from the
Routes page and finish it. The owner keeps a 100% commission, so the pay lands in your PaymentType account, and the
job shows up in the Dispatch log. When everything works, set Config.Debug = false again.
How it works
- Businesses: players buy one of the locations in
Config.BusinessLocationsfrom the NPC. The buyer becomes the owner (Boss) and the business gets its own cash, fleet, staff, XP and level. Rent is billed everyRent.intervalDays. - Tablet: every page is opened from the business NPC: Dashboard with the company chat, Vehicles shop, Garage, Routes, Dispatch, Employees, NPC Workers, Invoices, Settings and the personal Profile. What an employee sees depends on their role's permissions.
- Routes: the driver picks a route the business owns the truck (and trailer) for. The vehicles spawn at the business, the driver loads the cargo at the pickup, delivers it and brings the truck back. The pay is split between the driver (their commission) and the business cash.
- Loading types: hook up a waiting trailer, carry boxes by hand into a box truck, load a flatbed with a forklift, drive cars onto a car carrier, fill a tanker at a marker or load tippers and mixers at a construction site.
- Rating: each delivery gets 1 to 5 stars from truck and cargo damage, speeding and the time used. High ratings pay a bonus, damage cuts the pay.
- Fleet: owned trucks track fuel, damage and mileage, trailers damage and mileage. Refuel, repair and sell them in the Garage.
- Dispatch: a live map of every company truck and a searchable log of all jobs.
- Employees: hire players standing next to you, give them a role and a commission, override single permissions.
- NPC workers: hire NPC drivers that run routes on their own. Their jobs are simulated on the server, use the business fleet and can fail.
- Invoices and loans: rent, NPC wages and loan installments arrive as invoices with due dates. Unpaid rent or loan invoices put the business back on sale.
- Challenges and stats: daily and weekly challenges with cash and XP rewards, and a personal stats page for every driver.
- Admin panel: server staff see every business, active routes and recent activity, and can edit, reset or fix them.
Controls and commands
| Input | Where | Action |
|---|---|---|
| Target the NPC | Business location | Buy the business or Open Trucker Menu |
E | During a route | Deliver cargo, fill the trailer, load boxes or materials, return the truck |
G | During a route | Toggle the trailer ramp or the back doors, force place a trailer |
B | During a route | Show or hide the route panel (rebindable in the FiveM key settings) |
/cancelroute | During a route | Cancels the active route, see CancelRoute in the config |
/truckeradmin | Anywhere | Opens the admin panel, see AdminMenu in the config |