Skip to main content
Vehicle keys bridges abstract how different key systems lock and unlock vehicles.
Your scripts call one function, and TS-Lib routes it to qb-vehiclekeys, qs-vehiclekeys or a standalone implementation.

Status & testing


Supported key systems

TS-Lib ships with support for:
  • qb-vehiclekeys
  • qs-vehiclekeys
  • lfKeys
  • standalone (no external keys resource)
Configuration is controlled via ts-lib/config.lua:
When Config.VehicleKeys = 'auto', TS-Lib selects the first started resource from Config.Data.VehicleKeys.

Client-side API

Bridge.VehicleKeys.Client.Functions.SetDoorStatus(entity, lockStatus)

This is the main entrypoint you will use from your scripts.
Lock status convention (GTA natives):
  • 1 – unlocked
  • 2 – locked
  • 4 – locked for all players, etc.

Behavior per system

  • qb-vehiclekeys
  • qs-vehiclekeys
  • lfKeys
  • standalone
In standalone mode, lock state is kept entirely via entity state and natives, without any external resource.

Server-side API

Right now TS-Lib does not expose additional server-side helpers for keys.
The server bridge (Bridge.VehicleKeys.Server) is kept as a placeholder for future extensions:
  • Centralized key granting/revoking
  • Permission-aware lock/unlock operations
  • Auditing of lock events
You are free to extend it in your own fork following the same structure as the existing bridges.
Last modified on July 22, 2026