Server

inventory:server:OpenInventory

You need to add the shop config to the inventory script

(tgiann-inventory\configs\shopConfig.lua)

Parameters :

NameTypeDescription

splayerSrc

int

Player source id

shopName*

string

shop name from "shopConfig.lua"

TriggerServerEvent("inventory:server:OpenInventory", "shop", shopName, shopName)

-- Exports can only be used on the server side
exports["tgiann-inventory"]:OpenShop(playerSrc, shopName)
exports["tgiann-inventory"]:OpenInventory(playerSrc, "shop", shopName, shopName)

Examples

TriggerServerEvent("inventory:server:OpenInventory", "shop", "weaponshop", "weaponshop")
TriggerServerEvent("inventory:server:OpenInventory", "shop", "police", "police")

Last updated