Installation

Installation

Requirements

Required

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.git

2. Install Dependencies

Navigate to the web directory and install the Node.js dependencies:

cd legends_autopilot/web
npm install
⚠️

Requires Node.js (v16 or later) and npm installed on your machine.

3. Build the UI

Build the production-ready UI files:

npm run build

This 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 dev

This 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_autopilot
⚠️

Important: 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

ActionDefault KeyNotes
Open/Close Autopilot UI/autopilot commandCommand name configurable in config.lua
Cancel AutopilotSBrake key
Cancel AutopilotSPACEHandbrake key
Close UIESCStandard close

Verification

After installation:

  1. Enter a vehicle as the driver
  2. Set a waypoint on the map
  3. Type /autopilot in chat to open the UI panel
  4. Adjust your driving style, speed, and stopping distance using the UI controls
  5. Click Start — the vehicle should begin driving to the waypoint
  6. Press S or SPACE to cancel at any time

Need help? Join our Discord (opens in a new tab) and open a support ticket!


Legends Store - Premium FiveM Scripts