Store

Stores

Fields:

FieldTypeRequiredDescription
idstring✅Unique identifier for the store.
type'buy' or 'sell'✅Determines whether the store is for buying or selling.
namestring✅Store display name (e.g. "24/7 Store").
descriptionstring✅Short UI description shown at the top of the store interface.
iconstring (FontAwesomeIcon)✅Icon shown in the UI (FontAwesome class name).
modelType'ped' | 'vehicle' | 'object'❌Type of entity used to spawn the store.
modelsstring[]✅Array of model names (e.g. "s_m_m_storeclerk_01").
locationsvector4[]✅Array of spawn locations with heading.
paymentMethodsstring[]✅IDs referencing valid payment methods.
categoriescategory[]❌List of item categories shown in the UI.
stockstockItem[]✅Inventory for the store.
openingHours[number, number]❌Time range when store is available (e.g. {6, 22} for 6AM–10PM).
groupsstring | string[] | Record<string, number>❌Job, gang, or grade restrictions.
licensesstring | string[]❌Player must have these licenses to access the store.
discordRolesstring | string[]❌Discord roles required to open the store.
canOpenfunction(src: number)❌Server-side function to determine if the player can open the store.
themethemeObject❌Optional override for this store’s visual theme.
onExchangefunction(src, items, totalPrice)❌Called on attempted transaction. Return false to cancel. Return a second param as reason.

Example

lua
BaseStores = BaseStores or {}
BaseStore.gunshop = {
    id          = "gunshop",
    type        = "buy",
    name        = "Ammu-Nation",
    description = "Everything you need to stay protected.",
    icon        = "fa-solid fa-gun",
    modelType   = "ped",
    models      = { "s_m_m_ammucountry" },
    locations   = {
        vec4(17.8, -1108.6, 29.8, 160.0)
    },
    paymentMethods = { "cash", "bank" },
    categories  = { 
        {
            
        }
    },
    stock       = {
        { item = "pistol", price = 2500 },
        { item = "pistol_ammo", price = 100 }
    },
    openingHours = { 9, 21 },
    groups       = { police = 0, sheriff = 0 },
    licenses     = { "weapon_license" },
    canOpen      = function(src)
        return true
    end,
    onExchange   = function(src, items, price)
        if price > 10000 then
            return false, "Transaction limit exceeded"
        end
        return true
    end
}
Was this page helpful?
This page was last updated on 8 July 2025
DIRKSCRIPTS
All you need for your FiveM server.10% off your first order

Unsubscribe any time.

Copyright © 2026 DirkScripts. Not affiliated with or endorsed by Rockstar North or Take-Two Interactive.