DirkScripts Logo

Login With FiveM

Login

Client

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

Copyright Β© 2026 DirkScripts.

Not affiliated with or endorsed by Rockstar North, Take-Two Interactive, or any other rights holders. FiveM is a copyright and registered trademark of Take-Two Interactive Software, Inc.
Our checkout system is provided by Tebex Limited, who manage payment processing, product delivery, and billing support. Prices shown in currencies other than GBP are approximate conversions updated daily. All purchases are processed in GBP, so the final amount charged may vary depending on your bank or payment provider’s exchange rate.