🚛 Peak Trucking Documentation
Welcome to the official documentation for Peak Trucking, a premium FiveM trucking resource designed for deep player engagement, persistent progression, and framework flexibility.
🌟 Overview
Peak Trucking is a comprehensive job system that goes beyond simple "point A to B" deliveries. It features a modern React-based NUI tablet, a persistent leveling system, company reputation (trust), and dynamic daily missions.
Key Features
- 📱 React NUI Tablet: A high-end dispatch interface for mission selection and stats tracking.
- 📈 Persistent Progression: Driver XP, levels, and career history saved to SQL.
- 🤝 Company Trust: Earn reputation with different logistics companies to unlock higher-tier missions.
- 📅 Daily Missions: Randomized daily objectives with XP rewards.
- 📦 Cargo Variety: From legal freight to high-risk military hardware and optional illegal "side-hustles".
- 🛠️ Framework Agnostic: Native support for QBCore, ESX, and Qbox via a robust bridge system.
- 🚚 Dynamic HUD: Real-time mission tracking with a movable, persistent UI.
📥 Installation
1. Database Setup
Import the provided SQL file to create the necessary tables:
- File:
install/install.sql
2. Resource Placement
Place the peak-trucking folder in your resources directory.
3. Configuration
Ensure you have the required dependencies started before peak-trucking:
cfgensure oxmysql ensure peak-trucking
4. Build NUI (For Developers)
If you are modifying the UI, navigate to the ui folder and build the project:
bashcd ui npm install npm run build
Note: The ui/dist folder is already included and ready for production.
⚙️ Configuration
The main configuration is located in shared/config.lua.
Core Settings
| Option | Default | Description |
|---|---|---|
Config.Framework | 'auto' | Auto-detects QBCore, ESX, or Qbox. |
Config.SQL | 'auto' | Driver for database operations (oxmysql, ghmattimysql). |
Config.InteractionHandler | 'auto' | Interaction method (drawtext, target, etc). |
Config.Inventory | 'auto' | Inventory system for illegal items and cargo checks. |
Config.Fuel | 'ox_fuel' | Fuel system integration. |
Config.EnableGhostMode | true | Prevents vehicle collisions in the spawn area. |
Leveling & XP
XP is awarded upon successful delivery. The default range is defined in Config.GiveXP:
luaConfig.GiveXP = { min = 100, max = 500 }
Missions & Vehicles
Missions are highly customizable, including:
- Requirements: Level and Company Trust points.
- Vehicles: Restrict specific missions to specific trucks.
- Routes: Support for multi-phase routes and trailer spawning.
🎮 Gameplay Features
Driver progression
Players earn XP and Level Up. Higher levels unlock premium trucks and more lucrative missions. Career stats (Total Earnings, Completed Jobs) are displayed on the Tablet.
Company Trust
There are 8 distinct logistics companies. Completing their missions earns you Trust Points specific to that company, which are used to unlock "Special Deliveries".
Daily Missions
Players receive 3 randomized goals every 24 hours (e.g., "Complete 1 Special Delivery", "On the roads for 30 mins"). Completing these grants significant XP boosts.
Illegal Cargo
While on a legal job, players can interact with the Illegal NPC to pick up high-risk cargo. Loading 10 illegal boxes into your truck before finishing the job grants a massive cash bonus.
💻 Technical Reference
Commands
| Command | Description |
|---|---|
/truckhud | Toggles HUD edit mode, allowing you to move the job tracker. |
Client Exports
GetTruckingJobData
Returns the current active mission data.
lualocal jobData = exports['peak-trucking']:GetTruckingJobData()
Events
Client Events
peak-trucking:OpenMenu: Opens the trucking tablet (can be used with your own radial menu or markers).peak-trucking:createNotification: Show a script-styled notification.
Server Events
peak-trucking:FinishJob: Triggered when a job is completed (handled internally, but useful for logs).peak-trucking:UnlockMission: Unlocks a mission using company points.
Custom Hooks (client/custom.lua & server/custom.lua)
Use these files to integrate with your own scripts without touching the core logic.
CanOpenTruckingMenu(): Validate if a player can access the job.OnMissionStarted(missionId, routeIndex): Trigger custom logic when a job begins.OnMissionCompleted(missionId, payment): Hook into the completion event.Open.AddMoney(source, amount, type): Override the default payment system.
📋 Requirements
- A supported framework (QBCore, ESX, Qbox)
🆘 Support
Join our Discord for updates and support: Peak Studios Discord