DirkScripts Logo

Login With FiveM

Login

Server

lib.vehicle.addKeys

Give a player keys to a vehicle.

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

lib.vehicle.removeKeys

Remove a player's keys for a vehicle.

lua
lib.vehicle.removeKeys(src, veh, plate)
ParameterTypeRequiredDescription
srcnumberyesPlayer source
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.getByPlate

Look up vehicle data from the framework by plate.

lua
local vehicleData = lib.vehicle.getByPlate(plate)
ParameterTypeRequiredDescription
platestringyesVehicle plate string

lib.vehicle.generatePlate

Generate a unique vehicle plate that doesn't already exist in the database.

lua
local plate = lib.vehicle.generatePlate(format)
ParameterTypeRequiredDescription
formatstringnoPlate format pattern (default: '........' β€” 8 random alphanumeric characters)

Uses string.random() under the hood. Recursively generates until a unique plate is found. Result is always uppercase.

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.