DocsJobsFreight Logistics
Freight Logistics
A comprehensive guide to the Logistics Career system. Learn how to configure frameworks, balance the economy, add modded trucks, and create custom routes.
1
Database Installation
Before configuring the script, you must create the database table. Choose the query below that matches your server version.
QBox / Latest QBCore
Fixes "Illegal mix of collations" errors.
CREATE TABLE IF NOT EXISTS `xada_logistics_users` (
`citizenid` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
`xp` int(11) DEFAULT 0,
`level` int(11) DEFAULT 1,
`certificates` longtext COLLATE utf8mb4_unicode_ci DEFAULT '["comm_dl"]',
`trucks` longtext COLLATE utf8mb4_unicode_ci DEFAULT '[]',
`total_earnings` bigint(20) DEFAULT 0,
`total_jobs` int(11) DEFAULT 0,
PRIMARY KEY (`citizenid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;ESX / Legacy
Standard general configuration.
CREATE TABLE IF NOT EXISTS `xada_logistics_users` (
`citizenid` varchar(50) NOT NULL,
`xp` int(11) DEFAULT 0,
`level` int(11) DEFAULT 1,
`certificates` longtext DEFAULT '["comm_dl"]',
`trucks` longtext DEFAULT '[]',
`total_earnings` bigint(20) DEFAULT 0,
`total_jobs` int(11) DEFAULT 0,
PRIMARY KEY (`citizenid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;2
Framework & System
Configure exactly how the script interacts with your server's core resources.
Config.Debug = false -- Set to true to see print() logs in F8 console
Config.Locale = 'en' -- Selects 'locales/en.lua'. Change to 'lt' for Lithuanian.
Config.System = {
-- Auto-detects player money and job functions
Framework = 'qb-core', -- Options: 'qb-core', 'esx'
-- Which notification system to use?
Notify = 'ox_lib', -- Options: 'xada', 'ox_lib', 'qb', 'esx'
-- How do players start the job?
Interaction = 'textui', -- Options: 'textui' (Press E), 'target' (Third Eye)
-- If using TextUI, which style?
TextUI = 'xada', -- Options: 'xada', 'ox_lib', 'qb', 'esx'
-- If using Target, which script?
Target = 'ox_target', -- Options: 'qb-target', 'ox_target'
-- Used for potential item checks (optional)
Inventory = 'ox_inventory', -- Options: 'qb-inventory', 'ox_inventory', 'qs-inventory', 'esx_default'
-- The database table created in Step 1
SQLTable = 'xada_logistics_users',
}3
Economy & Leveling
Control the difficulty curve, payouts, and penalties.
Config.Economy = {
Currency = "$",
-- If a player does NOT own a truck, 15% of the payout is deducted.
RentalPenalty = 0.15,
-- Starting health of cargo (usually 100%)
MaxIntegrity = 100.0,
Payouts = {
DamagePenalty = 0.01, -- For every 1% damage, deduct 1% pay.
LatePenalty = 0.20, -- If timer hits 0:00, deduct 20% pay.
XPPerJob = 150, -- Base XP gained for finishing any job.
DistanceBonus = 1.5, -- (Optional) Used if specific job pay isn't set.
},
Leveling = {
BaseXP = 500, -- XP needed to go from Lvl 1 -> 2.
Multiplier = 1.2, -- Difficulty curve. Lvl 3 needs (Previous * 1.2) XP.
MaxLevel = 50 -- Player cannot level up past this.
},
-- Prices to buy certifications in the UI
CertPrices = {
['reefer_cert'] = 15000,
['hazmat_cert'] = 50000,
['heavy_cert'] = 35000,
['long_dist'] = 5000,
['night_ops'] = 7500
}
}4
Terminal & Spawns
Setup where the main NPC/Marker is located and where trucks spawn.
Config.Terminal = {
Coords = vector3(146.67, -3210.82, 5.85), -- Location of the Laptop/NPC
Label = "Freight Terminal",
-- Only used if Interaction = 'target'
Ped = {
Enable = true,
Model = 's_m_m_dockwork_01', -- The NPC Model
Heading = 166.0,
},
-- Map Blip settings
Blip = {
Enable = true,
Sprite = 477,
Color = 5,
Scale = 0.8,
Label = "Freight Broker"
},
-- List of parking spots. The script checks if a spot is clear before spawning.
SpawnPoints = {
vector4(140.75, -3204.45, 6.0, 270.0), -- x, y, z, heading
vector4(140.75, -3212.58, 6.0, 270.0),
vector4(140.75, -3221.16, 6.0, 270.0),
vector4(142.50, -3195.00, 6.0, 270.0),
}
}5
Vehicles & Dealership
This section bridges the gap between job types and actual GTA vehicles.
-- MAPPING: Job Type -> Spawn Code
-- This tells the script "If job is Reefer, spawn a Phantom and a Trailer".
Config.VehicleTypes = {
['Reefer'] = { default_truck = 'phantom', trailer = 'trailers' },
['Hazmat'] = { default_truck = 'hauler', trailer = 'tanker' },
['Flatbed'] = { default_truck = 'phantom', trailer = 'trflat' },
['Dry Van'] = { default_truck = 'benson', trailer = nil }, -- nil trailer = Box Truck
}
-- THE SHOP: What players can buy
Config.TruckShop = {
{
model = 'benson', -- Spawn code (must be valid GTA vehicle)
label = 'Vapid Benson (Mule)', -- Name in UI
price = 45000, -- Cost
image = 'benson.png', -- Image file in html/img folder
types = {'Dry Van'} -- Which jobs this truck can do
},
{
model = 'hauler',
label = 'JoBuilt Hauler',
price = 160000,
image = 'hauler.png',
types = {'Hazmat', 'Reefer', 'Flatbed'} -- Powerful truck = multiple job types
},
}6
Contracts & Licenses
Define the missions. You can add infinite contracts here.
-- LICENSES: Job Type -> Required Item/Cert
-- The 'Cert' must match a key in Config.Economy.CertPrices
Config.RequiredCerts = {
['Dry Van'] = 'comm_dl',
['Reefer'] = 'reefer_cert',
['Hazmat'] = 'hazmat_cert',
['Flatbed'] = 'heavy_cert',
}
-- THE JOBS
Config.Contracts = {
{
id = 1, -- Unique ID
dest = "Sandy Shores Grocery", -- Label
cargo = "Food Supplies", -- Cargo Name
pay = 8000, -- Total Payout
risk = 1, -- Star Rating (1-5)
type = "Dry Van", -- Must match Config.VehicleTypes key
level = 1, -- Minimum Player Level
coords = vector3(1959.0, 3748.0, 32.0) -- Destination Coords
},
{
id = 8,
dest = "Humane Labs",
cargo = "Volatile Chemicals",
pay = 45000,
risk = 5,
type = "Hazmat", -- Requires 'hazmat_cert' & Hauler
level = 10,
coords = vector3(3536.85, 3662.61, 28.12)
},
}7
Physics & Logging
Damage Physics
Config.Physics = {
BaseTime = 1200, -- Seconds allowed for delivery (20 Minutes)
-- G-Force Calculation
DamageThreshold = 2, -- Lower number = MORE sensitive to bumps/turns
DamageMultiplier = 2.0, -- Damage taken per tick when threshold is exceeded
}Discord Logs
Config.Webhooks = {
Enable = true,
Url = "https://discord.com/api/webhooks/...", -- Paste Webhook URL here
Name = "XADA Logistics",
Colors = {
Success = 65280, -- Green (Job Finish)
Purchase = 3447003, -- Blue (Bought Truck)
Exploit = 16711680 -- Red (Anti-Cheat)
}
}