inventory:openCrafting
note
clientside AND serverside
warning
Config.Crafting must be set to true
Parameters
title - string - Title of the crafting inventory
items - array - See below (Items Object)
Parameters (Items Object)
type - string - item or weapon
name - string - Name of the item
count - number - How many items you get after crafting
time - number - How long does it take to craft the specified item
ingredients - array - This are the items that you need to craft the specified item
Example
local items = {
{type = 'item', name = 'fishrod', count = 1, time = 5, ingredients = {
{name = 'stick', count = 1},
{name = 'hook', count = 1}
}},
-- copy and paste the table above in here for multiple items at this position
}
Clientside
TriggerEvent("inventory:openCrafting", title, items)
Serverside
You can use this:
TriggerClientEvent("inventory:openCrafting", source, title, items)
or you can use this:
xPlayer.triggerEvent("inventory:openCrafting", title, items)