⚔️Export and Events

EXPORTS

CLIENT EXPORTS

With this export you can search and control player inventory.(Only nearby players)

exports['bp_inventory']:searchcplayer()

SERVER EXPORTS

You can add items with this export.

exports['bp_inventory']:AddItem(source, item, amount, info, slot)

You can delete items with this export.

exports['bp_inventory']:RemoveItem(source, item, amount, slot)

With this export, you can get the information of the item with the item name.

exports['bp_inventory']:GetItemByName(source, item)

With this export, you can pull item information and quantity with item name.

exports['bp_inventory']:hasItem(source, item)

With this export you can retrieve information about the weight of the player's inventories.

exports['bp_inventory']:getWeight(source)

The total weight of the player's inventories.

exports['bp_inventory']:getMaxWeight(source)

Pulls information according to inventory type and inventory id. (playerid etc.) Types : backpack, pocket, weapon, clothing, others. (id like playerid or string)

exports['bp_inventory']:getinvinfo(type, id)

This export creates new inventory information with the incoming information. Types : backpack, pocket, weapon, clothing, others. (id like playerid or string)

exports['bp_inventory']:insertinvinfo(typed, id, data, slot, weight)

This export is used to update the existing inventory information. Types : backpack, pocket, weapon, clothing, others. (id like playerid or string)

exports['bp_inventory']:updateinvinfo(typed, id, data)

EVENTS

CLIENT EVENTS

You can close the inventory with this event.

TriggerEvent('bp_inventory:closeinventory')

You can change clothes with this event.

TriggerEvent('bp_inventory:setclothing2', iteminfo)

Stash

You can open stash with this event.

  • type : ‘stash’

  • stashid : ‘example’

  • other : { maxweight = weight , slot = slot }

  • items : the first occurrence creates items.

TriggerServerEvent('inventory:server:OpenInventory', "stash", "Motel_1534", false, {{['name'] = "weapon_pistol", ['amount'] = 1}})

Last updated