Guide 2026-05-06

FiveM Vehicle Keys Script: Agency-Vehiclekeys Guide 2026

OntelMonke

OntelMonke

Admin & Developer at Agency Scripts

The Problem with Default Vehicle Access in FiveM

Out of the box, GTA V and FiveM let any player enter and drive any vehicle without restriction. There are no keys, no ownership mechanics, no consequences for jumping into a stranger's car and driving away. For casual servers this barely matters, but for any serious roleplay community this default behavior is a fundamental immersion-breaker. Every car becomes a communal taxi. Vehicle theft loses all meaning. Parking your car near the bank while you run a job becomes a gamble against other players helping themselves.

A FiveM vehicle keys script solves this problem at the framework level. It attaches ownership and physical keys to every vehicle spawned or purchased on the server, requiring players to have the correct key item in their inventory to unlock, start, and drive a car. Vehicles without a key are locked — a player trying to enter one is simply refused. To drive a car you do not own, you need to either borrow the key, use a hotwire mechanic, or pick the lock. These three mechanics together transform vehicle interaction from a non-event into a meaningful layer of roleplay friction.

In 2026, Agency-Vehiclekeys is the standout choice for servers that want this system implemented cleanly, with deep QBCore and ESX integration, an engaging hotwire mini-game, and a single low one-time price. This guide covers everything you need to know.

What Agency-Vehiclekeys Delivers

Agency-Vehiclekeys is built around five core feature pillars that together make vehicle ownership feel real:

1. Physical Key Items

When a player spawns or purchases a vehicle, a unique key item is placed in their inventory. This item is the only way to unlock and start that specific vehicle — it is tied to the vehicle's network ID or plate. The key can be physically handed to another player, dropped, stored in a stash, or lost. If you lose your key, you cannot start your car without using hotwire or calling a locksmith (a job mechanic you can configure). This single design decision — turning keys into real inventory items — creates a cascade of authentic roleplay scenarios that default FiveM simply cannot support.

2. Key Sharing

The key sharing system lets the vehicle owner create a duplicate key and hand it to any other player. This is essential for co-owned vehicles, family cars, mechanic shops that need to move vehicles around, and criminal crews sharing a getaway car. Sharing is done through a simple in-game interaction — target the player, select "Give Vehicle Key", and the duplicate appears in their inventory. The owner retains their key; the recipient gets a functioning copy that works identically to the original. Owners can also revoke all shared keys at any time, locking out anyone who previously had access.

3. Hotwire Mini-Game

When a player attempts to enter a locked vehicle they do not have a key for, they are presented with the option to hotwire it. Agency-Vehiclekeys includes a polished NUI hotwire mini-game — a timed wire-matching challenge that requires player skill rather than a simple dice roll. Successfully completing the mini-game starts the car but triggers server-side events that other scripts can hook into: alert the car owner, notify police dispatch, log the incident to MDT. The difficulty and time limit of the mini-game are fully configurable, and you can set different difficulty tiers based on vehicle class (economy cars easier, supercars harder).

4. Lockpick System

The lockpick system covers the door-unlock step separately from hotwiring. A player with a lockpick item in their inventory can attempt to pick the lock of a vehicle door. This is a prerequisite for entering the vehicle at all when hotwiring — you pick the door, then hotwire to start. Lockpicking has its own mini-game and its own configurable success rate and item consumption chance. Failed lockpick attempts can break the lockpick (configurable) and optionally send a notification to nearby players or police. This two-step process — pick lock, then hotwire — makes vehicle theft meaningfully risky and time-consuming, exactly as it should be in serious RP.

5. Deep QBCore and ESX Integration

Agency-Vehiclekeys integrates directly with QBCore inventory (ox_inventory compatible) and ESX inventory out of the box. Key items appear as proper inventory objects with icons and metadata. Vehicle ownership ties into QBCore's vehicle ownership database (player_vehicles) and ESX's equivalent. When a player retrieves their car from the dealership or impound, their key is automatically generated and placed in their inventory. All notifications — lock/unlock confirmations, hotwire alerts, lockpick attempts — use your framework's native notification system so they match the rest of your server's UI.

Additional Features

Beyond the five core pillars, Agency-Vehiclekeys includes several quality-of-life mechanics:

  • Lock/Unlock animations: The character plays a realistic reaching animation when locking or unlocking a vehicle, with an audible click sound.
  • Proximity locking: Lock and unlock from a configurable distance using a keybind or radial menu option — no need to stand right next to the door.
  • Vehicle alarm: Optionally trigger a car alarm when a lockpick or hotwire attempt is made. The alarm draws nearby player attention and can notify the owner via phone notification (if Agency Phone is installed).
  • Job-exempt vehicles: Define a list of job vehicles (police cars, ambulances, tow trucks) that are exempt from the key system — officers can enter job vehicles freely without needing a key item.
  • Impound integration: When a vehicle is impounded, the associated key is automatically invalidated. When the vehicle is retrieved from impound, a new key is generated.
  • Export API: A clean export API lets other scripts check key ownership, generate keys programmatically, or revoke keys — useful for mechanic scripts, dealership scripts, and custom job integrations.

Installation: Step-by-Step

Step 1 — Purchase Agency-Vehiclekeys

Head to shop.agencyg.de/en/products/vehiclekeys and complete the one-time purchase of €5.99. After checkout you receive download access through the Agency Scripts shop portal. No subscription, no renewal — you own it permanently.

Step 2 — Place the Resource

Extract the downloaded archive and drop the agency-vehiclekeys folder into your server's resources directory (or a subfolder like resources/[scripts]/).

Step 3 — Add to server.cfg

Open your server.cfg and add the ensure line after your framework and inventory resources:

ensure agency-vehiclekeys

Step 4 — Configure Config.lua

Open agency-vehiclekeys/config/Config.lua and set your framework, inventory system, and feature preferences. See the example below for a representative configuration.

Step 5 — Add Key Items to Your Inventory

If you are using QBCore or ESX, add the key item definition to your shared items file. The exact item definition is provided in the documentation at docs.agencyg.de/vehiclekeys. For ox_inventory users, add the item to your items.lua instead.

Step 6 — Restart and Test

Restart your server. Spawn a vehicle, check your inventory for the key item, lock the vehicle, walk away, return, and try to enter it without the key. Then test handing the key to another player, the lockpick interaction, and the hotwire mini-game.

Config.lua Example

Below is a representative configuration showing the most important options in Agency-Vehiclekeys:

-- Agency-Vehiclekeys: Config.lua

Config = {}

-- Framework: "qbcore" or "esx"
Config.Framework = "qbcore"

-- Inventory system: "qb-inventory", "ox_inventory", or "esx"
Config.Inventory = "ox_inventory"

-- Item name for vehicle keys in your inventory
Config.KeyItem = "vehicle_key"

-- Item name for lockpicks
Config.LockpickItem = "lockpick"

-- Distance (metres) from which player can lock/unlock their vehicle
Config.LockDistance = 8.0

-- Enable vehicle alarm on hotwire/lockpick attempt
Config.EnableAlarm = true
Config.AlarmDuration = 30  -- seconds

-- Hotwire mini-game settings
Config.Hotwire = {
    enabled    = true,
    timeLimit  = 20,         -- seconds to complete mini-game
    difficulty = "medium",   -- "easy", "medium", "hard"
    -- Per-class overrides (GTA vehicle class numbers)
    classOverrides = {
        [6]  = "easy",   -- off-road: easier
        [7]  = "hard",   -- supercars: harder
        [14] = "hard",   -- military: very difficult
    },
}

-- Lockpick settings
Config.Lockpick = {
    enabled          = true,
    breakChance      = 0.25, -- 25% chance lockpick breaks on failure
    alertPolice      = true, -- send notification to online police on attempt
    alertRadius      = 30.0, -- metres within which police are notified
}

-- Job-exempt vehicles (these jobs can enter any vehicle without a key)
Config.ExemptJobs = { "police", "ambulance", "mechanic", "tow" }

-- Notification system: "qb", "esx", "okok", "ox"
Config.NotifySystem = "qb"

-- Enable export API for other scripts to interact with the key system
Config.EnableExports = true

Framework and Inventory Compatibility

Agency-Vehiclekeys supports the following combinations out of the box:

  • QBCore + qb-inventory: Full integration — keys appear in the QBCore inventory UI, vehicle ownership syncs with player_vehicles
  • QBCore + ox_inventory: Full integration — keys rendered as ox items with metadata, compatible with all ox_inventory features
  • ESX + ESX inventory: Full integration — keys in the ESX inventory system, ownership synced with the ESX vehicle table

If you run a different inventory system, the export API and the open Lua codebase make it straightforward to add a custom bridge. The documentation includes a bridge template.

Documentation

The full documentation — all config options, inventory item definitions, export API reference, job-exempt setup, and FAQ — is available at docs.agencyg.de/vehiclekeys. The docs are kept up to date with every release and include copy-paste item definitions for QBCore, ESX, and ox_inventory.

Pricing: €5.99 One-Time

Agency-Vehiclekeys costs €5.99 as a single one-time payment through the Agency Scripts shop. There is no subscription, no renewal, no per-server fee. Pay once and own it forever — all future updates to the current major version are included at no additional cost. At under six euros, this is one of the most cost-effective premium FiveM scripts on the market. A comparable vehicle keys system from another developer on a subscription model would cost that in a single month; Agency-Vehiclekeys gives you the same or better quality for a one-time price that most server owners spend on coffee in a week.

Who Should Use Agency-Vehiclekeys?

Agency-Vehiclekeys is the right choice for:

  • Serious RP servers that want vehicle ownership to carry real weight — no more jumping into any car you see
  • Criminal RP communities that want authentic hotwire and lockpick mechanics that make vehicle theft a skilled, risky activity
  • Servers with car dealerships — seamless integration means key generation is automatic at point of sale
  • Police RP servers — alarm alerts and police notifications on lockpick/hotwire attempts create genuine responding scenarios
  • QBCore and ESX servers looking for a drop-in, well-maintained keys solution that respects existing framework conventions

Summary

Vehicle keys are a foundational mechanic for any server that takes roleplay seriously. Agency-Vehiclekeys delivers the complete package — physical key items, key sharing, a skill-based hotwire mini-game, a two-stage lockpick system, vehicle alarms, and deep framework integration — for a one-time cost of €5.99. It is, objectively, one of the highest-value purchases you can make for your FiveM server. Visit the shop, pick it up, and transform how vehicles work on your server today.

Get Agency-Vehiclekeys — €5.99, One-Time

No subscriptions. Realistic key management, hotwire mini-game, lockpick, sharing, and alarms — all in one script.

Share this article

Ready to upgrade your server?

Check out our premium FiveM scripts in the Agency Scripts store or join our Discord community for support and updates.