Configuration
Configuration of SCode Inventory + Hud
Config files
File | Contents |
|---|---|
| Main settings (see below) |
| The |
| Keys, hotbar position, colours |
| Item definitions. Change single items in |
| Shops (stock, restock, job and licence restrictions) |
| Stashes: job, gang, house and fridge examples |
| Fixed and placeable stashes |
| Trunk and glovebox capacity by class and model |
| Crafting benches and recipes |
| Loot tables, dumpsters, vending machines |
| Shell casings, evidence and confiscation lockers ( |
| Clothing items |
| Weapon attachments (suppressor, scope, magazine, skins) |
Every value is checked when the server starts. If a value is wrong, the console names the key and the inventory stays in safe mode. Saved data is never touched.
config.lua
Section | Main keys |
|---|---|
General |
|
Framework |
|
Size and weight |
|
Bags and pouches |
|
Drops |
|
Death |
|
Weapons |
|
Money |
|
Shops and stashes |
|
Logs |
|
Storage |
|
Identity |
|
Decay and tools |
|
Admin panel |
|
Rarity |
|
Insurance |
|
The default language is locale = 'tr'. Set it to 'en' for English. Item names and descriptions are written in Turkish and English; in the other languages the English item names are shown.
RR.Config = {
preset = 'roleplay',
locale = 'tr',
brand = 'RR SUPPLY', -- brand text in the interface
ace = 'rr_inventory.admin', -- ACE permission for admin commands
debug = false,
framework = 'auto', -- auto | qb | qbx | esx | ox | standalone
columns = 6, rows = 9, baseRows = 3,
baseWeight = 18000, -- grams (18 kg)
weight = true, -- false: no weight limit, only the grid limits
-- ...
}Presets
Priority: a value you write in config.lua > the preset > the built-in default. Keys that a preset fills are commented out in config.lua. Remove the -- and set a value, and the preset leaves that key alone.
Preset | Death | Starter kit | Drop protection | Insurance | Notes |
|---|---|---|---|---|---|
| keep | $500 + water, sandwich, bandage | 30 s | off | Vanilla weapons allowed |
| drop | $2500 + pistol + ammo | 5 s | off | Combat-log penalty, fast actions |
| everything drops (bag, vest, guns) | none | 3 s | 1 cell | |
| everything drops | none | 4 s | 2 cells | Dropped bags stay for 20 minutes |
| built-in defaults only |
Select a preset with preset = 'battleroyale' in config.lua, or in server.cfg:
setr rr_inventory:preset "battleroyale"Bags and pouches
Without a bag a player has 3 rows of 6 cells. Every bag level adds rows and weight:
bags = {
backpack_small = { extraRows = 2, extraWeight = 6000 }, -- Level 1: 5 rows
backpack_medium = { extraRows = 4, extraWeight = 12000 }, -- Level 2: 7 rows
backpack_large = { extraRows = 6, extraWeight = 18000 }, -- Level 3: 9 rows
},
pouches = { pouch_small = 1, pouch_medium = 2, pouch_large = 3 },Without a pouch, hotbar slots 1–3 are available. Every pouch level opens one more slot (up to 6) and all pouches give a 2x2 pouch grid.
Insurance
insurance = { enabled = true, slots = 1, grid = 'bag', items = { 'pistol' }, categories = {} }The first slots cells of the bag (or of the pouch with grid = 'pouch') are shown with a gold pattern and a shield. An item that lies completely inside the insured cells is kept on death (also on a combat log). It can cover at most maxSize cells (default 1) and at most maxStack pieces of a stack are kept (default 1); the rest drops. If items or categories are filled, only those items can be insured.
Rarity
rarity = {
enabled = true,
tiers = { common = '#9aa39a', uncommon = '#5fd068', rare = '#4f9dff', epic = '#b46cff', legendary = '#ffae34' },
categories = { weapons = 'uncommon', valuable = 'rare' },
items = {}, -- for example { goldbar = 'epic', phone = 'uncommon' }
glow = true, -- rare, epic and legendary items glow
},Order: rarity.items > the item's own rarity > rarity.categories > common.
Items
Items are defined in config/items.lua and the other items_*.lua files. To change an item, don't edit those files. Use config/items_overrides.lua instead, which is loaded after all item files:
local overrides = {
plate_steak = { width = 2, height = 1 },
burger_beef = { maxStack = 20 },
laptop = { width = 3, height = 2, weight = 2500 },
id_card = { label = 'Kimlik Kartı' },
}Field | Description |
|---|---|
| Cells on the grid |
| The player can rotate the item with |
| Pieces per cell |
| Every piece is separate (phone, ID card, key ...) |
| Weight of one piece in grams |
| food, drink, medical, tool, electronic, vehicle, material, drug, valuable, clothing, document, key, weapons, ammo, armor, bags, money, misc |
| Turkish and English name. |
Item pictures are PNG files in web/dist/catalog-icons/<item_name>.png.
Changing the size of an item doesn't break saved inventories. Items that no longer fit are moved to the player's overflow box (/tasanlar). No item is deleted.
Stashes
config/stashes.lua:
Stash('police_locker', { label = 'Polis Dolabı', en = 'Police Locker', slots = 60, weight = 150000,
coords = { x = 461.4, y = -996.0, z = 30.69 }, groups = { police = 0 }, owner = true })groups = { police = 2 }: job and minimum grade.{ police = 2, sheriff = 2 }for several jobs. Gangs count as groups.owner = true: every player has their own stash.owner = 'ABC12345': a fixed owner.serverOnly = true: only server code can open it (for housing scripts).
Shops
config/shops.lua:
RR.Shops = {
docks = {
label='Liman Karaborsası', en='Docks Black Market', enabled=true,
pos={x=1208.23,y=-3114.44,z=5.54}, radius=3, bucket=0,
currency='cash', restock=1800, tax=0, allowSell=true,
categories={
weapons=category('Silahlar','Weapons','weapons',10),
-- ...
},
products={
pistol={category='weapons',price=300,stock=20,sell=120},
-- ...
},
},
}Keep shop and item IDs the same to keep the stock counters.
Keys and hotbar
config/client.lua:
RR.Input = {
inventory = { command = 'rr_inv', key = 'F2' },
hotbarToggle = { command = 'rr_hotbar', key = 'TAB' },
interact = { command = 'rr_interact', key = 'E' },
trunk = { command = 'rr_trunk', key = 'F7' },
glovebox = { command = 'rr_glovebox', key = 'F8' },
hotbarPrefix = 'rr_slot', slots = { '1', '2', '3', '4', '5', '6' },
hotbar = true, scale = 1, right = '2vw', bottom = '3vh', opacity = 0.88,
accent = '#c9fa43',
accents = { '#c9fa43', '#4fd1c5', '#5aa9ff', '#a78bfa', '#ff6fae', '#ff8a3d', '#ffd23f', '#f2f2ec' },
defaults = { position = 'center', offset = 0, hotbarPosition = 'bottom-right', hotbarAlways = true },
fill = { low = 0.5, high = 0.8 },
}Players can change the keys in the FiveM key bindings. The gear icon next to the cash opens the player settings (inventory position, hotbar position, accent colour). These are saved on the player's PC.
Logs and suspicious activity
logs = {
webhook = '', -- Discord webhook URL (empty = off)
keep = 2000,
batchSeconds = 10, -- Discord messages are sent in batches, max 10 records per message
discord = { 'give', 'drop', 'pickup', 'buy', 'sell', 'craft', 'admin', 'death', 'rob', 'confiscate', 'suspicious' },
},
suspicious = {
enabled = true,
webhook = '', -- empty = logs.webhook
repeatTransfer = { count = 6, window = 120 },
moneySpike = { amount = 100000, window = 300 },
adminOutsidePanel = true,
},repeatTransfer:counttransfers between the same two players withinwindowseconds.moneySpike: money received through the inventory by one player withinwindowseconds is at leastamount.adminOutsidePanel: items created with/giveitem,/additem,rr_giveitemorrr_testmoney.
A hit is logged as suspicious, printed in red in the console and sent to the webhook.
Security options
Trunks and cloned plates (
config/vehicles.lua): a trunk doesn't open while another vehicle has the same plate (denyDuplicatePlates) or when an owned plate belongs to a different model (checkOwnedModel).ownedNeedsKeys = truemakes owned trunks need keys even when the vehicle is unlocked. Fake plate scripts should callexports.rr_inventory:UpdateVehiclePlate(old, new).Clothing items (
config/clothing.lua):verify = 'strict'(default) only turns a clothing piece into an item when it really came from an item or from the player's saved appearance. Use'off'if no saved appearance can be read.Dumpsters (
config/loot.lua):dumpsters.maxPerHourlimits searches per player.requireKnown = trueonly allows verified bins.Admin groups:
admin.groupsare staff permission groups (ACEgroup.<name>, QBCore/QBox permissions, ESX groups), not jobs. Useadmin.jobsfor jobs.
Last updated: December 6, 2026