Store

Configuration

All configuration options for legacy-shops

All options are set in config.lua.

General#

OptionTypeDefaultDescription
Config.Versionstring'1.0.0'Resource version (used by the automatic version checker)
Config.CreatorCommandstring'shopcreator'Command to open the shop creator panel (admin only)
Config.InteractionDistancenumber2.5Interaction distance for the shop target in game units

Stock & Restock#

OptionTypeDefaultDescription
Config.RestockEnabledbooleantrueEnable automatic restocking of limited-stock items
Config.RestockIntervalnumber30Minutes between restock ticks
Config.RestockPercentnumber25Percentage 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#

OptionTypeDefaultDescription
Config.FluctuationEnabledbooleantrueEnable dynamic price fluctuation
Config.FluctuationIntervalnumber60Minutes between price fluctuation recalculations
Config.FluctuationRangenumber15Maximum 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.

OptionTypeDefaultDescription
Config.DefaultBlipSpritenumber52Default blip sprite ID
Config.DefaultBlipColornumber2Default blip color ID
Config.DefaultBlipScalenumber0.7Default 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
}
EventDescription
ShopCreatedSent when an admin creates a new shop
ShopEditedSent when an admin edits a shop's settings, categories, or items
ShopDeletedSent when an admin deletes a shop
ItemPurchasedSent when a player purchases an item from a shop
RestockEventSent when the automatic restock system restores stock to limited-stock items