Installation
Requirements
Required
- ox_lib (opens in a new tab) - Used for notifications and player cache
This resource works with any framework (ESX, QBCore, etc.) or completely standalone. The only dependency is ox_lib.
Download
There are two ways to get the resource depending on your experience level.
Option A: Pre-Built (FiveM Ready)
Recommended for most users. If you have no coding experience or just want to get the resource running as quickly as possible, use this option.
Download the latest pre-built release that is ready to drop into your server with no extra steps:
Download FiveM-Ready Build (v1.0.0) (opens in a new tab)
This build includes the compiled UI files — no Node.js, no build tools, no extra setup required. Just extract and go.
Option B: Build From Source (Developers)
If you are familiar with React and want to customize the UI, or prefer building from source, clone the repository and build the UI yourself.
1. Clone the Repository
git clone https://github.com/LegendsTeamDev/legends_autopilot.git2. Install Dependencies
Navigate to the web directory and install the Node.js dependencies:
cd legends_autopilot/web
npm installRequires Node.js (v16 or later) and npm installed on your machine.
3. Build the UI
Build the production-ready UI files:
npm run buildThis compiles the React app into web/dist/, which is what the FiveM resource uses. After building, the resource is ready to be placed on your server.
4. Development Mode (Optional)
If you want to work on the UI with hot-reload in your browser:
npm run devThis starts a local Vite dev server (usually at http://localhost:5173). You can preview and develop the UI in your browser outside of FiveM. Note that NUI callbacks (communication with the game client) will not work in the browser — the UI will only fully function inside FiveM.
When you are done making changes, run npm run build to compile the final production files before using the resource on your server.
Installation Steps
Step 1: Extract to Resources
Place the legends_autopilot folder into your server's resources directory.
resources/
└── legends_autopilot/
├── fxmanifest.lua
├── config.lua
├── client/
│ └── main.lua
└── web/
└── dist/
├── index.html
└── assets/Important: The resource folder must be named exactly legends_autopilot. The resource will not function if renamed.
Step 2: Add to Server Config
Add the following lines to your server.cfg:
ensure ox_lib
ensure legends_autopilotImportant: ox_lib must start before legends_autopilot.
Step 3: Configure (Optional)
Customize server-wide settings like the command name, blocked vehicle classes, and notification preferences in config.lua. See the Configuration page for all options.
Driving style, max speed, and stopping distance are configured by each player through the in-game UI — these are not set in the config file.
Step 4: Restart Server
Restart your server or use the refresh and ensure legends_autopilot commands.
Default Controls
| Action | Default Key | Notes |
|---|---|---|
| Open/Close Autopilot UI | /autopilot command | Command name configurable in config.lua |
| Cancel Autopilot | S | Brake key |
| Cancel Autopilot | SPACE | Handbrake key |
| Close UI | ESC | Standard close |
Verification
After installation:
- Enter a vehicle as the driver
- Set a waypoint on the map
- Type
/autopilotin chat to open the UI panel - Adjust your driving style, speed, and stopping distance using the UI controls
- Click Start — the vehicle should begin driving to the waypoint
- Press S or SPACE to cancel at any time
Need help? Join our Discord (opens in a new tab) and open a support ticket!