Adding chezza_inventory(ESX) crafting in Base Building

This snippet will help you setup crafting from chezza_inventory as events to use on other scripts like hrs_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 = "inventory:openCrafting",
            args = {
              "Crafting Table",
              {
                {
                    type = 'item', 
                    name = 'water', 
                    count = 1, 
                    time = 20, 
                    ingredients = {{name = 'bottle', count = 1}}
                },
                {
                    type = 'item', 
                    name = 'medkit', 
                    count = 2, 
                    time = 20, 
                    ingredients = {{name = 'bandage', count = 5},{name = 'painkiller', count = 5}}
                },      
              },
            },
            entityAsArg = "hrs_base_entity" --- in the arguments, this word will be replaced by the Entity
        },
        crafting = {
            {name = "wood",count = 20}
        }
    },

Last updated