Remember that this resource has verified DMCA protection, and its illegal use or distribution could imply a claim for protection of Title 17 of Chapter 512 (c) (3) of the Digital Millennium Copyright Act

Add item information

In order for the item information to appear in our inventory, we must add the following line in our config_metadata.js in case of qs-inventory, or qb-inventory/html/js/app.js
} else if ( == "vehiclekeys") {
$(".item-info-title").html("<p>" + itemData.label + "</p>");
"<p><strong>Plate: </strong><span>" +
5 +
"</span></p><p><strong>Model: </strong><span>" +
7 +


Give keys

This trigger works to give the user the vehicle keys that you choose, you need to send 2 values on your script.
Client side
TriggerServerEvent('vehiclekeys:server:givekey', plate, model)

Remove keys

This trigger deletes the keys that the user has as long as you send the correct key information. Just like the other trigger you need to send the plate and model values.
Client side
TriggerServerEvent('vehiclekeys:server:removekey', plate, model)


It is the registration of the vehicle, mostly you can use it
local vehicle = GetVehiclePedIsIn(playerPed, false) --
local plate = GetVehicleNumberPlateText(vehicle) --
local vehicle = GetVehiclePedIsIn(playerPed, false) --
local plate = ESX.Game.GetVehicleProperties(vehicle).plate
These are just examples, you can send the vehicle however you want, it depends a lot on the script.


This one is a little more complicated because many times it is not sent by the scripts or you have to do it manually, this one is a little more complicated because many times it is not sent by the scripts or you have to do it manually. But you can always use the same code since you need the entity.
local vehicle = GetVehiclePedIsIn(playerPed, false)
local model = GetDisplayNameFromVehicleModel(GetEntityModel(vehicle))
The script will warn you when you send the wrong values, but I recommend you always use print() to see if you are doing it right

Vehicleshop modifications

For the resource to work, we need to add the event that gives you the keys in our scripts that call the vehicle, although it would work just the same if you just add it in your vehicleshop
Please make sure you have basic knowledge to add this event, as supporters are not your personal developers
The event below consists of two parts, as we can see it requires adding a plate and a model so that the keys take the metadata
We will need to modify the plate and model part to make it work with our resources
TriggerServerEvent('vehiclekeys:server:givekey', plate, model)
We can follow the esx_vehicleshop example like this:
ESX.Game.SpawnVehicle(vehicleData.model, Config.Zones.ShopOutside.Pos, Config.Zones.ShopOutside.Heading, function (vehicle)
TaskWarpPedIntoVehicle(playerPed, vehicle, -1)
local newPlate = GeneratePlate()
local vehicleProps = ESX.Game.GetVehicleProperties(vehicle)
vehicleProps.plate = newPlate
SetVehicleNumberPlateText(vehicle, newPlate)
TriggerServerEvent('vehiclekeys:server:givekey', newPlate, vehicleData.model)
if Config.EnableOwnedVehicles then
TriggerServerEvent('esx_vehicleshop:setVehicleOwned', vehicleProps)
Make sure to use it by modifying the value of "plate" and "model" to be compatible with your event
We also have an event to remove the keys, using the following event
TriggerServerEvent('vehiclekeys:server:removekey', plate, model)