r_store Configuration
r_store config.lua explained: framework, target system, commands and fast key, currency, delivery and purchase limits, pages, history and UI.
Basic Configuration
Open config.lua to customize R_Store settings.
Framework Settings
R.Framework = "ESX" -- Options: ESX, qbcore, qbx
R.newESX = true -- Set to false for ESX 1.1
R.CoreName = "es_extended" -- Your core resource name
R.Inventory = "ox_inventory" -- Options: ESX, qb-inventory, ox_inventory, quasarTarget System
R.UseTarget = false -- Set to true if you use target
R.Target = "ox_target" -- Options: ox_target, qb-targetDebug Mode
R.Debug = false -- Enable for troubleshootingCommands
Configure the commands players and admins can use:
R.GiveCreditCommand = "giveCredits" -- Console command to give credits
R.OpenStoreCommand = "store" -- User command to open store
R.ShowLicenseCommand = "storelicense" -- User command to copy licenseFast Key Access
Allow players to open the store with a hotkey:
R.EnableFastKey = true
R.ToggleKey = "F4" -- Key to open store
R.KeyText = "Open store" -- Key text for the commandPopular keys: F4, F5, F6. Avoid keys used by other scripts.
Currency Settings
Set which currency type is used for money purchases:
R.MoneyCurrency = "bank" -- Options: bank, cash, black_money, etc.Delivery & Purchase Limits
R.VehicleGarage = "pillboxgarage" -- garage purchased vehicles are parked in (QBCore / QBX only)
R.MaxQuantity = 999 -- most units of one product a single purchase can containVehicles are always bought one at a time. The server validates every purchase against these limits and the catalog price, so the UI can't be tricked into other quantities or prices.
Enabled Pages
Control which pages are available in the store:
R.EnabledPages = {
vehicles = true, -- Vehicle shop
money = true, -- Money shop
items = true, -- Item shop
weapons = true, -- Weapon shop
history = true, -- the player's own purchase history page
}Disable pages you don't want to offer in your store. The History page shows each player
their own purchases with product images, a type filter and a total-spent summary; it reads from
r_store_purchases, so nothing extra is needed to enable it.
Interface Colours
Every R-Scripts resource shares the same colour tokens, so you can match the UI to your server's branding without touching any code:
R.UI = {
Accent = "#9a27ea", -- icons, bars, badges and highlights
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
}Leave a value empty to keep the shipped look — the defaults above are exactly what you see out of
the box. Accent stays a signal colour (icons, progress bars, badges); Primary is the solid
button colour, so setting it to your brand colour turns every confirm button at once.
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)
}The page always loads at most Limit rows, so a player with thousands of purchases still opens it
instantly. The Total spent and Purchases boxes are counted on the server across every row,
not just the loaded ones, and a line under the list says how many of the total are shown.
r_store_purchases gets an index on (player_identifier, purchase_date) on first start, so the
query stays fast as the table grows. Keep KeepDays = 0 if you want purchase records forever.
Store UI
Set the accent color of the interface (any hex color) and how purchase-history dates are shown.
R.UI = {
Accent = "#9a27ea", -- the single accent color of the whole store
DateFormat = "D.M.YYYY HH:mm", -- purchase history dates -> 22.9.2026 18:42
}DateFormat tokens: YYYY / YY year, MM / M month, DD / D day (with / without leading
zero), HH / H 24-hour, hh / h 12-hour, mm minutes, ss seconds, A / a AM/PM. Anything
else is printed as is, so "DD/MM/YYYY HH:mm" gives 22/09/2026 18:42 and "MM/DD/YYYY hh:mm A"
gives 09/22/2026 06:42 PM.
The store's language follows your server's ox:locale convar (loaded from
locales/<lang>.json). Set it in your server.cfg, e.g. setr ox:locale en. Ships with en
and fi. Add more by dropping another locales/<lang>.json with a "ui" block.
Search scope
R.SearchAllCategories = false -- true: the search box looks through every category, not just the open oneBy default the search box filters the category that is open. Set it to true and a search shows
matching products from all four categories at once.
Store Catalog
The whole storefront is driven by one ordered list, R.Catalog, in config.lua. Each entry is
both what players see and the price the server validates against. There is no separate UI
list to keep in sync.
R.Catalog = {
-- Vehicles
{ name = "Adder", value = "adder", type = "vehicle", price = 30000, image = "media/S15lifc.png", isNew = true, isSale = true, discount = 20 },
-- Money packages (amount = cash delivered, price = credits cost)
{ name = "Cash Roll $5,000", value = "money_5000", type = "money", price = 2500, amount = 5000, image = "media/cashroll.png" },
-- Items
{ name = "Body Armor", value = "armor", type = "item", price = 500, image = "media/armor.png" },
-- Weapons
{ name = "SMG", value = "weapon_smg", type = "weapon", price = 6000, image = "media/WEAPON_SMG.png", isSale = true, discount = 15 },
}Entry fields
| Field | Required | Description |
|---|---|---|
name | Yes | Display name shown on the card |
value | Yes | Unique key: vehicle model, item name, weapon name, or money key |
type | Yes | "vehicle" | "money" | "item" | "weapon" (decides the tab) |
price | Yes | Cost in credits |
image | Yes | media/<file>.png: lives in web/build/media |
amount | Money only | Cash the player receives (the credit cost is price) |
discount | No | Percent off; the final price is recalculated server-side |
isNew | No | Shows a green NEW badge |
isSale | No | Shows a red SALE badge |
isLimited | No | Shows an amber LIMITED badge |
Prices are always re-validated server-side from R.Catalog, so the UI can never be tricked into
a cheaper purchase. To add a product, add a row here. That's the only place you edit.
Product images go in <resource>/web/build/media. Reference them as media/<file>.png.
Test Drive System
Configure the vehicle test drive feature:
R.TestDriveTime = 1 -- Duration in minutes
R.TestDriveCooldownTime = 5 -- Cooldown between tests (minutes)
R.TestDrivePos = vector4(-1274.5339, -3389.3430, 13.9401, 329.8687)Setting Test Drive Location
- Go to your desired location in-game
- Type
/getcoordsor similar command - Copy the vector4 coordinates
- Paste into
R.TestDrivePos
NPC Configuration
Customize the store NPC:
R.Ped = {
Model = "g_m_m_armboss_01", -- NPC model
Scenario = "WORLD_HUMAN_AA_CLIPBOARD", -- Animation
Location = vector4(-258.5634, -973.3538, 31.2200, 159.6876),
}Map Blip
Configure the store blip on the map:
R.EnableBlip = true
R.BlipSettings = {
Name = "Store", -- Blip name
Pos = vector3(-258.5634, -973.3538, 31.2200),
Sprite = 59, -- Blip icon
Display = 4,
Scale = 0.5, -- Blip size
Colour = 15, -- Blip color
}View all blip sprites and colors
Casino Integration
Link R_Store with R_Casino:
R.EnableCasino = true -- show a casino shortcut in the store header
R.CasinoResourceName = "r_casino" -- Your r_casino resource name
R.CasinoCommand = "casino" -- Command to open casinoOnly enable this if R_Casino is installed.
Notifications
Enable/disable purchase notifications:
R.EnablePurchaseNotifys = trueLogging
Enable Discord logging for purchases:
R.Enablelogs = trueSet your webhook in server/sv_custom.lua file.
Auto-Insert
Enable automatic database table creation:
R.EnableAutoinsert = true