Installation Guide
Follow these steps for flawless installation
Download the script from your keymaster.
Place the script into your server resource folder:
FXServer\server-data\resources\fivecode_armorWrite the script into your server.cfg:
ensure fivecode_armorSetup your inventory:
ox
Add the following into:
ox_inventory\data\items.lua
['vest_police'] = {
label = 'Police Vest',
weight = 10,
description = 'New police bulletproof vest',
stack = false,
close = true,
},
['vest_normal'] = {
label = 'Normal Vest',
weight = 10,
description = 'New normal bulletproof vest',
stack = false,
close = true,
},
['vestplate_police'] = {
label = 'Police Vest Plate',
weight = 10,
description = 'Police Bulletproof Vest Plate',
stack = true,
close = true,
},
['vestplate_normal'] = {
label = 'Normal Vest Plate',
weight = 10,
description = 'Normal Bulletproof Vest Plate',
stack = true,
close = true,
},qb
Add the following into:
qb-core\shared\items.lua
vest_police = {name = 'vest_police', label = 'Police Vest', weight = 10, type = 'item', image = 'vest_police.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'New police bulletproof vest'},
vest_normal = {name = 'vest_normal', label = 'Normal Vest', weight = 10, type = 'item', image = 'vest_normal.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'New normal bulletproof vest'},
vestplate_police = {name = 'vestplate_police', label = 'Police Vest Plate', weight = 10, type = 'item', image = 'vestplate_police.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Police Bulletproof Vest Plate'},
vestplate_normal = {name = 'vestplate_normal', label = 'Normal Vest Plate', weight = 10, type = 'item', image = 'vestplate_normal.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Normal Bulletproof Vest Plate'},Skip the step bellow if you are using qb-inventory v2.
And this to:
qb-inventory/html/js/app.js
New:
else if (itemData.name == "vestplate_police") {
return `
<p><strong>${itemData.info.label}</strong></p>
<p><strong>Strength: </strong><span>${itemData.info.strength}</span></p>
`;
}
else if (itemData.name == "vestplate_normal") {
return `
<p><strong>${itemData.info.label}</strong></p>
<p><strong>Strength: </strong><span>${itemData.info.strength}</span></p>
`;
}
else if (itemData.name == "vest_police") {
return `
<p><strong>${itemData.info.label}</strong></p>
<p><strong>Armor: </strong><span>${itemData.info.armor}/${itemData.info.maxArmor}</span></p>
`;
}
else if (itemData.name == "vest_normal") {
return `
<p><strong>${itemData.info.label}</strong></p>
<p><strong>Armor: </strong><span>${itemData.info.armor}/${itemData.info.maxArmor}</span></p>
`;
}
Old:
else if (itemData.name == "vestplate_police") {
$(".item-info-title").html("<p>" + itemData.info.label + "</p>");
$(".item-info-description").html(
"<p><strong>Strenght: </strong><span>" +
itemData.info.strenght+
"</span></p>"
);
}
else if (itemData.name == "vestplate_normal") {
$(".item-info-title").html("<p>" + itemData.info.label + "</p>");
$(".item-info-description").html(
"<p><strong>Strenght: </strong><span>" +
itemData.info.strenght+
"</span></p>"
);
}
else if (itemData.name == "vest_police") {
$(".item-info-title").html("<p>" + itemData.info.label + "</p>");
$(".item-info-description").html(
"<p><strong>Armor: </strong><span>" +
itemData.info.armor + "/" + itemData.info.maxArmor +
"</span></p>"
);
}
else if (itemData.name == "vest_normal") {
$(".item-info-title").html("<p>" + itemData.info.label + "</p>");
$(".item-info-description").html(
"<p><strong>Armor: </strong><span>" +
itemData.info.armor + "/" + itemData.info.maxArmor +
"</span></p>"
);
}qs
Add the following into:
qs-inventory\shared\items.lua
['vest_police'] = {name = 'vest_police', label = 'Police Vest', weight = 10, type = 'item', image = 'vest_police.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'New police bulletproof vest'},
['vest_normal'] = {name = 'vest_normal', label = 'Normal Vest', weight = 10, type = 'item', image = 'vest_normal.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'New normal bulletproof vest'},
['vestplate_police'] = {name = 'vestplate_police', label = 'Police Vest Plate', weight = 10, type = 'item', image = 'vestplate_police.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Police Bulletproof Vest Plate'},
['vestplate_normal'] = {name = 'vestplate_normal', label = 'Normal Vest Plate', weight = 10, type = 'item', image = 'vestplate_normal.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Normal Bulletproof Vest Plate'},And this into:
qs-inventory\config\metadata.js
else if (itemData.name == "plate") {
$(".item-info-title").html("<p>" + itemData.info.label + "</p>");
$(".item-info-description").html(
"<p><strong>Strenght: </strong><span>" +
itemData.info.strenght+
"</span></p>"
);
}
else if (itemData.name == "bulletproofvest") {
$(".item-info-title").html("<p>" + itemData.info.label + "</p>");
$(".item-info-description").html(
"<p><strong>Armor: </strong><span>" +
itemData.info.armor + "/" + itemData.info.maxArmor +
"</span></p>"
);
}ps
Add the following into:
qb-core\shared\items.lua
vest_police = {name = 'vest_police', label = 'Police Vest', weight = 10, type = 'item', image = 'vest_police.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'New police bulletproof vest'},
vest_normal = {name = 'vest_normal', label = 'Normal Vest', weight = 10, type = 'item', image = 'vest_normal.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'New normal bulletproof vest'},
vestplate_police = {name = 'vestplate_police', label = 'Police Vest Plate', weight = 10, type = 'item', image = 'vestplate_police.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Police Bulletproof Vest Plate'},
vestplate_normal = {name = 'vestplate_normal', label = 'Normal Vest Plate', weight = 10, type = 'item', image = 'vestplate_normal.png', unique = true, useable = true, shouldClose = true, combinable = nil, description = 'Normal Bulletproof Vest Plate'},And this to:
ps-inventory/html/js/app.js
New:
else if (itemData.name == "vestplate_police") {
return `
<p><strong>${itemData.info.label}</strong></p>
<p><strong>Strength: </strong><span>${itemData.info.strength}</span></p>
`;
}
else if (itemData.name == "vestplate_normal") {
return `
<p><strong>${itemData.info.label}</strong></p>
<p><strong>Strength: </strong><span>${itemData.info.strength}</span></p>
`;
}
else if (itemData.name == "vest_police") {
return `
<p><strong>${itemData.info.label}</strong></p>
<p><strong>Armor: </strong><span>${itemData.info.armor}/${itemData.info.maxArmor}</span></p>
`;
}
else if (itemData.name == "vest_normal") {
return `
<p><strong>${itemData.info.label}</strong></p>
<p><strong>Armor: </strong><span>${itemData.info.armor}/${itemData.info.maxArmor}</span></p>
`;
}
Old:
else if (itemData.name == "vestplate_police") {
$(".item-info-title").html("<p>" + itemData.info.label + "</p>");
$(".item-info-description").html(
"<p><strong>Strenght: </strong><span>" +
itemData.info.strenght+
"</span></p>"
);
}
else if (itemData.name == "vestplate_normal") {
$(".item-info-title").html("<p>" + itemData.info.label + "</p>");
$(".item-info-description").html(
"<p><strong>Strenght: </strong><span>" +
itemData.info.strenght+
"</span></p>"
);
}
else if (itemData.name == "vest_police") {
$(".item-info-title").html("<p>" + itemData.info.label + "</p>");
$(".item-info-description").html(
"<p><strong>Armor: </strong><span>" +
itemData.info.armor + "/" + itemData.info.maxArmor +
"</span></p>"
);
}
else if (itemData.name == "vest_normal") {
$(".item-info-title").html("<p>" + itemData.info.label + "</p>");
$(".item-info-description").html(
"<p><strong>Armor: </strong><span>" +
itemData.info.armor + "/" + itemData.info.maxArmor +
"</span></p>"
);
}Configure everything to your liking in config.lua.
Add the following into your database:
Restart your inventory script and start fivecode_armor, 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_armor/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
If you need help with anything else, do not hesitate and open a support ticket in our discord.
Last updated
Was this helpful?