For the complete documentation index, see llms.txt. This page is also available as Markdown.

Test Drive

Buyers can take a listed vehicle for a spin before committing to a purchase. The vehicle spawns at a fixed safe spot with a configurable time limit; canceling early teleports the player back to where they were.


Settings

shared/config.lua
Config.TestDrive = {
    Enabled = true,
    coords = vec3(-1015.0851, -3328.7476, 13.9444),
    heading = 59.8811,
    secondslimit = 20,
    price = 0,
    cancelKey = 73,
}
Field
Default
Purpose

Enabled

true

Master toggle for the feature

coords

vec3(...)

World position where the test vehicle spawns

heading

59.88

Spawn heading

secondslimit

20

Duration in seconds (test ends automatically)

price

0

Bank fee charged when the test starts

cancelKey

73 (X)

Key code to cancel early


Cancel key reference

Code
Key

73

X

47

G

38

E

Any FiveM control ID works. See the FiveM controls reference.


Per-zone overrides

Add a testDrive table to any zone in Config.Zones to override the defaults for that zone:

Any field omitted from the override falls back to the global Config.TestDrive.


Disabling test drives

The "Test drive" button is hidden from the tablet UI and any direct calls return a disabled error.

Last updated