inventory:openShop
note
clientside AND serverside
warning
Config.Shops must be set to true
Parameters
title - string - Title of the shop
items - array - See below (Items Object)
Parameters (Item Object)
type - string - item or weapon
name - string - Name of the item
method - string - money, bank or black_money
price - number or boolean - Set false to disable buying
sellPrice - number or boolean - Set false to disable selling
local items = {
{type = 'item', name = 'apple', method = 'money', price = 10, sellPrice = 3},
{type = 'item', name = 'strawberry', method = 'bank', price = false, sellPrice = 3},
{type = 'item', name = 'cherry', method = 'black_money', price = 10, sellPrice = false},
}
Clientside
TriggerEvent("inventory:openShop", title, items)
Serverside
You can use this:
TriggerClientEvent("inventory:openShop", source, title, items)
or you can use this:
xPlayer.triggerEvent("inventory:openShop", title, items)