NPC Shops
Commands, Exports & Events
Commands, Exports & Events for NPC Shops.
Exports
Client:
lua
exports.lg_shops:OpenShop('mechanic_supplier') -- open a store (job access is still checked)Server:
lua
exports.lg_shops:OpenShop(source, 'shops')
local store = exports.lg_shops:GetStore('shops')
local price = exports.lg_shops:GetItemPrice('ammunation', 'pistol_ammo', source) -- source optional
exports.lg_shops:ResetDynamicPrices('ammunation')Events
| Event | Side | Description |
|---|---|---|
lg_shops:client:openShop | client | (shopId) opens a store |
lg_shops:server:purchased | server (listen) | (source, shopId, items, paid) after a successful checkout; items = { { name, count, price } } |
Last updated