Skip to content

Bridges ​

np_clothing talks to frameworks only through its framework bridge and to inventories only through its inventory bridge. Each bridge file returns early unless its resource is started and selected (Config.Framework / Config.Inventory, or 'auto'). Files are numbered, so auto tries es_extended → qbx_core → qb-core → standalone and np_inventory → ox_inventory → qb-inventory → none. Detection runs once at start, so start the framework and the inventory before np_clothing.

Every bridge call is wrapped, so a missing export or a failing call degrades instead of erroring.

Server framework contract ​

bridge/framework/server/.

Contract Used for
getIdentifier(src) / getSourceByIdentifier(id) The character identifier everything is stored under
getName(src) Names in receipts, the designer, the authenticity check
getJob(src) / getJobInfo(name) Faction membership, grade, leader flag, duty; the grade list in the designer
setDuty(src, onDuty) / hasDuty Clock in and out at the lockers
getMoney / removeMoney / addMoney Payments without np_payments (cash / bank)
isAdmin(src) Staff fallback without np_admin (Config.AdminGroups)
onPlayerLoaded / onPlayerUnloaded / onJobChanged Applying the stored look, ending sessions, duty and faction changes

What each bridge does ​

Contract esx (es_extended) qbx (qbx_core) qb (qb-core) standalone
identifier xPlayer.identifier citizenid citizenid license:…
leader grade name boss (esx_society) isboss isboss none
duty ESX Legacy ≥ 1.10 job.onDuty SetJobDuty SetJobDuty none
money cash = ESX money, bank cash, bank cash, bank no economy (free with Config.Payment.freeWithoutEconomy)
admin groups xPlayer.getGroup() in AdminGroups.esx HasPermission in AdminGroups.qb same none
events esx:playerLoaded, esx:playerLogout, esx:playerDropped, esx:setJob QBCore:Server:PlayerLoaded, OnPlayerUnload, qbx_core:server:playerLoggedOut, OnJobUpdate, SetDuty QBCore:Server:PlayerLoaded, OnPlayerUnload, OnJobUpdate, SetDuty playerJoining

Without np_payments, uniform orders on ESX are charged to the society account through esx_addonaccount (society_<job>), see Config.Payment.factionFallback.

Inventory contract ​

bridge/inventory/server/. It exists only for the clothes as items shopping bag.

Bridge Detected by Bag item
np np_inventory Registered at start, usable through a server export
ox ox_inventory Add it to ox_inventory/data/items.lua with server = { export = 'np_clothing.clothing_bag' }
qb qb-inventory Add it to the qb-core items; registered with CreateUseableItem
none fallback No bag: purchases go to the wardrobe

Client side ​

bridge/framework/client/ reports loaded / unloaded, the job, and whether the player is dead or cuffed. Clothing screens close when the player dies, is cuffed or unloads, and the quick switch is refused then.

esx qbx qb standalone
loaded / unloaded esx:playerLoaded, esx:onPlayerLogout QBCore:Client:OnPlayerLoaded, OnPlayerUnload same once the network session is active
job esx:setJob QBCore:Client:OnJobUpdate, SetDuty, SetPlayerData same none
dead esx:onPlayerDeath / esx:onPlayerSpawn metadata.isdead / inlaststand, or a dead ped same a dead ped
cuffed state bag or IsPedCuffed metadata.ishandcuffed, state bag or IsPedCuffed same state bag or IsPedCuffed

Tables ​

All tables are prefixed clothing_, created and migrated at every start (sql/install.sql holds the same SQL). Migration 1 adds clothing_owned.fake_textures to existing installs.

Table Holds
clothing_meta Schema version, catalogue build and hash, build snapshots for the import, import status, a held scan, stored looks (storeOutfit), owed refunds, small module facts
clothing_packs One row per pack: label, source, status (ok, new, missing, moved), pieces, hidden, release time, overrides (price, label, faction only)
clothing_pieces One row per piece: id, sex, slot, pack, number, textures, last global number, shop name, label, label override, price, hidden, faction only
clothing_owned Ownership per character and piece: colourways, source, fake, fake colourways (fake_textures), serial, bought at, price
clothing_outfits Saved outfits: name, slot, hotkey, outfit, job
clothing_current The current look per character
clothing_uniforms Uniform sets: faction, name, version, rules (male / female, draft), ranks, required certifications, order price
clothing_lockers Per member and faction: the civilian look, the set worn, the member's choices
clothing_certs Certifications per member and faction
clothing_share Share codes and their outfits, with expiry
clothing_log The clothing log
clothing_timers Timers that survive restarts (pack releases, cooldowns)

All timestamps are unix seconds. np_clothing writes no framework tables; the legacy import only reads them.