Skip to content
Documentation
Server Essentials4In-Game Store

r_store Configuration

r_store config: framework, inventory, commands, delivery, pages, the catalog, bundles, custom products, the daily reward, test drives, NPC, blip and casino button.

All settings live in config.lua. Restart the resource after changing it.

General

R.Framework = "qbx"           -- Options: ESX, qbcore, qbx
R.newESX = true               -- if you use ESX 1.1 set this to false
R.CoreName = "es_extended"    -- rename if your es_extended is renamed
R.Inventory = "ox_inventory"  -- Options: ESX, qb-inventory, ox_inventory, quasar

R.UseTarget = false           -- true to enable targeting npc
R.Target = "ox_target"        -- Options: ox_target, qb-target, none, custom
R.TextUI = 'gta' -- 'gta' | 'ox_lib' | 'okok' | 'qb' | 'jg' | 'cd' | 'esx' | 'custom'

R.Debug = false               -- print debug output to the server console
R.EnableAutoinsert = true     -- auto-create SQL tables on first start
R.Enablelogs = true           -- Discord webhook logging (set webhook in sv_custom.lua)
R.EnablePurchaseNotifys = true   -- notify when someone buys something

The webhook goes in server/sv_custom.lua. The language comes from setr ox:locale in server.cfg. Add your own by copying a file in locales/.

Commands & Key

R.GiveCreditCommand = "giveCredits"   -- server console: /giveCredits [id] [amount]
R.OpenStoreCommand = "store"          -- user:  open the store
R.ShowLicenseCommand = "storelicense" -- user:  copy store license to clipboard

R.EnableFastKey = true
R.ToggleKey = "F4"
R.KeyText = "Open store"

giveCredits only works from the server console.

Prompt style and custom target

R.TextUI sets how the "press E" prompts look: gta (default, GTA help text), ox_lib, okok, qb, jg, cd, esx or custom. For custom, edit BridgeTextUI in bridge/cl_textui.lua.

R.Target = 'none' uses the built-in key prompt, no target script needed. R.Target = 'custom' is for any other target script: fill in BridgeCustomTarget in bridge/cl_target.lua with AddBoxZone, AddModels, AddEntity and Remove. Each option has name, label, icon, distance, canInteract and onSelect.

The bridge/ folder is open, so you can edit it freely.

Delivery

R.TebexUrl = ""                -- your Tebex store, e.g. "https://yourserver.tebex.io". Adds Get credits buttons to the store, "" hides them

R.MoneyCurrency = "bank"      -- account money packages are paid into
R.VehicleGarage = "pillboxgarage" -- garage purchased vehicles are parked in (QBCore / QBX only)
R.MaxQuantity = 999           -- most units of one product a single purchase can contain (vehicles are always 1)
R.SearchAllCategories = false -- true: the search box looks through every category, not just the open one

With R.TebexUrl set, a + button next to the balance opens your Tebex store. When a player can't afford a product, the Buy button turns into Get credits.

Buy Credits With In-Game Money

Off by default. Turn it on and the + button next to the balance opens a dialog where players type how many credits they want and pay with in-game money. With SellEnabled they can also cash credits out.

R.BuyCredits = {
    Enabled = false,          -- players buy credits with in-game money from the Get credits button
    Account = "bank",         -- "bank" or "cash": where the money is taken from and paid to
    BuyPrice = 100,           -- in-game money a player pays for 1 credit
    SellEnabled = false,      -- true lets players cash credits out for in-game money
    SellPrice = 90,           -- in-game money paid for 1 credit cashed out
    Min = 1,                  -- fewest credits in one transaction
    Max = 100000,             -- most credits in one transaction
    DailyLimit = 0,           -- most credits one player can buy, and cash out, per day (0 = no limit, resets on restart)
}
  • Set BuyPrice and SellPrice to the same number for a 1:1 exchange.
  • SellPrice above BuyPrice would give free money, so cash-outs stay off until you fix it.
  • If R.TebexUrl is set too, the dialog also has a Buy on Tebex button.
  • Every exchange is posted to your Discord log.

With this on, everything in your catalog can be bought with in-game money, including money packages and vehicles. With SellEnabled, credits from the daily reward and from Tebex can be cashed out too. Price your catalog and rates with that in mind. The server console warns you about money packages that pay out more than their credits cost.

Pages

R.EnabledPages = {
    vehicles = true,
    money = true,
    items = true,
    weapons = true,
    bundles = true,           -- the Bundles tab (hidden while the catalog has no bundles)
    history = true,           -- the player's own purchase history page
}

Purchase History

R.History = {
    Limit = 100,              -- how many of the player's latest purchases the History page loads (1-500)
    KeepDays = 0,             -- delete purchase rows older than this on start (0 = keep forever)
}

Catalog

Everything in the store is one list. Add a product by adding a line. The server checks every purchase against this list, so prices can't be changed from the game.

R.Catalog = {
    { name = "Adder",        value = "adder",     type = "vehicle", price = 30000, image = "media/S15lifc.png", isNew = true,  isSale = true, discount = 20 },
    { name = "Cash $5,000",  value = "money_5000", type = "money", price = 2500,  amount = 5000,   image = "media/cashroll.png" },
    { name = "Body Armor",   value = "armour",     type = "item", price = 500, image = "media/armor.png" },
    { name = "SMG",          value = "weapon_smg", type = "weapon", price = 6000, image = "media/WEAPON_SMG.png", isSale = true, discount = 15 },
}
FieldWhat it does
nameName on the card.
valueVehicle model, item name, weapon name or a unique money key.
type"vehicle", "money", "item", "weapon", "bundle" or "custom".
priceCost in credits.
imageA file in web/build/media/, written as media/<file>.png.
amountMoney only: how much cash the player gets.
discountOptional percent off.
isNew / isSale / isLimitedOptional badges.

An item's value must be the exact item name in your inventory. In ox_inventory body armor is armour, not armor.

Bundles

A bundle sells several catalog products for one price. Bundles get their own Bundles tab.

{ name = "Starter Pack", value = "bundle_starter", type = "bundle", price = 5000, limit = 1, isNew = true, items = {
    { value = "weapon_pistol_mk2" },
    { value = "ammo-9", amount = 100 },
    { value = "armour", amount = 2 },
    { value = "money_15000" },
} },
FieldWhat it does
itemsWhat the bundle gives. Each value is a vehicle, item, weapon or money product from the catalog. amount is optional.
limitOptional. How many times one player can buy the bundle. limit = 1 makes it a one-time pack.
imageOptional. Without it the card shows the products inside.

The card shows what the products would cost one by one, struck through, next to the bundle price. The server console tells you on start if a bundle points at a product that isn't in the catalog.

Custom Products

A custom product can give anything: VIP, a job, a character slot. You write what it does in server/sv_custom.lua.

{ name = "VIP 30 Days", value = "vip_30", type = "custom", handler = "vip", price = 10000, image = "media/vip.png", limit = 1 },
StoreHandlers = {
    vip = {
        check = function(source, product, input)
            return true
        end,
        give = function(source, product, input)
            ExecuteCommand(("addvip %s 30"):format(source))
            return true
        end,
    },
}
FieldWhat it does
handlerName of the entry in StoreHandlers.
categoryTab it shows in: "vehicles", "money", "items" or "weapons". Default "items".
inputOptional text the player types before buying: { label = "Phone number", placeholder = "555-0100", maxLength = 8 }. It arrives as input.
limitOptional. How many times one player can buy it.
  • check is optional and runs before the player pays. Return false, "message" to stop the purchase and show the message.
  • give runs after the player has paid. Return false and the credits are refunded.

Daily Reward

A gift button in the store header opens a reward streak. Players claim one reward a day, and missing a day starts the streak over.

R.Daily = {
    Enabled = true,           -- daily reward streak, opened from the gift button in the store header
    Rewards = {               -- one entry per day, missing a day starts over. { credits = 100 } or a catalog product { value = "armour", amount = 1 }
        { credits = 50 },
        { credits = 75 },
        { credits = 100 },
        { value = "armour", amount = 1 },
        { credits = 150 },
        { credits = 200 },
        { credits = 500 },
    },
}

Add or remove lines to make the streak longer or shorter. After the last day it starts again from day 1. The day changes at midnight, server time.

Test Drives

R.TestDriveTime = 1           -- minutes you can drive for
R.TestDriveCooldownTime = 5   -- minutes before another test drive
R.TestDrivePos = vector4(-1274.5339, -3389.3430, 13.9401, 329.8687)

NPC & Blip

R.EnablePed = true            -- false to disable the npc
R.Ped = {
    Model = "g_m_m_armboss_01",
    Scenario = "WORLD_HUMAN_AA_CLIPBOARD",
    Location = vector4(-258.5634, -973.3538, 31.2200, 159.6876),
}

R.EnableBlip = true
R.BlipSettings = {
    Name = "Store",
    Pos = vector3(-258.5634, -973.3538, 31.2200),
    Sprite = 59,
    Display = 4,
    Scale = 0.5,
    Colour = 15,
}

Blip sprites and colours: FiveM docs.

R_Casino Button

R.EnableCasino = true        -- show a casino shortcut in the store header
R.CasinoResourceName = "r_casino"
R.CasinoCommand = "casino"

Set R.EnableCasino = false if you don't run R_Casino.

Interface

R.UI = {
    Accent = "#9a27ea",
    Primary = "#ffffff",      -- main action buttons (buy / play / confirm)
    PrimaryText = "#000000",  -- text on those buttons
    NavActive = "",           -- selected tab background, "" keeps the neutral default
    NavActiveText = "#ffffff",-- selected tab text
    DateFormat = "D.M.YYYY HH:mm", -- purchase history dates: 22.9.2026 18:42
}

DateFormat examples: "DD/MM/YYYY HH:mm" gives 22/09/2026 18:42, "MM/DD/YYYY hh:mm A" gives 09/22/2026 06:42 PM.