Skip to content

VNS Auto Drive

An autopilot script for FiveM. A player in the driver seat sets a waypoint on the map, runs /autodrive (or presses the keybind) and the vehicle drives itself to the waypoint in one of four speed modes. The vehicle brakes to a stop at the destination, and touching any driving control hands the wheel straight back to the player.

One resource runs on QBCore, QBox and ESX. Vehicle ownership and notifications come from vns-core, which reads your framework's own vehicle table - the script itself needs no database setup.

Feature overview

  • Waypoint autopilot - drives to the current map waypoint using GTA's long-range driving task. No waypoint, no autopilot.
  • Four speed modes - slow, normal, fast and superfast, shared by the command and the keybind. The keybind uses one mode chosen in the config.
  • Ownership checks - by default only the vehicle's owner can use Auto Drive. You can relax this to "any owned vehicle" or "every vehicle".
  • Vehicle whitelist - restrict Auto Drive to specific models, or allow every vehicle.
  • Instant manual override - accelerating, braking, steering or the handbrake cancels the autopilot immediately. It also disengages about 10 m before the waypoint and brakes the car down.
  • Vehicle summon - mark your vehicle with /markvehicle, step out, and triggering Auto Drive on foot sends the car to your position with an invisible driver. Trigger it again to cancel.

How it plays out

  1. The player sets a waypoint and sits in the driver seat of an allowed vehicle.
  2. /autodrive normal - the server checks access by the vehicle's plate and the autopilot takes over.
  3. The car follows roads to the waypoint at the mode's speed, slows down on arrival and stops.
  4. At any point the player can grab the controls to cancel, or run the command/keybind again to switch it off.

Open vs Encrypted

The script ships in an Open and an Encrypted variant. In the Encrypted variant config.lua, client/client_open.lua and server/server_open.lua stay editable - ownership rules, whitelist, speeds, commands, keybind, texts, notifications and the access check live there.