DirkScripts Logo

Login With FiveM

Login

πŸͺ Stores
β€Ί
Types
β€Ί

Store

Store

πŸ“„ 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
}

Copyright Β© 2026 DirkScripts.

Not affiliated with or endorsed by Rockstar North, Take-Two Interactive, or any other rights holders. FiveM is a copyright and registered trademark of Take-Two Interactive Software, Inc.
Our checkout system is provided by Tebex Limited, who manage payment processing, product delivery, and billing support. Prices shown in currencies other than GBP are approximate conversions updated daily. All purchases are processed in GBP, so the final amount charged may vary depending on your bank or payment provider’s exchange rate.