Exports
Server
registerStore
Dynamically creates a store at runtime, syncing to all clients for use straight away, when the resource that creates it is stopped the store will be deleted and unregistered from all clients.
The storeData
parameter is based upon the StoreProps.
Example
This will spawn a very basic shop with a store clerk at the coordinates listed.
local storeData = {
id = 'myNewTestStore',
type = 'buy',
name = 'My Test Store',
description = 'My Short Test Description',
icon = 'fas fa-store',
modelType = 'ped',
models = {'mp_m_shopkeep_01'},
locations = {
vector4(0,0,0,0),
},
paymentMethods = {'cash', 'bank'},
stock = {
{
name = 'bread',
price = 100,
}
},
}
exports.dirk_stores:registerStore(storeData)
Last updated