You need to add the shop config to the inventory script
(tgiann-inventory\configs\shopConfig.lua)
Parameters :
Name
Type
Description
splayerSrc
int
Player source id
shopName*
string
shop name from "shopConfig.lua"
TriggerServerEvent("inventory:server:OpenInventory", "shop", shopName)-- Exports can only be used on the server sideexports["tgiann-inventory"]:OpenShop(playerSrc, shopName)exports["tgiann-inventory"]:OpenInventory(playerSrc, "shop", shopName)
TriggerServerEvent("inventory:server:OpenInventory", "otherplayer", targetSrc, nil, { showClothe =false })-- Exports can only be used on the server sideexports["tgiann-inventory"]:OpenInventoryById(playerSrc, targetSrc)exports["tgiann-inventory"]:OpenInventory(playerSrc, "otherplayer", targetSrc, nil, { showClothe =false })
Parameters :
Name
Type
Description
stashName*
string
Stash name
data
table | null
maxweight: The maximum weight capacity of the storage. If null, a default value is assigned.
slots: The maximum number of slots in the storage. If null, a default value is assigned.
whitelist: Whitelist and blacklist cannot be used simultaneously. Only items added to the whitelist can be placed in the storage. If the value is null, items are not checked
blacklist: Blacklist and whitelist cannot be used simultaneously. Items on the blacklist cannot be placed in the storage. If the value is null, items are not checked
extraData
table | null
isPlayer:when set to true, no other player can open except the first player to open
password:password is set the first time it is opened on and the password is checked every time it is opened
-- Events can only be used on the client side
TriggerServerEvent("inventory:server:OpenInventory", "stash", stashName, {
maxweight = 4000000,
slots = 50,
whitelist = {"bandage"} -- If the value is not null, only the specified items can be stored in this stash.
}, { isPlayer = false, password = "abc" })
TriggerServerEvent("inventory:server:OpenInventory", "stash", stashName, {
maxweight = 4000000,
slots = 50,
}, { isPlayer = false, password = "abc" })
riggerServerEvent("inventory:server:OpenInventory", "stash", stashName, {
maxweight = 4000000,
slots = 50,
})
-- Exports can only be used on the server side
exports["tgiann-inventory"]:OpenInventory(playerSrc, "stash", stashName, {
maxweight = 4000000,
slots = 50,
blacklist = {"bandage"} -- If the value is not null, the specified items cannot be placed in the stash.
}, { isPlayer = false, password = "abc" })
exports["tgiann-inventory"]:OpenInventory(playerSrc, "stash", stashName, {
maxweight = 4000000,
slots = 50,
})
You need to add the craft config to the inventory script
(tgiann-inventory\configs\configCraft.lua)
Parameters :
Name
Type
Description
categoryName*
string
crafting category from "configCraft.lua"
TriggerServerEvent("inventory:server:OpenInventory", "crafting", categoryName)
-- Exports can only be used on the server side
exports["tgiann-inventory"]:OpenCraft(playerSrc, categoryName)