DirkScripts Logo

Login With FiveM

Login

πŸͺ Stores
β€Ί

Exports

Exports

Server

registerStore

Dynamically creates a store at runtime, syncing to all clients for use straight away, when the resource that creates it is stopped the store will be deleted and unregistered from all clients.

The storeData parameter is based upon the StoreProps.

Example

This will spawn a very basic shop with a store clerk at the coordinates listed.

{% code fullWidth="true" %}

lua
local storeData = {
    id = 'myNewTestStore', 
    type = 'buy', 
    name = 'My Test Store', 
    description = 'My Short Test Description', 
    icon        = 'fas fa-store', 
    modelType   = 'ped', 
    models      = {'mp_m_shopkeep_01'}, 
    locations   = {
        vector4(0,0,0,0),
    },
    paymentMethods = {'cash', 'bank'}, 
    stock = {
        {
          name = 'bread',  
          price = 100, 
        }
    },
}

exports.dirk_stores:registerStore(storeData)

{% endcode %}

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.