Server Exports#
Get Player Skins
Returns every skin a player owns.
local skins = exports['qs-weaponskin-creator']:GetPlayerSkins(src)Parameters
Parameter | Type | Description |
|---|---|---|
| number | Player server ID |

Documentation
Exports, helper libraries and the open files — everything the resource exposes to your own scripts.
Get Player Skins
Returns every skin a player owns.
local skins = exports['qs-weaponskin-creator']:GetPlayerSkins(src)Parameters
Parameter | Type | Description |
|---|---|---|
| number | Player server ID |
tableGive Catalog Skin
Grants a player a skin from the catalog — the way a reward, a crate or an event payout would.
exports['qs-weaponskin-creator']:GiveCatalogSkin(src, catalogId)Parameters
Parameter | Type | Description |
|---|---|---|
| number | Player server ID |
| string | number | Catalog entry to grant |
Equip Skin
Puts a skin on a weapon.
exports['qs-weaponskin-creator']:EquipSkin(src, skinId, weapon, serial)Parameters
Parameter | Type | Description |
|---|---|---|
| number | Player server ID |
| string | number | The skin to equip |
| string | Optional. Which weapon |
| string | Optional. One specific gun |
Get Equipped Skin
Returns what a weapon is currently wearing.
lua
local skin = exports['qs-weaponskin-creator']:GetEquippedSkin(src, weaponKey, serial)Parameters
Parameter | Type | Description |
|---|---|---|
| number | Player server ID |
| string | The weapon |
| string | Optional |
serialis optional on purpose. Pass it to ask about one specific gun when a player owns several of the same weapon, or leave it out for whatever that weapon is wearing.
Is Painter
Returns whether a player is staff with painting rights.
local painter = exports['qs-weaponskin-creator']:IsPainter(src)Returns
booleanexports['qs-weaponskin-creator']:GetShops()
exports['qs-weaponskin-creator']:GetShopWorkers(shopId)
exports['qs-weaponskin-creator']:IsShopWorker(src, shopId)
exports['qs-weaponskin-creator']:HireShopWorker(src, shopId)
exports['qs-weaponskin-creator']:GetShopBalance(shopId)
exports['qs-weaponskin-creator']:AddShopMoney(shopId, amount)Export | What it does |
|---|---|
| Every shop |
| That shop's staff list |
| Whether a player is on it |
| Add a player to it |
| The till |
| Move money into the till |
exports['qs-weaponskin-creator']:OpenStudio(shopId)
exports['qs-weaponskin-creator']:IsStudioOpen()
exports['qs-weaponskin-creator']:OpenSkinInventory()
exports['qs-weaponskin-creator']:ReapplySkins()
exports['qs-weaponskin-creator']:GetOwnSkins()
exports['qs-weaponskin-creator']:GetWornSkins()
exports['qs-weaponskin-creator']:Scaleforms()Export | What it does |
|---|---|
| Opens the studio, optionally bound to a shop |
|
|
| Opens the skin inventory — same as |
| Rebuilds the local player's skins |
| Skins the player owns |
| Skins currently on their weapons |
| The internal scaleform helper |
shared/functions.lua and shared/utils.lua are a helper library for your own custom/ files.
They are kept complete on purpose, so nothing there disappears under a script you wrote.
ImageHostAllowed in shared/functions.lua is the host check applied everywhere a design is written — because a design carrying a link is loaded by whoever it is shared with.
config/, custom/ and locales/ are in escrow_ignore, so they stay yours across updates.
Path | What it holds |
|---|---|
| Only what must be known before the database can answer: framework, inventory, admin groups, |
| Never touched by an update — fonts, gallery designs, image host allowlist, Tebex package map |
| Hand-written add-on weapons only — the ones the admin panel builds live in |
| The framework bridge |
| Every text, including the Settings panel labels |
Everything else is configured in game — /weaponskincreator → Settings.
ESX and QBCore are auto-detected; anything else runs standalone.
Duplicate the closest folder in custom/<framework>/. The surface is small: money, identifiers and who counts as an admin.
Config.MoneyTypes in config/config.lua names the accounts a player can pay from.
The package map lives in custom/config.lua, so it survives updates.
weaponskin_tebex_grant {id} {transaction}
weaponskin_tebex_revoke <transaction>Players redeem with /weaponskin_tebex tbx-….
Worth knowing before you build on it.
The recipe travels, not the picture. The server sends the design — a couple of kilobytes — and the client bakes its own copy through the same door the studio uses. An AI-based design falls back to the picture automatically, as does any render that fails.
Buying uploads nothing. A design every viewer can bake is stored as its spec, and the purchase completes in one small event. Only AI images still upload PNGs.
Lists carry no pictures. Inventory, studio, saved designs, catalog, moderation, trade and /inspect all ship the spec, and the UI bakes its own cards from it.
Big payloads go latent. A reliable event carries ~64 KiB for the whole message and the engine declines anything larger with no error on either side — so anything that grows with use travels latently.
Every request is rate limited. Callback registration is wrapped for the whole resource, so no endpoint can be forgotten.
No weapon metadata, anywhere. Shells are plain object archetypes. A build test fails if a weapon meta ever comes back.