Skip to main content

🆕 Installation

This script requires three dependencies: qb-target, keep-menu, and polyzone.
You need to install them before using this script. You can find the links to these dependencies in the README.md file of the script .

Step 1

Download the script from GitHub and unzip it.

Step 2

Rename the folder to keep-crafting and move it to your resources folder.

Step 3

Add ensure keep-crafting to your server.cfg file. Make sure the script is loaded after all the dependencies.

Step 4

To use this script, you need to have a special item called blueprint document in your inventory. Open qb-core/shared/items.lua and add a new entry for blueprint document at the end of QBShared.Items table. You can copy and paste the code provided in here.

    -- crafting-blueprint
["blueprint_document"] = {
["name"] = "blueprint_document",
["label"] = "Blueprint",
["weight"] = 100,
["type"] = "item",
["image"] = "blueprint_document.png",
["unique"] = true,
["useable"] = false,
["shouldClose"] = false,
["combinable"] = nil,
["description"] = "A blueprint document that help you craft."
},

Step 5

Open qb-inventory/js/app.js and find the function FormatItemInfo(). At the end of this function, add some code to show the blueprint information when you hover over the item.

if (itemData.name == "blueprint_document") { // Blueprint for crafting
$(".item-info-title").html("<p>" + itemData.label + "</p>");
$(".item-info-description").html(
"<p><span>" + itemData.description + "</span></p>" +
"<p><strong>Blueprint :</strong> " + itemData.info.blueprint_label + "</p>"
);
}

To give yourself or another player a blueprint document, you need to use the command /giveblueprint name. For example,

/giveblueprint weapon_pistol will give you a blueprint document for crafting a pistol.