📄Installation Guide

Do not skim the instructions. You need to follow every step of the Install Guide to make sure you're installing the script correctly

1. Add the script to your server resources

We highly recommend putting jim-crafting in a new folder called [jim]

NOTE: IF YOU ALREADY HAVE A [jim] FOLDER PUT IT IN THAT FOLDER YOU DO NOT NEED TO CREATE A NEW ONE.

Then add ensure [jim] after your other scripts have started in your server.cfg

2. Items

Add the images from the images folder in to your

INVENTORY > HTML > IMAGES

The following code block goes into your

QB-CORE > SHARED > ITEMS.LUA

--Jim-Crafting
    ["craftrecipe"] = {["name"] = "craftrecipe",  ["label"] = "Crafting Recipe",  ["weight"] = 100, ["type"] = "item",  ["image"] = "blueprint.png",  ["unique"] = true,  ["useable"] = false,  ["shouldClose"] = false,  ["description"] = "Crafting Recipe", },
    ["paper"]       = {["name"] = "paper",        ["label"] = "Roll of Paper",    ["weight"] = 100, ["type"] = "item",  ["image"] = "paperroll.png", ["unique"] = false,  ["useable"] = false,  ["shouldClose"] = false,  ["description"] = ""},

2. EDIT YOUR INVENTORY

In lj-inventory or qb-inventory

In inventory > js > app.js directly underneath this harness snippet of code:

} else if (itemData.name == "harness") {
    $(".item-info-title").html("<p>" + itemData.label + "</p>");
    $(".item-info-description").html(
        "<p>" + itemData.info.uses + " uses left.</p>"
    );

add this:

} else if (itemData.name == "craftrecipe") {
    $(".item-info-title").html("<p>" + itemData.info.item + " Recipe</p>");
    $(".item-info-description").html(
        "<p><strong>One use only: </strong><span>" +
        itemData.info.oneUse +
        "</span></p><p><strong>Recipe ID: </strong><span>" +
        itemData.info.CraftAdd +
        "</span></p>"
    );

INVENTORY

  • This isn't for every inventory if you're not using qb-inventory or lj-inventory you'll have to find the equivalent.

Explanation of preset locations

{ 	name = "Lumberjack Crafting", -- Name that appears on the target
			requiredResource = "jim-lumberjack", -- required resource, to stop it causing errors trying to load uninstalled scripts
			coords = {
				vector4(-468.93, 5352.4, 80.72, 62.41), -- table of vector4 locations of the crafting benches
			},
			blip = { -- Blip info, set to nil or delete if you dont want a blip
    				sprite = 521,
    				col = 0,
    				scale = 0.7,
    				disp = 6,
  			}, 
			prop = `gr_prop_gr_speeddrill_01b`, -- the prop to be used for the target
			craftingTable = {
				["Other"] = { -- Category
					["Tools"] = { -- Sub-Category
						{ ["walkstick"] = { ["wood"] = 2 }, amount = 1 },
					},
				["Hardware"] = { -- Category
					["Cardboard"] = { -- Sub-Category
						{ ["cardhat"] = { -- Item to be crafted
						["paper"] = 20, -- Ingredients
						}, 
						amount = 1 }, -- Amount to be given when crafted
						job = { ["jobname"] = grade, ["jobname"] = grade, }, -- Table of jobs and their lowest grades that can see this specific recipe
						anim = { "animDict", "animName" }
						-- or Scenario Support
						anim = { "Scenario" },
						time = math.random(4000,6000),
					},
				},
			},
		},

YOU'RE DONE!

Last updated