Installation Guide
Follow these steps for flawless instalation:
Download the script from your cfx portal.
Place the script into your server resource folder:
FXServer\server-data\resources\fivecode_carkeysWrite the script into your server.cfg:
ensure fivecode_carkeysSetup your inventory - ox, qb, qs, aq:
ox
Add the following into:
ox_inventory\modules\items\client.lua
['vehiclekeys'] = {
label = 'Vehicle Keys',
weight = 10,
stack = false,
close = true,
},qb
Add the following into:
qb-core\shared\items.lua
['vehiclekeys'] = {
['name'] = 'vehiclekeys',
['label'] = 'Vehicle Keys',
['weight'] = 50,
['type'] = 'item',
['image'] = 'vehiclekeys.png',
['unique'] = true,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Advanced Vehicle Keys',
},and this into:
qb-inventory/html/js/app.js
New:
else if (itemData.name == "vehiclekeys") {
return `
<p><strong>${itemData.info.label}</strong></p>
<p><strong>Model: </strong><span>${itemData.info.model}</span></p>
<p><strong>Plate: </strong><span>${itemData.info.plate}</span></p>
<p><strong>VIN: </strong><span>${itemData.info.vin}</span></p>
<p><strong>Security key: </strong><span>${itemData.info.key}</span></p>
`;
}
Old:
else if (itemData.name == "vehiclekeys") {
$(".item-info-title").html("<p>" + itemData.info.label + "</p>");
$(".item-info-description").html(
"<p><strong>Model: </strong><span>" +
itemData.info.model +
"<p><strong>Plate: </strong><span>" +
itemData.info.plate +
"</span></p><p><strong>VIN: </strong><span>" +
itemData.info.vin +
"</span></p><p><strong>Security key: </strong><span>" +
itemData.info.key +
"</span></p>"
);
}qs
Add the following into:
qs-inventory\shared\items.lua
['vehiclekeys'] = {
['name'] = 'vehiclekeys',
['label'] = 'Vehicle Keys',
['weight'] = 50,
['type'] = 'item',
['image'] = 'vehiclekeys.png',
['unique'] = true,
['useable'] = true,
['shouldClose'] = true,
['combinable'] = nil,
['description'] = 'Advanced Vehicle Keys',
},and this into:
qs-inventory\config\metadata.js
New:
else if (itemData.name == "vehiclekeys") {
return `
<p><strong>${itemData.info.label}</strong></p>
<p><strong>Model: </strong><span>${itemData.info.model}</span></p>
<p><strong>Plate: </strong><span>${itemData.info.plate}</span></p>
<p><strong>VIN: </strong><span>${itemData.info.vin}</span></p>
<p><strong>Security key: </strong><span>${itemData.info.key}</span></p>
`;
}
Old:
else if (itemData.name == "vehiclekeys") {
$(".item-info-title").html("<p>" + itemData.info.label + "</p>");
$(".item-info-description").html(
"<p><strong>Model: </strong><span>" +
itemData.info.model +
"<p><strong>Plate: </strong><span>" +
itemData.info.plate +
"</span></p><p><strong>VIN: </strong><span>" +
itemData.info.vin +
"</span></p><p><strong>Security key: </strong><span>" +
itemData.info.key +
"</span></p>"
);
}ps
Add the following into:
qb-core\shared\items.lua
vehiclekeys = {
name = 'vehiclekeys',
label = 'Vehicle Keys',
weight = 50,
type = 'item',
image = 'vehiclekeys.png',
unique = true,
useable = true,
shouldClose = true,
combinable = nil,
description = 'Advanced Vehicle Keys',
},And this to:
ps-inventory/html/js/app.js
New:
else if (itemData.name == "vehiclekeys") {
return `
<p><strong>${itemData.info.label}</strong></p>
<p><strong>Model: </strong><span>${itemData.info.model}</span></p>
<p><strong>Plate: </strong><span>${itemData.info.plate}</span></p>
<p><strong>VIN: </strong><span>${itemData.info.vin}</span></p>
<p><strong>Security key: </strong><span>${itemData.info.key}</span></p>
`;
}
Old:
else if (itemData.name == "vehiclekeys") {
$(".item-info-title").html("<p>" + itemData.info.label + "</p>");
$(".item-info-description").html(
"<p><strong>Model: </strong><span>" +
itemData.info.model +
"<p><strong>Plate: </strong><span>" +
itemData.info.plate +
"</span></p><p><strong>VIN: </strong><span>" +
itemData.info.vin +
"</span></p><p><strong>Security key: </strong><span>" +
itemData.info.key +
"</span></p>"
);
}Configure everything to your liking in Config.lua.
Add the following into your database:
Restart your inventory script and start fivecode_carkeys, or restart your server.
Enjoy the script!
[Optional] If you want to have item images in your inventory, go into the folder bellow and copy the images into your inventory:
fivecode_carkeys/Installation #9 - Images-ox_inventory\web\images-qb-inventory\html\images-qs-inventory\html\images-ps-inventory\html\images-codem-inventory\html\itemimages-core_inventory\html\img-origen_inventory\html\images-tgiann-inventory\inventory_images\images-jaksam_inventory/_images/-ak47_inventory/web/build/images/
If you need help with anything else, do not hesitate and open a support ticket in our discord.
Last updated