Adding okok_crafting crafting in Base Building

This snippet will help you setup crafting from okok_crafting to be used on hrs_base_building

In okok_crafting

okok_crafting\config.lua

Config.CraftRadius = 500000000 -- make it massive so it does not closes by distance
Config.Crafting = {
	{
		coordinates = vector3(-809.4, 190.3, 72.5), -- coordinates of the table
		radius = 1, -- radius of the table
		showMapBlip = false,
		showBlipRadius = 50,
		blip = {blipId = 89, blipColor = 3, blipScale = 0.9, blipText = 'Crafting'}, -- to get blips and colors check this: https://wiki.gtanet.work/index.php?title=Blips
		tableName = 'General', -- Title
		tableID = 'general1', -- make a different one for every table with NO spaces
		crafts = { -- What items are available for crafting and the recipe
			'model_base_wood', -- Recipe id
			'model_wall_wood'
		},
		jobs = { -- What jobs are able to open the workbench
			['all'] = true
		},
	}, ---- index = 1
	{
		coordinates = vector3(-817.0, 182.8, 72.3),
		radius = 1,
		showMapBlip = false,
		showBlipRadius = 50,
		blip = {blipId = 89, blipColor = 3, blipScale = 0.9, blipText = 'Crafting'},
		tableName = 'Medic',
		tableID = 'general2',
		crafts = {
			'firstaid',
		},
		jobs = {
			['all'] = true -- For everyone to be able to open the workbench
		},
	}, ---- index = 2
	{
		coordinates = vector3(-817.0, 182.8, 72.3),
		radius = 1,
		showMapBlip = false,
		showBlipRadius = 50,
		blip = {blipId = 89, blipColor = 3, blipScale = 0.9, blipText = 'Crafting'},
		tableName = 'Weaons',
		tableID = 'general3',
		crafts = {
			'weapon_pistol',
		},
		jobs = {
			['all'] = true -- For everyone to be able to open the workbench
		},
	}, ---- index = 3
} -- here you have to setup your different crafting tables options

--- You can basically choose random coordenates because it does not matter for the base building

In HRS_base_building

hrs_base_building\config.lua

    ["prop_tool_bench02_ld"] = {
        item = "prop_tool_bench02_ld",
        life = 10000.0,
        type = "crafting",
        subtype = "findGroud",
        noFoundationNeed = true,
        TriggerEvent = {
            type = "client",
            event = "okokCrafting:openWorkbench",
            args = {1}, --normal crafting table (index = 1)
            entityAsArg = "hrs_base_entity" --- in the arguments, this word will be replaced by the Entity
        },
        crafting = {
            {name = "wood",count = 20}
        }
    },
    ["gr_prop_gr_bench_02a"] = {
        item = "gr_prop_gr_bench_02a",
        life = 20000.0,
        type = "crafting",
        subtype = "findGroud",
        noFoundationNeed = true,
        TriggerEvent = {
            type = "client",
            event = "okokCrafting:openWorkbench",
            args = {3}, -- weapon crafting table (index = 3)
            entityAsArg = "hrs_base_entity" --- in the arguments, this word will be replaced by the Entity
        },
        crafting = {
            {name = "wood",count = 20},
            {name = "metalscrap",count = 20}
        }
    },

Last updated