RedEM-RP / redemrp_inventory

An Inventory System for RedEM:RP
GNU General Public License v3.0
13 stars 21 forks source link

Latest Documentation

redemrp_inventory 2023.01

1. Requirements

redem-roleplay redemrp_charselect redemrp_respawn

2. Installation

3. How to use

Press [B] to open inventory

4. Usable Items

["bread"] =
    {
        label = "Bread",
        description = "?????????",
        weight = 0.1,
        canBeDropped = true,
        canBeUsed = true,
        requireLvl = 0,
        limit = 20,
        imgsrc = "items/bread.png",
        type = "item_standard",

    }

5. Developing

If you want to delete, add or check item amount you need use an example provided below (server-side)

data = {}
TriggerEvent("redemrp_inventory:getData",function(call)
        data = call
end)

Functions examples:

local ItemData = data.getItem(_source, 'bread') -- this give you info and functions
print(ItemData.ItemAmount)
ItemData.RemoveItem(2)
ItemData.AddItem(7)

local ItemInfo = data.getItemData('bread') -- return info from config

========================

local playerInventory = data.getPlayerInventory(source) --- return player items
data.removePlayerInventory(source) -- remove player inventory
TriggerEvent("redemrp_inventory:SearchPlayer", target) -- search player

6. Credits

Ktos93

youngsinatra99

Join discord to get support! - https://discord.gg/FKH4uwb