RVT Armário

Configuration

The main config.lua options and their defaults.

All settings live in config.lua. Restart the resource after changing it. Invalid values are reported in the console at start. The license key is not here: it is in token.lua. Changing framework or storage does not migrate data: back up and plan how identities map before switching.

KeyDefaultWhat it does
Locale'pt'Language of the interface and messages: pt, en or es.
Brand.Name / Brand.Publisher'RVT Clothes' / 'RVT Scripts'Name and publisher shown in the interface.
Framework'standalone'standalone (default), creative (vRP), qbox, qb, esx or auto. With auto it detects vRP, QBox, QBCore, ESX and falls back to standalone; with more than one started, choose explicitly.
Storage'json'json (default) works with every framework and stores data in data/state.json. legacy is only for Creative with existing tables and requires oxmysql: do not use it on a new install.
Money.Mode'auto'How to charge: auto, standalone (internal wallet), framework or ox_inventory (item).
Money.Account'bank'Account charged: bank or cash (QBCore/QBox); bank or money (ESX).
Money.InitialBalance0Starting balance of the internal wallet. Standalone only.
Notifications'auto'auto, native or ox_lib.
AdminAce'rvt_clothes.admin'ACE permission required by the admin commands.
BaseSlots2Slots every player starts with.
SlotPrices{ 1000, 2500 }Price of each purchasable slot, in order. The list length is the maximum number of purchased slots.
PremiumSlots{ ['rvt_clothes.premium'] = 20 }Extra slots for players holding the listed ACE permission.
Appearance.RestoreOnSpawntrueReapplies the last outfit when joining the server.
Sharing.Timeout30Seconds the other player has to accept a shared outfit.
Market.EnabledtrueTurns the outfit marketplace on or off.
Market.Fee0.10Fraction kept from each sale (0.10 = 10%).
Market.MinPrice / MaxPrice500 / 5000000Accepted price range for listings.
Market.MaxListings6Active listings per player.
Market.AllowResalefalseAllows sharing and relisting outfits bought on the marketplace.
Market.BlockOtherGendertrueOnly allows buying presets made for the buyer's own ped model.
Capture.EnabledfalseAutomatic listing photos. Requires screenshot-basic and Capture.Url.
LoadAddonSkinsfalseEnable only after installing the extra peds and registering them in shared/skins.lua. When off, only the two native freemode models are available.
Full configuration (defaults)
config.lua
-- The license key lives in token.lua (server only, filled in by the store). Never put it here.
Config = {
    Locale = 'pt',
    Brand = { Name = 'RVT Clothes', Publisher = 'RVT Scripts' }, -- pt, en, es
    Framework = 'standalone',      -- auto, creative (vRP Creative), standalone, qbox, qb, esx
    Storage = 'json',              -- json: universal. legacy: Creative only, with existing tables
    Resources = { Creative = 'vrp', Qbox = 'qbx_core', QB = 'qb-core', ESX = 'es_extended', OxInventory = 'ox_inventory' },
    Creative = {
        Payment = 'full',          -- full: cash + bank; bank: bank only
        CashItem = 'dollar',
        TargetId = 'passport',     -- passport or source for commands and sharing
        LoadedEvent = 'CharacterChosen',
        UnloadedEvent = 'Disconnect',
        Permissions = {}
    },
    Notifications = 'auto',        -- auto, native, ox_lib
    Commands = {
        Wardrobe = 'armario', Skins = 'skinmenu',
        AcceptShare = 'aceitarroupa', DeclineShare = 'recusarroupa',
        GrantSkin = 'addskinplayer', Reset = 'resetarmario', Wallet = 'armariosaldo'
    },
    AdminAce = 'rvt_clothes.admin',
    RpcTimeout = 15000,
    RateLimit = { Count = 30, Window = 5000 },
    BaseSlots = 2,
    SlotPrices = { 1000, 2500 },
    PremiumSlots = { ['rvt_clothes.premium'] = 20 },
    Money = {
        Mode = 'auto',             -- auto uses the framework, or the internal wallet in standalone
        Account = 'bank',          -- QB/Qbox: bank or cash. ESX: bank or money.
        Item = 'money',            -- Mode = 'ox_inventory' uses this item
        InitialBalance = 0         -- internal wallet only
    },
    ClientEvents = {
        Loaded = { 'QBCore:Client:OnPlayerLoaded', 'esx:playerLoaded' },
        Unloaded = { 'QBCore:Client:OnPlayerUnload', 'qbx_core:client:playerLoggedOut', 'esx:onPlayerLogout' }
    },
    Appearance = { RestoreOnSpawn = true, RestoreDelay = 2500 },
    Sharing = { Timeout = 30 },
    Market = {
        Enabled = true, Currency = '$', MinPrice = 500, MaxPrice = 5000000,
        Fee = 0.10, MaxListings = 6, TitleMax = 40, DescriptionMax = 280,
        AllowResale = false, BlockOtherGender = true
    },
    Capture = {
        Enabled = false,
        Url = '',                  -- public upload endpoint or short-lived signed URL
        Field = 'image',
        Shots = { { heading = 0.0 }, { heading = 40.0 }, { heading = 180.0 } }
    },
    LoadAddonSkins = false,        -- enable only after installing the peds listed in shared/skins.lua
    DefaultSkins = { 'mp_m_freemode_01', 'mp_f_freemode_01' },
    Skins = {
        mp_m_freemode_01 = { name = 'male_default', model = 'mp_m_freemode_01', localized = true },
        mp_f_freemode_01 = { name = 'female_default', model = 'mp_f_freemode_01', localized = true }
    }
}

-- Permissions are always checked on the server. ACE works with every framework.
Config.FrameworkPermissions = { qb = {}, esx = {} }
Custom skins

A skin only shows up for a player if it is in Config.Skins and unlocked for them. The two native freemode models are already registered; for extra models, install the ped, enable Config.LoadAddonSkins and add the entry in shared/skins.lua. Skins in DefaultSkins come unlocked; the others are unlocked with the /addskinplayer command. The addon ped resource must be started on the server.

config.lua + shared/skins.lua
-- config.lua
Config.LoadAddonSkins = true   -- off by default: only the two native freemode models are available
Config.DefaultSkins = { 'mp_m_freemode_01', 'mp_f_freemode_01' }   -- unlocked for every new player

-- shared/skins.lua (add below the LoadAddonSkins guard at the top of the file)
Config.Skins["my_custom_ped"] = { name = "My custom ped", model = "my_custom_ped" }   -- ped resource must be started
Automatic marketplace photos

Requires the screenshot-basic resource. The URL must be a public endpoint or a short-lived signed URL that answers JSON with the final image link (HTTPS). Never put private keys here.

config.lua
Config.Capture = {
    Enabled = true,
    Url = 'https://upload.example.com/image',   -- public endpoint or short-lived signed URL
    Field = 'image',                            -- multipart field name
    Shots = { { heading = 0.0 }, { heading = 40.0 }, { heading = 180.0 } }
}
vRP configuration

Requires the vrp resource to start first. Permissions links the resource permissions to vRP groups. With TargetId = 'passport', commands use the passport instead of the server id.

config.lua
Config.Framework = 'creative'
Config.Creative = {
    Payment = 'full',          -- 'full' = cash item + bank, 'bank' = bank only
    CashItem = 'dollar',
    TargetId = 'passport',     -- 'passport' or 'source'
    LoadedEvent = 'CharacterChosen',
    UnloadedEvent = 'Disconnect',
    Permissions = {            -- ACE permission -> vRP group
        ['rvt_clothes.admin']   = { group = 'Admin', level = 3 },
        ['rvt_clothes.premium'] = { group = 'OutfitPremium' }
    }
}
Open files you can adapt
  • open/bridge/server.lua: player identification, permissions, balance, charging and crediting for each framework.
  • open/bridge/client.lua: notifications, client-side framework detection and the character load and unload events.
  • open/appearance.lua: reading and applying outfits through natives. Adapt it here if you use a different appearance system.
  • shared/skins.lua: extra skins. shared/legacy_clothes.lua: conversion of old outfit formats. shared/locale.lua and locales/*.json: languages and messages.
  • web/: interface. web/dist is the compiled version the game uses; to rebuild, run npm ci and npm run build inside web.

Standalone identifies the player by Rockstar license and cannot tell characters of the same license apart: on multi-character bases, adapt Bridge.profile in open/bridge/server.lua. Keep the return formats of the functions and keep every money, ownership and admin check on the server.