Skip to content

Configuration

Everything lives in config.lua, which stays editable in both the Open and Encrypted variant. There are no framework or database options - ownership checks and notifications are handled by vns-core.

Ownership

Option Default What it does
Config.RequireOwner true The vehicle must be owned by some player (its plate must be in the framework's vehicle table). Otherwise: "This vehicle has no owner."
Config.OwnerOnly true Only the vehicle's owner can use Auto Drive. Otherwise: "Only the owner can use Auto Drive mode." Overrides RequireOwner.

How they combine:

RequireOwner OwnerOnly Result
any true Only your own vehicles (default).
true false Any vehicle owned by a player, regardless of who.
false false Every vehicle, no ownership check.

The check runs on the server by plate, for both Auto Drive and /markvehicle.

Vehicles

Config.Vehicles = { "teslapd", "t20" }

Spawn names of the vehicles that can use Auto Drive and the summon feature. Matching is case-insensitive against the model's display name. Set Config.Vehicles = {} to allow every vehicle.

Speeds

Config.Speeds is used by both /autodrive and the keybind. Values are in metres per second:

Mode Default Roughly
slow 15.0 54 km/h (34 mph)
normal 21.0 76 km/h (47 mph)
fast 33.0 119 km/h (74 mph)
superfast 100.0 360 km/h (224 mph) - effectively the vehicle's top speed

To convert: m/s x 3.6 = km/h. The mode names are the command arguments; you can change the values, and adding a new key makes it available as /autodrive <key> too.

Commands and keybind

Option Default What it does
Config.Command 'autodrive' Command name: /autodrive slow \| normal \| fast \| superfast.
Config.MarkCommand 'markvehicle' Command that marks or unmarks your vehicle for the summon feature.
Config.Keybinds.enable true Register a key mapping that triggers Auto Drive without typing the command.
Config.Keybinds.key 'F7' Default key. Players can rebind it under Settings → Key Bindings → FiveM.
Config.Keybinds.speed 'normal' Mode the keybind uses - one of the keys in Config.Speeds.

The keybind label in the FiveM settings is Config.Lang.keybindText. If you change Config.Keybinds.speed, update that text too - it isn't adjusted automatically.

Texts

Key Default
mark 'You have marked your vehicle.'
unmark 'You have unmarked your vehicle.'
apActive 'Auto Drive activated!'
apCanceled 'Auto Drive deactivated!'
noWaypoint 'You have no waypoint.'
noOwner 'This vehicle has no owner.'
ownerOnly 'Only the owner can use Auto Drive mode.'
blipName 'Your vehicle' (blip of the marked vehicle)
keybindText 'Enable Auto Drive (Normal speed)'
commandHelp / commandArgHelp Chat suggestion for /autodrive
markCommandHelp Chat suggestion for /markvehicle
usage Shown when /autodrive is run without a speed

Open files

File Functions
client/client_open.lua showNotification, CheckVehicleAccess
server/server_open.lua IsPlayerVehicleOwner, DoesVehicleHaveOwner, GetVehicleAccess (returns 1 allowed, 2 no owner, 3 not the owner) - replace it for custom rules, e.g. job vehicles