Vending

Configuration schema for prop-based vending machines and price lists.

Vending Machine Definition

Configure vending machine props and inventories in shared/vending.lua:

{
    name = "Deliciously Infectious",
    model = `prop_vend_soda_01`,
    account = 'cash',
    target = {label = 'Deliciously Infectious', icon = 'fa-shop', distance = 2.0},
    items = {
        {item = "water", buyPrice = 10, sellPrice = 5, stock = 10}, -- Buy, sell, and stock enabled
        {item = "water", buyPrice = 10, sellPrice = 5},              -- Buy and sell enabled
        {item = "water", buyPrice = 10},                             -- Buy enabled
        {item = "water", sellPrice = 10},                            -- Sell enabled
    },
},

Schema Parameters

Parameter Type Description
name string Unique vending machine profile name
model hash / number Prop model hash triggering interaction
account string Currency type (cash, bank, black_money)
target table Interaction prompt text and target distance
items table List of items available for purchase or sale