This is the metadata of the keys, if you have the latest version of qs-inventory you don't need to add anything
qs-inventory/config/metadata.js
} else if (itemData.name == "vehiclekeys") {
$(".item-info-title").html("<p>" + itemData.label + "</p>");
$(".item-info-description").html(
"<p><strong>Plate: </strong><span>" +
itemData.info.plate +
"</span></p><p><strong>Model: </strong><span>" +
itemData.info.description +
"</span></p>"
);
} else if (itemData.name == "plate") {
$(".item-info-title").html("<p>" + itemData.label + "</p>");
$(".item-info-description").html(
"<p><strong>Plate: </strong><span>" +
itemData.info.plate +
"</span></p>"
);
qb-inventory/server/main.lua
-- Add this before giveitem command
-- Line ~ 2369
function generar_matricula()
local caracteres = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
local matricula = ""
for i = 1, 8 do
local aleatorio = math.random(1, #caracteres)
matricula = matricula .. caracteres:sub(aleatorio, aleatorio)
end
return matricula
end
elseif itemData["name"] == "plate" then
info.plate = generar_matricula()