FivecodeDocs
DiscordTebex StoreYoutube
  • Welcome
  • Scripts
    • Fivecode Clothing
      • Installation Guide
      • Config file
      • Tutorials
    • Fivecode Armor
      • Installation Guide
      • Config file
      • Tutorials
    • Fivecode Carkeys
      • Installation Guide
      • Config file
      • Tutorials
    • Fivecode Roleplay Chat
      • Installation Guide
      • Config file
      • Tutorials
    • Fivecode Camping
      • Installation Guide
      • Config file
      • Tutorials
    • Fivecode Burger Shot Job
      • Installation Guide
      • Config file
      • Tutorials
    • Fivecode UWU Cat Cafe Job
      • Installation Guide
      • Config file
      • Tutorials
    • Fivecode Vanilla Unicorn Job
      • Installation Guide
      • Config file
      • Tutorials
  • Tutorials
    • Fivem escrow System
      • Error parsing script ... <\1>
      • Failed to verify protected resource
Powered by GitBook
On this page

Was this helpful?

  1. Scripts
  2. Fivecode Armor

Installation Guide

Follow these steps for flawless installation

PreviousFivecode ArmorNextConfig file

Last updated 9 days ago

Was this helpful?

  1. Download the script from your .

  2. Place the script into your server resource folder: FXServer\server-data\resources\fivecode_armor

  3. Write the script into your server.cfg: ensure fivecode_armor

  4. Setup your inventory:

ox

Add the following into: ox_inventory\modules\items\client.lua

Item('vest_police', function(data, slot)
    TriggerServerEvent('fivecode_armor:useVest', slot)
end)

Item('vest_normal', function(data, slot)
    TriggerServerEvent('fivecode_armor:useVest', slot)
end)

Item('vestplate_police', function(data, slot)
    TriggerServerEvent('fivecode_armor:usePlate', slot)
end)

Item('vestplate_normal', function(data, slot)
    TriggerServerEvent('fivecode_armor:usePlate', slot)
end)

and this 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>"
    );
}
codem

Add the following into: codem-inventory\config\itemlist.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'},
core

Add the following into your database:

INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`, `desc`) VALUES
    ('vest_police', 'Police Vest', 10, 0, 1, 'New police bulletproof vest'),
    ('vest_normal', 'Normal Vest', 10, 0, 1, 'New normal bulletproof vest'),
    ('vestplate_police', 'Police Vest Plate', 10, 0, 1, 'Police Bulletproof Vest Plate'),
    ('vestplate_normal', 'Normal Vest Plate', 10, 0, 1, 'Normal Bulletproof Vest Plate');
origen

Add the following into: origen_inventory\config\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'},
tgiann

Add the following into: items.lua in your framework script

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'},
  1. Add the following into your database:

ALTER TABLE `users` ADD COLUMN IF NOT EXISTS `armor` LONGTEXT DEFAULT NULL;
ALTER TABLE `players` ADD COLUMN IF NOT EXISTS `armor` LONGTEXT DEFAULT NULL;
  1. Restart your inventory script and start fivecode_armor, or restart your server.

  2. Enjoy the script!

  3. [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

Configure everything to your liking in .

If you need help with anything else, do not hesitate and open a support ticket in our .

keymaster
config.lua
discord