Documentation

Pepper Trucking

Trucking career with a freight exchange, real trailers, skill tree, own trucks, convoys and a logistics company with AI drivers – ESX Legacy.

Overview

Pepper Trucking turns the truck job into a career for ESX Legacy: the freight exchange offers jobs that match your level, skills and truck – from a parcel in a box van to a transformer on a heavy-haul trailer. You couple real trailers, protect the cargo, deliver on time and park cleanly. As you progress you buy your own trucks, drive in convoys and build a logistics company whose AI drivers keep running tours even when nobody is online.

  • Freight exchange with 24 cargo types: hazmat, refrigerated goods, heavy haulage, urgent jobs, tours with up to 3 drops
  • Real trailers with coupling, drop-off and a parking rating
  • 50 levels, reputation, 1–5 stars per job, skill tree with 8 skills, daily and weekly challenges
  • Own trucks with garage, wear and workshop, convoys for up to 4 drivers
  • Weigh stations and fuel (built in or your fuel script)
  • Logistics company with staff, ranks, company account, 4 depots and AI drivers
  • Freight location editor and admin panel in the driver tablet (F9), German and English

Requirements

Dependency Required/optional Used for Link
FiveM server build 7290+ with OneSync required declared in fxmanifest.lua as /server:7290 and /onesync https://docs.fivem.net/docs/server-manual/setting-up-a-server/
ESX Legacy 1.9+ (es_extended) required players, money (bank account), admin groups https://github.com/esx-framework/esx_core
oxmysql required database (career, trucks, company, freight locations) https://github.com/overextended/oxmysql
LegacyFuel, ox_fuel or cdn-fuel optional takes over consumption and refuelling instead of the built-in fuel gauge –

ox_lib, ox_target and ox_inventory are not required. No ESX job is needed – every player can drive. Pepper Trucking only runs on ESX Legacy (no QBCore/Qbox).

Installation

  1. Download the resource from the Cfx.re portal → Granted Assets.
  2. Extract it to resources/[pepper]/pepper_trucking. Do not rename the pepper_trucking folder – other resources call the exports via exports.pepper_trucking.
  3. Add it to your server.cfg after its dependencies:
ensure oxmysql
ensure es_extended
ensure pepper_trucking
  1. Database: with Config.Database.AutoInstall = true (default) the resource creates missing tables on start (15 tables prefixed truck_). The manual way is sql/install.sql. On first start, 33 default freight locations from config/locations.lua are created (Config.Database.SeedDefaultLocations).
  2. Grant admin rights (details under “Commands and permissions”), for example:
add_ace group.admin pepper_trucking.admin allow

Pepper Trucking uses no inventory items – there are no items or images to add.

First test

  1. Start the server and check the console that pepper_trucking starts without errors.
  2. Drive to the trucking yard at the port (truck icon on the map) and press E at the terminal.
  3. Pick a rental truck, open the tablet with F9 and accept a job from the freight exchange.
  4. Load, drive to the drop-off and deliver – the summary with stars, pay and XP appears.
  5. As an admin, check the default freight locations once under Admin → Freight locations in the tablet and fix them if needed.

Configuration

All settings are open in config/ (readable and editable under Asset Escrow):

File Controls
config/config.lua language, database, depots, tablet, freight exchange, docking/parking, fuel, weigh stations, pay, damage, rating, reputation, garage, convoy, company, AI drivers, admin
config/trucks.lua trucks (class, type, load, tank, consumption, price, rent, requirements), tuning stages, paint colours
config/cargo.lua cargo types (goods group, trailer, weight, value, fragility, hazmat, refrigeration, skills)
config/skills.lua skill tree (stages, minimum level, effect)
config/levels.lua 50 levels, titles, XP per job, level rewards
config/locations.lua default freight locations (only imported on first start)
config/stations.lua truck fuel stations and weigh stations
config/challenges.lua daily and weekly challenges
config/server.lua optional Discord webhook for logs (server-side only)
locales/de.lua, locales/en.lua all in-game and tablet texts

General and database

Config.Locale = 'de'
Config.TimeSource = 'game'
Config.Database = { AutoInstall = true, SeedDefaultLocations = true, SaveInterval = 300 }
Option Default Description
Config.Locale 'de' language (de or en)
Config.Debug false verbose logs in the server console
Config.TimeSource 'game' time of day for night and urgent jobs: 'game' (game time) or 'server'
Config.Resets.DailyHour 5 hour (server time) of the daily challenge reset
Config.Database.AutoInstall true create missing tables from sql/install.sql
Config.Database.SaveInterval 300 seconds between intermediate saves

Depots and tablet

The first depot (port, Port of Los Santos) is the main yard with the workshop. route68, sandy and paleto are purchasable side depots with approximate coordinates and AllowShiftStart = false – they count for the company (AI slots, parking spaces). Shifts only start there once you have checked the coordinates in-game and set AllowShiftStart = true.

Option Default Description
Config.Tablet.Command 'trucktablet' command for the tablet
Config.Tablet.DefaultKey 'F9' default key (changeable in the GTA key bindings)
Config.Tablet.AllowAnywhereOnDuty true open the tablet anywhere while on duty
Config.DepotRules.MaxStartDistance 80.0 start of duty/workshop only this close to the terminal (checked server-side)

Freight exchange and pay

Config.Freight = { BoardSize = 8, RefreshMinutes = 12, MinDistance = 700.0, MaxDrops = 3, ... }
Config.Economy = { PayAccount = 'bank', GlobalMultiplier = 1.0, BasePerKm = 90, PerTonKm = 4.0, ... }
Option Default Description
Config.Freight.BoardSize 8 offers per driver
Config.Freight.RefreshMinutes 12 automatic refresh of the exchange
Config.Freight.MinDistance 700.0 minimum straight-line distance pickup → drop-off (metres)
Config.Freight.MaxLate 1800 seconds after the deadline after which the job fails
Config.Economy.PayAccount 'bank' account for payouts
Config.Economy.GlobalMultiplier 1.0 multiplier on all pay
Config.Economy.BasePerKm 90 pay per road kilometre
Config.Economy.PerTonKm 4.0 pay per ton and kilometre
Config.Economy.RentalFee 0.15 rent for the rental truck (share of the pay)
Config.Economy.CancelFee 250 penalty for cancelling

Fuel and weigh stations

Config.Fuel.System = 'internal' uses the built-in fuel gauge and the truck fuel stations. With 'legacyfuel', 'ox_fuel' or 'cdn-fuel' your script handles consumption and refuelling; Pepper Trucking then only sets the starting value when the truck is taken out. 'none' disables fuel.

Option Default Description
Config.Fuel.System 'internal' internal, legacyfuel, ox_fuel, cdn-fuel or none
Config.Fuel.PricePerLiter 2 price per litre at the truck fuel stations
Config.Weigh.Enabled true weigh stations on/off
Config.Weigh.LegalLimit 40 tons – above that a special permit is needed
Config.Weigh.SkipFine 1500 fine if you bypass an open station and get checked
Config.Weigh.OverweightFine 5000 fine for overweight without a permit

Garage, convoy, company and AI drivers

Option Default Description
Config.Garage.MaxTrucks 5 own trucks per player
Config.Garage.SellFactor 0.65 resale: new price × factor × condition
Config.Convoy.MaxMembers 4 drivers per convoy
Config.Company.AllowPurchase true players may buy the company
Config.Company.PurchasePrice 1500000 purchase price of the company
Config.Company.MaxEmployees 40 maximum number of employees
Config.AI.Enabled true AI drivers on/off
Config.AI.JobMinutes 30 real-time minutes per AI tour
Config.AI.MaxCatchUpJobs 16 missed tours per driver caught up after a restart

Discord webhook

In config/server.lua (never sent to clients):

ServerConfig = {
    LogWebhook = '',               -- empty = off
    LogWebhookName = 'Pepper Trucking',
}

Gameplay

  1. Start a shift at the terminal: rental truck, take out your own truck or – as an employee – a company truck.
  2. Freight exchange in the tablet: pick a job. Overweight cargo offers a special permit, convoy leaders can share jobs.
  3. Load: stop a rigid truck in the bay – back a tractor unit onto the marked trailer (it couples automatically).
  4. Drive: watch the deadline, protect the cargo, use open weigh stations, refuel in time.
  5. Deliver: drop the trailer in the zone (arrow = orientation) – at the last drop-off, parking precision counts.
  6. Summary: stars, pay with all bonuses and deductions, XP, reputation – then spend skill points and aim for the next truck.
Special cargo What to watch out for
Fragile more sensitive to impacts and harsh manoeuvres
Hazmat skill required – the cargo can be destroyed
Refrigerated delays and damage break the cold chain
Heavy haulage overweight – special permit at weigh stations
Urgent job tight deadline, higher bonus (skill required)
Tour up to 3 drop-offs per job

Freight location editor

Tablet (F9) → Admin → Freight locations: create or fix pickup and drop-off points. Position and heading come straight from the coupled trailer (button or /truckloc), plus goods groups, access, radius, map preview and teleport. Up to 150 freight locations (Config.Admin.MaxLocations). Freight locations live in the database – config/locations.lua is only imported on first start, resource updates never overwrite your locations.

In the admin panel you can edit players even while they are offline, gift trucks and unlock rental trucks; with Config.Admin.RequireReason = true every change needs a reason and ends up in the audit log.

Commands and permissions

Command / key Who What
F9 / /trucktablet everyone driver tablet – at the yard terminal, anywhere while on duty
E everyone use the depot terminal
Y / N (/truckconvoyyes, /truckconvoyno) everyone accept / decline a convoy invite
/truckloc admins copy the current position (in a truck: trailer position) into the open freight location draft

Every player can change the keys in GTA settings → Key Bindings → FiveM.

Admin rights: ESX group from Config.Admin.Groups (default admin, superadmin) or ACE pepper_trucking.admin:

add_ace group.admin pepper_trucking.admin allow

Company: permissions inside the company (hire, fire, ranks, fleet, AI, finance) depend on the rank in Config.Company.DefaultRanks, not on ESX jobs.

Exports and events

All exports are server-side and read-only:

Export Returns
GetTruckerData(src) career and statistics of a player
IsTruckerOnDuty(src) is the player on duty?
GetTruckerStatus(src) current status
GetTruckerJob(src) current job
GetOnDutyTruckers() list of drivers on duty
GetPlayerTrucks(identifier) a player's own trucks
GetTruckingCompany() company info
IsTruckingEmployee(srcOrIdentifier) is the player an employee?
GetFreightLocations() all freight locations
local onDuty = exports.pepper_trucking:IsTruckerOnDuty(source)

There is deliberately no export that lets other resources create money, XP or reputation.

FAQ

The resource does not start or reports missing dependencies.

Check the order in your server.cfg: oxmysql and es_extended must start before pepper_trucking. The manifest also requires server build 7290+ and OneSync – without OneSync the resource does not start.

The tables are missing in the database.

Keep Config.Database.AutoInstall = true or import sql/install.sql manually. All tables start with truck_.

Does Pepper Trucking run on QBCore or Qbox?

No. The resource uses es_extended directly and is built for ESX Legacy 1.9+ only.

Do players need an ESX job?

No. Everyone can start a shift; the company (staff, ranks, salary) runs inside the resource.

Do I have to add items?

No. Pepper Trucking uses no inventory items and needs neither ox_inventory nor item images.

The admin section in the tablet is missing.

Your ESX group must be listed in Config.Admin.Groups (default admin, superadmin) or you need the ACE pepper_trucking.admin.

A freight location is badly placed or inside a wall.

Drive there and capture it again in the freight location editor – with the trailer coupled in parking position (button or /truckloc). Freight locations live in the database, changes to config/locations.lua no longer apply after the first start.

The trailer is not detected as coupled.

Back the tractor unit onto the marked trailer until it couples, then pull it a few metres away from the bay (Config.Docking.CoupleMoved = 4.0).

Why did my job fail?

The deadline was exceeded by more than Config.Freight.MaxLate (1800 seconds), the trailer was gone for longer than Config.Docking.LostTimeout (900 seconds) or the cargo was destroyed.

Does F9 clash with Pepper Taxi or Pepper Bus?

No – Taxi uses F6, Bus F7. Every player can also change the key in the GTA key bindings.

I already use a fuel script.

Set Config.Fuel.System to 'legacyfuel', 'ox_fuel' or 'cdn-fuel'. With 'none' fuel is off completely.

Can I start shifts at the side depots?

Yes, once you have checked their coordinates in-game: set AllowShiftStart = true for the depot in Config.Depots.

Do AI drivers earn money while nobody is online?

Yes. Missed tours are caught up after a restart (at most Config.AI.MaxCatchUpJobs = 16 per driver). If the company account is empty, the AI drivers go on strike.

How do I change texts?

All texts are in locales/de.lua and locales/en.lua; pick the language with Config.Locale.

How much performance does the resource need?

Measured with resmon: 0.00 ms idle and 0.01 ms active.

Can another resource pay out money or XP through Pepper Trucking?

No, the exports are read-only. Pay is handled exclusively server-side.

Will an update delete my freight locations or settings?

Freight locations and progress live in the database and are not overwritten. Back up your changed files in config/ and locales/ before updating and carry your changes over to the new version.

Support

Questions and bugs: open a ticket in our Discord: https://discord.gg/6NaFJWKDYu – link your purchase with /verify first.

Permanently tested on the Pepper Scripts dev server.

Changelog

Current version: 1.0.0 (27 Sep 2026) – first release. All changes are listed in the CHANGELOG.md file in the resource folder.


Found a mistake? Report it on Discord.