Var FiveM
ScriptsBundlesDocs
VAR
Var FiveM
ScriptsBundlesDocs
NewsTheme CustomizerAboutContact
Shop Now

-- 29 sections

  • ›paintball
  • ›chess
  • ›supermarket simulator
  • ›coins shop
    • configuration
    • identifier
    • export
    • server-event
    • languages
    • products
    • delivery
    • owner-panel
    • webhooks-discord
  • ›clothes shop
  • ›casino
  • ›drugs
  • ›clothes shop v2
  • ›interaction
  • ›emote
  • ›crew
  • ›alert job
  • ›pin code
  • ›society manager
  • ›property
  • ›barber shop
  • ›shop with basket
  • ›tattoo shop
  • ›gardener job
  • ›heist atm
  • ›heist fleeca
  • ›poster job
  • ›loading screen
  • ›bank
  • ›autocardealer
  • ›character creator
  • ›multi character
  • ›bill
  • ›tattoo shop v2

~/docs/coins-shop/configuration/delivery

coins shop docs›
  • configuration
  • configuration/identifier
  • configuration/export
  • configuration/server-event
  • configuration/languages
  • configuration/products
  • configuration/delivery
  • configuration/owner-panel
  • configuration/webhooks-discord

Coins Shop

Delivery

-- 5 code blocks · 2 min read

get var-coins-shoptry it on the test server

The delivery system is what gives the player their vehicle, weapon, skin, money or pack once a checkout is completed. It supports three layered customization mechanisms, from simplest to most flexible.

Mechanism 1 — Weapon delivery mode

In shared/config.lua:

lua
Delivery = {
  WeaponDeliveryMode = "native", -- "native" or "item"
}
Mode Behavior
"native" Uses xPlayer.addWeapon (ESX) or the QBCore native — the player gets the weapon directly.
"item" Gives the weapon as an inventory item (ox_inventory, qs-inventory, qb-inventory…). The IDs in Products.Weapons must match item names that exist in your inventory.

Mechanism 2 — Server hooks (recommended)

Hooks are the cleanest way to plug your own garage / inventory / money system without touching encrypted files. Edit server/framework/hooks.lua:

lua
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
end
inote

Return true to signal "I handled this delivery myself". Return nil (or nothing) to fall back to the default ESX/QB logic.

Mechanism 3 — Handlers config

If you prefer routing specific kinds to events or exports without writing hook code:

lua
Delivery = {
  Handlers = {
    vehicle = { Event = "myserver:giveVehicle" },          -- TriggerEvent(event, src, identifier, item)
    weapon  = { Export = "ox_inventory:AddItem" },         -- exports[res][func](src, identifier, item)
    skin    = { Type = "framework:item" },                 -- default behavior
    money   = { Event = "myserver:giveMoney" },
    pack    = { Type = "framework:pack" },                 -- recursively unpack contents
  },
  FallbackEvent = "var-shop:deliver:item", -- triggered when no handler matched
}

Available handler keys

Key Effect
Type = "framework:vehicle" Inserts into ESX owned_vehicles or QB player_vehicles
Type = "framework:weapon" Native addWeapon (mode native) or addInventoryItem (mode item)
Type = "framework:item" Native addInventoryItem of your framework
Type = "framework:money" Native addMoney of your framework
Type = "framework:pack" Unpacks contents = { { kind = "vehicle", ref = "rebla" }, … }
Event = "..." TriggerEvent(event, src, identifier, item)
Export = "resource:func" exports[resource][func](src, identifier, item)

Garage table mapping

If your server doesn't follow the standard ESX (owned_vehicles) or QB (player_vehicles) schema, remap the columns in shared/config.lua:

lua
Vehicle = {
  PlatePrefix = "VAR",          -- "" for no prefix
  ESXTable = "owned_vehicles",
  ESXOwnerColumn = "owner",
  ESXPlateColumn = "plate",
  ESXDataColumn = "vehicle",
  ESXStoredColumn = "stored",
  QBTable = "player_vehicles",
  QBOwnerColumn = "citizenid",
  QBPlateColumn = "plate",
  QBDataColumn = "mods",
  QBStateColumn = "state"
}

Item shape received by handlers

lua
-- Vehicle
{ id = "rebla", label = "Rebla GTS", kind = "vehicle", qty = 1,
  meta = { upgrades = { "perf", "plate" }, plate = "VAR12345" } }

-- Weapon
{ id = "WEAPON_AK4K", label = "AK-4K", kind = "weapon", qty = 1 }

-- Skin
{ id = "SKIN_WEAPON_NEVA", label = "Neva Glowing", kind = "skin", qty = 1,
  meta = { variant = "black", weaponFor = "WEAPON_NEVA" } }

-- Money
{ id = "money_cash", label = "Cash", kind = "money", qty = 1, amount = 5000 }

-- Pack (auto-unpacked by framework:pack)
{ id = "pack_explorer", label = "Explorer Pack", kind = "pack", qty = 1 }
previousproductsnextowner-panel
VAR
Var FiveM

Premium FiveM scripts. Low resmon, high quality. Built for ESX, QBCore & Standalone.

28scripts
1,500+sales

Scripts

  • Marketplace
  • Bundles
  • Theme Customizer

Most Popular

  • Supermarket Simulator
  • FiveM Casino Script
  • FiveM Coin Shop
  • FiveM Emote Menu
  • FiveM Paintball Script
  • FiveM Clothing Shop Script
  • FiveM Interaction Script
  • FiveM Character Creator

Resources

  • Free Scripts
  • Guides
  • News
  • Documentation
  • Support

Company

  • About
  • Contact
  • Discord

Legal

  • Terms
  • Privacy
  • Refunds

© 2026 Var FiveM. All sales final.

Payments byTebex