Client

Library
Updated 2 months ago · v1.3.7

lib.vehicle.addKeys

Give the player keys to a vehicle.

lua
lib.vehicle.addKeys(veh, plate)
ParameterTypeRequiredDescription
vehnumberyesVehicle entity handle
platestringyesVehicle plate string

lib.vehicle.removeKeys

Remove the player's keys for a vehicle.

lua
lib.vehicle.removeKeys(veh, plate)
ParameterTypeRequiredDescription
vehnumberyesVehicle entity handle
platestringyesVehicle plate string

lib.vehicle.setFuel

Set a vehicle's fuel level.

lua
lib.vehicle.setFuel(veh, val, _type)
ParameterTypeRequiredDescription
vehnumberyesVehicle entity handle
valnumberyesFuel level
_typeanynoFuel type (resource-specific)

lib.vehicle.getFuel

Get a vehicle's current fuel level.

lua
local fuel = lib.vehicle.getFuel(veh)

lib.vehicle.getClass

Get a vehicle's class ID and human-readable class name.

lua
local classId, className = lib.vehicle.getClass(veh)
-- e.g. 7, "Super"

Vehicle Classes

IDClass
0Compacts
1Sedans
2SUVs
3Coupes
4Muscle
5Sports Classics
6Sports
7Super
8Motorcycles
9Off-road
10Industrial
11Utility
12Vans
13Cycles
14Boats
15Helicopters
16Planes
17Service
18Emergency
19Military
20Commercial
21Trains
Was this page helpful?
This page was last updated on 12 March 2026
DIRKSCRIPTS
All you need for your FiveM server.10% off your first order

Unsubscribe any time.

Copyright © 2026 DirkScripts. Not affiliated with or endorsed by Rockstar North or Take-Two Interactive.