Menan AK47
MENAN AK47DOCS
DiscordStore
Navigation
Menu
Welcome
FAQ
ak47_lib
ak47_target
ak47_ambulancejob
ak47_banking
ak47_business
ak47_carboosting
ak47_cardealer
ak47_clothingshop
ak47_crafting
ak47_crime
ak47_crutch
ak47_deliveryjob
ak47_drugdealerv2
ak47_drugmanagerv3
ak47_drugmissions
ak47_ecommerce
ak47_farming
ak47_fishing
ak47_fraudsystem
ak47_fuelstations
ak47_gangs
ak47_garage
ak47_garbagejob
ak47_hookahloungev2
ak47_housing
ak47_hud
ak47_iclothingv3
ak47_idcardv2
ak47_inventory
Installation
Qbox Installation
Exports
Event Handlers
Commands
Guides
Templates
Item
Weapon
Crafting
Stash
Shop
Vending
Dumpster
Tooltip
Fuel Script
ak47_jobgarage
ak47_khusbites
ak47_khusland
ak47_leafnlatte
ak47_mafiasupply
ak47_mechanic
ak47_moneywash
ak47_multicharacter
ak47_npcmed
ak47_outfitbag
ak47_playershop
ak47_policejob
ak47_prospecting
ak47_radio
ak47_rentalcar
ak47_safezone
ak47_sitchair
ak47_smokingv2
ak47_supermarket
ak47_switch
ak47_territories
ak47_vehiclekeys
ak47_vipshop
Loaf
DocsMulti FrameworkShop

Shop

Configuration schema for retail shops, stock limits, license requirements, and locations.

Shop Definition

Configure world shops and vendor inventories in shared/shops.lua:

{
    name = "Demo Shop",
    blip = {enable = false, id = 52, color = 0, scale = 0.8},
    account = 'cash', -- 'cash', 'black_money', 'bank'

    jobs = {
        police = 0,
        sheriff = 0
    },

    gangs = {
        ballas = 0,
        sheriff = 0
    },

    items = {
        -- Buy only
        {item = "bread", buyPrice = 10},

        -- Sell only
        {item = "bread", sellPrice = 20},

        -- Buy and sell
        {item = "bread", buyPrice = 10, sellPrice = 20},

        -- Buy, sell, and stock enabled
        {item = "bread", buyPrice = 10, sellPrice = 20, stock = 50},

        -- Serialized weapon purchase
        {item = "weapon_pistol", buyPrice = 0, stock = 50, hasSerial = true},

        -- Job-restricted item purchase
        {item = "weapon_stungun", buyPrice = 0, stock = 50, hasSerial = true, jobs = {police = 0, sheriff = 1}},

        -- Gang-restricted item purchase
        {item = "weapon_stungun", buyPrice = 0, stock = 50, hasSerial = true, gangs = {ballas = 0}},

        -- License requirement (esx_license)
        {item = "weapon_pistol", buyPrice = 2500, license = {name = 'weapon'}},

        -- License requirement (ak47_idcardv2)
        {item = "weapon_pistol", buyPrice = 2500, license = {name = 'weapon', label = "WEAPON LICENSE", class = 'Pistol'}},

        -- Item prerequisites (does not consume required items)
        {item = "weapon_pistol", buyPrice = 2500, requires = {water = 1, bread = 1}},
    },
    zones = {
        {
            coords = vector4(45.68, -1749.04, 29.61, 53.13),
            size = vector3(2.0, 2.0, 2.0),
        },
        {
            coords = vector4(2747.71, 3472.85, 55.67, 255.08),
            size = vector3(2.0, 2.0, 2.0),
        },
        {
            coords = vector4(-421.83, 6136.13, 31.88, 228.2),
            size = vector3(2.0, 2.0, 2.0),
        },
    },
    target = {label = "Open Shop", icon = 'fa-shop', distance = 2.0},
    peds = {
        'mp_m_waremech_01',
        'mp_m_waremech_01',
    },
    scenario = 'WORLD_HUMAN_COP_IDLES'
},

Schema Parameters

Parameter Type Description
name string Unique shop display and identifier name
blip table Map blip visualization configuration
account string Accepted currency account (cash, bank, black_money)
jobs table Job restrictions and minimum ranks
gangs table Gang restrictions and minimum ranks
items table Array of purchase and sell item specifications
zones table Coordinates and interaction bounding boxes
target table Interaction label and distance
peds table NPC ped models spawned at shop coordinates
scenario string Scenario animation played by shop peds
Previous
Stash
Next
Vending
On this page
Shop DefinitionSchema Parameters