Im trying to pocket craft internally with ox_inventory but I can seem to find the right way, please help, I got this so far in the modules/items/server.lua
Item(‘fishingpole’, function(event, item, inventory, data, slot, requiredItem, requiredCount, craftedItem, craftedCount)
if event == ‘usedItem’ then
Inventory.requiredItem(inventory, ‘hook’, 1)
Inventory.requiredCount(inventory, 1)
Inventory.craftedItem(inventory, ‘fishingrod’)
Inventory.craftedCount(inventory, 1)
if Inventory.GetItem(source, ‘hook’, nil, false) > 0 then
Inventory.RemoveItem(inventory, ‘hook’, 1)
Inventory.AddItem(inventory, ‘fishingrod’, 1)
end)