Skip to content

Repository files navigation

Peak Trucking

License: MIT Version Discord

Peak Trucking is a premium open-source FiveM trucking resource with persistent driver progression, company trust, daily missions, leaderboards, legal freight, optional illegal cargo, and a React-based NUI dispatch tablet.

Peak Trucking UI preview

Features

  • Mission and route selection with truck level requirements
  • Company trust points and mission unlocks
  • Driver XP, levels, completed jobs, earnings, and recent work history
  • Daily mission progress and reset handling
  • Leaderboard data stored in SQL
  • Optional illegal cargo side job with target system integration (ox_target/qb-target)
  • Cancel active jobs from the dispatch UI or with /canceltrucking
  • Automatic job cancellation when the required truck, trailer, or attached cargo is destroyed
  • Movable Job HUD via /truckhud command with persistence
  • Framework support for QBCore and ESX (modern and legacy)
  • Inventory support for ox_inventory, qb_inventory, esx_inventory, and qs_inventory
  • Interaction support for drawtext, ox_target, qb_target, qb_textui, and esx_textui
  • Vite React + TypeScript NUI built into ui/dist

Dependencies

  • oxmysql
  • A supported framework: QBCore or ESX
  • Optional inventory/interaction resources based on your configuration

Installation

🤖 AI-First Setup (Recommended)

If you are using an AI coding assistant (like Claude, ChatGPT, or Cursor), you can set up this resource in seconds:

  1. Open PROMPT.md.
  2. Copy the content and paste it into your AI assistant.
  3. Follow its instructions to automatically configure the framework, inventory, key system, and database for your server.

Manual Setup

  1. Place this folder in your server resources as peak-trucking.
  2. Import install/install.sql into your database.
  3. Configure shared/config.lua and server/server-config.lua.
  4. Ensure dependencies before this resource:
ensure oxmysql
ensure peak-trucking

UI Development

The source NUI app is in ui. Build it before release:

cd ui
npm install
npm run build

The FiveM manifest loads ui/dist/index.html. Keep ui/dist in release archives and do not include ui/node_modules.

Configuration

Changelog

Unreleased

  • Added a configurable /canceltrucking command through Config.CancelJobCommand.
  • Improved the existing dispatch UI Cancel Job action so it clears truck, trailer, attached cargo, carried boxes, waypoints, blips, HUD state, and server job sessions.
  • Added automatic job cancellation when the active truck, required trailer, or attached cargo is destroyed.
  • Cleared server-side illegal cargo sessions when a job is canceled or the player disconnects.

Publishing Notes

  • Do not publish live Discord bot tokens or credentials.
  • Keep ui/dist committed or packaged for server use.
  • Do not include ui/node_modules in releases.
  • Review mission coordinates and item names before publishing a server-specific fork.

Contributing

Contributions are welcome. Please read CONTRIBUTING.md and CODE_OF_CONDUCT.md before opening issues or pull requests.

About

Premium open-source FiveM trucking resource with driver progression, company trust, daily missions, leaderboards, and a React NUI dispatch tablet.

Resources

Code of conduct

Contributing

Security policy

Stars

26 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages