Discord Store
Custom PED System

Configuration

Everything is in config.lua. Set your framework once, then add as many vendors as you want.

Framework

config.lua
Config.Framework = 'esx'  -- 'esx' or 'qbcore'

Vendor fields

FieldTypeDescription
shopTypestringUnique ID for this vendor. Must be different for every vendor
pedModelhashPed model, in backtick hash syntax: `a_f_y_tourist_01`
pedCoordsvector4Location and heading: vector4(x, y, z, heading)
vendorNamestringOptional. Title in the shop UI. Default 'Vendor Shop'
targetLabelstringOptional. ox_target label. Default 'Talk to Vendor'
allowedIdentifierstringOne identifier/citizenid allowed to use this vendor
allowedIdentifierstableA list of identifiers for shared vendors
shopItemstableItems sold. Each needs name, label and price

One player

config.lua
Config.Vendors = {
    {
        shopType          = 'my_vendor_1',
        vendorName        = 'Maria\'s Shop',
        targetLabel       = 'Browse Shop',
        pedModel          = `a_f_y_tourist_01`,
        pedCoords         = vector4(-1047.48, -519.83, 36.04, 304.79),
        allowedIdentifier = "char1:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
        shopItems = {
            { name = 'water',    label = 'Water',    price = 30 },
            { name = 'sandwich', label = 'Sandwich', price = 50 },
        }
    },
}

Several players

config.lua
{
    shopType           = 'crew_vendor',
    pedModel           = `a_f_y_business_01`,
    pedCoords          = vector4(-1075.66, -468.73, 36.51, 118.36),
    allowedIdentifiers = {
        "char1:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
        "char1:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
    },
    shopItems = {
        { name = 'water', label = 'Water', price = 30 },
    }
},
Use allowedIdentifier or allowedIdentifiers on a vendor, not both. If both are set, the list wins.

Shop tabs

Items are sorted into tabs by their name:

TabMatched when name…
Weaponsstarts with weapon_
Ammocontains ammo or bullet
Itemseverything else

A tab only shows if the vendor has at least one item in it. Missing images fall back to a placeholder.