NPC Shops

Commands, Exports & Events

Commands, Exports & Events for NPC Shops.

View in store

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

EventSideDescription
lg_shops:client:openShopclient(shopId) opens a store
lg_shops:server:purchasedserver (listen)(source, shopId, items, paid) after a successful checkout; items = { { name, count, price } }

Last updated