Configuration
All configuration options for legacy-shops
All options are set in config.lua.
General#
| Option | Type | Default | Description |
|---|---|---|---|
Config.Version | string | '1.0.0' | Resource version (used by the automatic version checker) |
Config.CreatorCommand | string | 'shopcreator' | Command to open the shop creator panel (admin only) |
Config.InteractionDistance | number | 2.5 | Interaction distance for the shop target in game units |
Stock & Restock#
| Option | Type | Default | Description |
|---|---|---|---|
Config.RestockEnabled | boolean | true | Enable automatic restocking of limited-stock items |
Config.RestockInterval | number | 30 | Minutes between restock ticks |
Config.RestockPercent | number | 25 | Percentage of max_stock restored per restock tick |
Items with stock set to -1 (unlimited) are not affected by restocking. Only items where stock >= 0 and stock < max_stock will be restocked.
Price Fluctuation#
| Option | Type | Default | Description |
|---|---|---|---|
Config.FluctuationEnabled | boolean | true | Enable dynamic price fluctuation |
Config.FluctuationInterval | number | 60 | Minutes between price fluctuation recalculations |
Config.FluctuationRange | number | 15 | Maximum percentage deviation from the base price (+/- range) |
When enabled, each item's displayed price randomly fluctuates within the configured range. For example, with a range of 15, a $100 item could cost between $85 and $115. Fluctuations are recalculated server-side at the configured interval. The base price stored in the database is never modified.
Default Blip Settings#
These defaults are used when creating a new shop unless overridden per shop.
| Option | Type | Default | Description |
|---|---|---|---|
Config.DefaultBlipSprite | number | 52 | Default blip sprite ID |
Config.DefaultBlipColor | number | 2 | Default blip color ID |
Config.DefaultBlipScale | number | 0.7 | Default blip scale |
Ped Presets#
The Config.PedPresets table defines the ped models available in the shop creator's ped selector dropdown:
Config.PedPresets = {
{ label = 'Shop Clerk (Male)', model = 's_m_m_linecook' },
{ label = 'Shop Clerk (Female)', model = 's_f_y_shop_mid' },
{ label = 'Convenience Store', model = 'mp_m_shopkeep_01' },
{ label = 'Farmer', model = 's_m_m_farmer_01' },
{ label = 'Mechanic', model = 's_m_y_xmech_02' },
{ label = 'Bartender', model = 's_f_y_bartender_01' },
{ label = 'Fisherman', model = 's_m_m_fisherman' },
{ label = 'Doctor', model = 's_m_m_doctor_01' },
{ label = 'Ammunation', model = 's_m_y_ammucity_01' },
{ label = 'Street Vendor', model = 's_m_m_strvend_01' },
}
You can add or remove entries to customize available ped models for shop keepers.
Webhooks#
Discord webhook URLs for receiving notifications about shop events. Leave a value as an empty string ('') to disable that webhook.
Config.Webhooks = {
ShopCreated = '', -- Fires when a new shop is created
ShopEdited = '', -- Fires when a shop is edited (name, ped, blip, items, etc.)
ShopDeleted = '', -- Fires when a shop is deleted
ItemPurchased = '', -- Fires when a player purchases an item from a shop
RestockEvent = '', -- Fires when an automatic restock occurs
}
| Event | Description |
|---|---|
ShopCreated | Sent when an admin creates a new shop |
ShopEdited | Sent when an admin edits a shop's settings, categories, or items |
ShopDeleted | Sent when an admin deletes a shop |
ItemPurchased | Sent when a player purchases an item from a shop |
RestockEvent | Sent when the automatic restock system restores stock to limited-stock items |