SCode StudiosSCodeDocs
Tebex Store

Configuration

Configuration of SCode Inventory + Hud

Config files

File

Contents

config/config.lua

Main settings (see below)

config/presets.lua

The roleplay, pvp, battleroyale and extraction presets

config/client.lua

Keys, hotbar position, colours

config/items.lua, config/items_*.lua

Item definitions. Change single items in items_overrides.lua

config/shops.lua

Shops (stock, restock, job and licence restrictions)

config/stashes.lua

Stashes: job, gang, house and fridge examples

config/world.lua

Fixed and placeable stashes

config/vehicles.lua, config/vehicle_classes.lua

Trunk and glovebox capacity by class and model

config/crafting.lua

Crafting benches and recipes

config/loot.lua

Loot tables, dumpsters, vending machines

config/evidence.lua

Shell casings, evidence and confiscation lockers (/elkoy)

config/clothing.lua

Clothing items

config/attachments.lua

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

preset, locale (tr, en, de, fr, es, pt-BR, ar), brand, ace, debug

Framework

framework = 'auto', integration (item registration, usable items, player functions, PlayerData.items mirror)

Size and weight

columns, rows, baseRows, baseWeight, weight

Bags and pouches

bags (rows and weight per level), pouches, starting, starterEquipment

Drops

dropLifetime, dropProtection, dropMergeRadius, drops.maxPerPlayer, drops.maxTotal

Death

death = keep / drop / partialLoss, partialLoss, combatLog

Weapons

suppressVanillaWeapons, ammo, weapons.mode = rr / qb-weapons, attachments, durability, jam, repair, tints

Money

money.sync, money.accounts (cash item ↔ framework account)

Shops and stashes

giveRadius, otherPlayer (search and rob), overflow (/tasanlar), stashes

Logs

log, logs.webhook, logs.keep, logs.discord, suspicious

Storage

rate, storage.driver = auto / mysql / kvp, prune

Identity

nameSources, inventoryOwner = character / license, migrateLicense

Decay and tools

decay, toolWear

Admin panel

admin.command (rrpanel), admin.aces, admin.groups, admin.jobs, admin.rate, admin.maxGive

Rarity

rarity.tiers, rarity.categories, rarity.items, rarity.glow

Insurance

insurance = { enabled, slots, grid, items, categories }

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.

Lua
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

roleplay (default)

keep

$500 + water, sandwich, bandage

30 s

off

Vanilla weapons allowed

pvp

drop

$2500 + pistol + ammo

5 s

off

Combat-log penalty, fast actions

battleroyale

everything drops (bag, vest, guns)

none

3 s

1 cell

extraction

everything drops

none

4 s

2 cells

Dropped bags stay for 20 minutes

custom

built-in defaults only

Select a preset with preset = 'battleroyale' in config.lua, or in server.cfg:

Code
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:

Lua
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

Lua
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

Lua
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:

Lua
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

width / height

Cells on the grid

canRotate

The player can rotate the item with R (automatic when width and height differ)

maxStack

Pieces per cell

unique

Every piece is separate (phone, ID card, key ...)

weight

Weight of one piece in grams

category

food, drink, medical, tool, electronic, vehicle, material, drug, valuable, clothing, document, key, weapons, ammo, armor, bags, money, misc

label / en

Turkish and English name. description / enDescription for the descriptions

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:

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:

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:

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

Lua
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: count transfers between the same two players within window seconds.

  • moneySpike: money received through the inventory by one player within window seconds is at least amount.

  • adminOutsidePanel: items created with /giveitem, /additem, rr_giveitem or rr_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 = true makes owned trunks need keys even when the vehicle is unlocked. Fake plate scripts should call exports.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.maxPerHour limits searches per player. requireKnown = true only allows verified bins.

  • Admin groups: admin.groups are staff permission groups (ACE group.<name>, QBCore/QBox permissions, ESX groups), not jobs. Use admin.jobs for jobs.

Last updated: December 6, 2026