Legend
_UndeadSource = Source Player
Quantity = Quantity sended or added
PlayerDatas._Inventory = Inventory of player
false/true = Show notification or not
INVENTORY
-- Add item in inventory
exports.undead_needs:AddInventoryItem(_UndeadSource, itemname, tonumber(quantity), playerDatasInventory, true)
-- Remove item from inventory
exports.undead_needs:RemoveInventoryItem(_UndeadSource, itemdb, tonumber(quantity), PlayerDatas._Inventory, false)
-- Use Item from inventory
exports.undead_needs:UseInventoryItem(_UndeadSource, itemname, PlayerDatas._Inventory)
-- Check player have item in inventory (return int or nil)
exports.undead_needs:CheckPlayerInventory(_UndeadSource, itemdb)
Example of made item
{
"name" : "WEAPON_MELEE_KNIFE_JAWBONE",
"label" : "Knife Jawbone",
"description" : "A best knife oh yeah!",
"weight" : 1.0,
"type_item" : "weapon",
"for_item" : "",
"bonus" : 0,
"bonus2" : 0,
"bonus3" : 0,
"droped" : 1,
"rare" : "common",
"img" : "items/weapon_melee_knife_jawbone.png"
},
-- Category: drink, eat, ammo, ammo_clip, weapon, standard, health
-- Rare: common, rare, gold, legendary, mythic
-- In future updates a decay system is planned for eat
Inventory System with categories, rarity and more !