Store
This defines the structure for creating a store, either via your config or dynamically through an export. Stores support job/role restrictions, time-based spawning, custom themes, and more.
π Fields:
id
string
β
Unique identifier for the store.
type
'buy' or 'sell'
β
Determines whether the store is for buying or selling.
name
string
β
Store display name (e.g. "24/7 Store").
description
string
β
Short UI description shown at the top of the store interface.
icon
string (FontAwesomeIcon)
β
Icon shown in the UI (FontAwesome class name).
modelType
'ped' | 'vehicle' | 'object'
β
Type of entity used to spawn the store.
models
string[]
β
Array of model names (e.g. "s_m_m_storeclerk_01").
locations
vector4[]
β
Array of spawn locations with heading.
paymentMethods
string[]
β
IDs referencing valid payment methods.
categories
category[]
β
List of item categories shown in the UI.
stock
stockItem[]
β
Inventory for the store.
openingHours
[number, number]
β
Time range when store is available (e.g. {6, 22} for 6AMβ10PM).
groups
string | string[] | Record<string, number>
β
Job, gang, or grade restrictions.
licenses
string | string[]
β
Player must have these licenses to access the store.
discordRoles
string | string[]
β
Discord roles required to open the store.
canOpen
function(src: number)
β
Server-side function to determine if the player can open the store.
theme
themeObject
β
Optional override for this storeβs visual theme.
onExchange
function(src, items, totalPrice)
β
Called on attempted transaction. Return false to cancel. Return a second param as reason.
π‘ Example
Last updated