🚚Delivery
Mechanism 1 — Weapon delivery mode
Delivery = {
WeaponDeliveryMode = "native", -- "native" or "item"
}Mode
Behavior
Mechanism 2 — Server hooks (recommended)
VarShop = VarShop or {}
VarShop.FrameworkOverrides = VarShop.FrameworkOverrides or {}
-- Vehicle delivery to your own garage table
function VarShop.FrameworkOverrides.giveVehicle(src, identifier, item)
-- item = { id = "rebla", kind = "vehicle", qty = 1, meta = { upgrades = {...}, plate = "..." } }
local plate = item.meta and item.meta.plate or ("VAR" .. math.random(10000, 99999))
MySQL.insert.await([[
INSERT INTO my_garage_table (citizenid, model, plate, garage)
VALUES (?, ?, ?, ?)
]], { identifier, item.id, plate, "pillboxgarage" })
return true -- true = handled, do not run default ESX/QB logic
end
-- Force a specific inventory for weapons
function VarShop.FrameworkOverrides.giveWeapon(src, identifier, item)
exports['ox_inventory']:AddItem(src, item.id, item.qty or 1)
return true
end
-- Items / skins
function VarShop.FrameworkOverrides.giveItem(src, identifier, item)
exports['ox_inventory']:AddItem(src, item.id, item.qty or 1, item.meta)
return true
endMechanism 3 — Handlers config
Available handler keys
Key
Effect
Garage table mapping
Item shape received by handlers
Last updated