Commands#
The in-game commands are names you can change in Settings → Commands & keys — leave one empty to turn it off; a restart applies the change. The console commands exist to explain what the script is doing, and to deliver store purchases.
Command | Where | Description |
|---|---|---|
| In game, admins | Opens the admin panel: shops, catalog, moderation, players, Tebex, pool, addon weapons and settings. |
| In game | Opens the skin inventory. |
| In game | Shows off the skin on the weapon in hand, with its kill count. A key can be bound in Settings. |
| In game, painters | Invites the nearest player to the workbench of the shop you are in. |
| In game | Redeems a Tebex purchase by its transaction id. |
Studio command | In game, admins | Off by default. Give it a name in Settings to open the studio anywhere. |
| Console | The command Tebex runs on purchase. Works while the player is offline. |
| Console | Takes back what a transaction granted. The transaction stays used. |
| Console | One health line per shop: open or closed, level, owner, workbench, staff on duty and able to paint, till, supplies — and what is missing. |
| Console | How many skin slots are in use per weapon, and how they are being shared. |
| Console | Whether the shell pool is healthy, and why not. |
| Console | How many skins clients paint for themselves, and why the rest download a picture. With a hash, re-checks that one skin. |
An admin can run the console commands in game too, as long as they also hold that command's ace. The output always goes to the server console.
Client diagnostics (F8)#
These run in the game's F8 console and only affect the player who runs them.
Command | What it does |
|---|---|
| Walks the whole skin chain in the order it can break — pool, slot, state, weapon, shells, textures, cache — then asks the server for its side. |
| Paints the weapon in hand flat magenta, skipping the studio, the purchase and the download. Magenta means the game side works and the fault is upstream. |
| Removes the test. |
| Hides or shows the stock weapon under a skin, until the next settings change. |
| Turns skin textures on or off for this session — to rule them in or out of a crash. |
Client Exports#
For opening the studio or the skin inventory from your own scripts — a laptop prop, a radial menu, a gun store.
The studio and the inventory
-- Opens the studio at a shop, with the same rules as its NPC
-- (open, stocked, self service, standing there). Admins can open it anywhere.
exports['qs-weaponskin-creator']:OpenStudio(shopId)
local open = exports['qs-weaponskin-creator']:IsStudioOpen()
-- Opens the skin inventory (does nothing while another of its windows is open)
exports['qs-weaponskin-creator']:OpenSkinInventory()The skins on the player
-- Hang the skins back on after your script rebuilt the weapon or the ped
exports['qs-weaponskin-creator']:ReapplySkins()
-- What the local player wears: a list of { w = weapon, s = slot, h = picture hash }
local worn = exports['qs-weaponskin-creator']:GetOwnSkins()
-- Per weapon: the slot, the shells hung on it and the picture
local hung = exports['qs-weaponskin-creator']:GetWornSkins()Server Exports#
How another resource drives Weapon Skin Creator — a reward skin, a gun store that ships a weapon already skinned, a job that pays into a shop. source is a player's server id, and the player must have a loaded character.
GiveCatalogSkin
Copies a catalog skin into a player's inventory for free. It counts against the item's copies, works on hidden items, and does not equip the skin by itself.
local ok, result = exports['qs-weaponskin-creator']:GiveCatalogSkin(source, 3)
if ok then
exports['qs-weaponskin-creator']:EquipSkin(source, result) -- result is the new skin id
else
print('could not give it: ' .. result) -- inventory_full, sold_out, not_found…
endSkins and equipping
-- Every skin a player owns, including those waiting for review
for _, skin in ipairs(exports['qs-weaponskin-creator']:GetPlayerSkins(source)) do
print(skin.id, skin.weapon, skin.name, skin.state, skin.kills)
end
-- Put an owned skin on its weapon type, or on one gun by its serial
local ok, err = exports['qs-weaponskin-creator']:EquipSkin(source, 42, 'weapon_carbinerifle', serial)
-- err: not_owner, skin_pending, wrong_weapon, weapon_unknown
-- What a weapon — or one exact gun — is wearing right now (nil if nothing)
local skin = exports['qs-weaponskin-creator']:GetEquippedSkin(source, 'weapon_pistol', serial)
if skin then print(skin.name, skin.catalog_id) endShops and staff
local shops = exports['qs-weaponskin-creator']:GetShops()
local workers = exports['qs-weaponskin-creator']:GetShopWorkers(1) -- owner first, then by rank
local staff = exports['qs-weaponskin-creator']:IsShopWorker(source, 1) -- shop id optional: any shop
local painter = exports['qs-weaponskin-creator']:IsPainter(source) -- may paint right now
-- Hire a player; without a rank id they get the lowest rank
local ok, err = exports['qs-weaponskin-creator']:HireShopWorker(1, source)The till
local balance = exports['qs-weaponskin-creator']:GetShopBalance(1)
-- A positive amount pays in; a negative one takes out, only if the till holds it.
-- Both appear in the shop's ledger with the description you give.
local ok, newBalance = exports['qs-weaponskin-creator']:AddShopMoney(1, -500, 'Rent')State Bags and Events#
Replicated and written by the server. Read them, never write them.
Key | Holds |
|---|---|
| What the player wears: a list of |
|
|
| The addon weapons added from the admin panel. |
Event | Side | When |
|---|---|---|
| Client of the killer | A kill was counted for a skin. |
| Client | What the player wears changed. |
| Client | A store purchase was delivered. |
| Client, local | The settings were applied or changed. |
| Client, local | The framework has loaded the character. |
| Server → client | Trigger it to show the script's toast to a player. |
-- client: a kill-streak counter of your own
RegisterNetEvent('weaponskin:kill', function(weaponKey, skinId)
print(('kill with skin %s on %s'):format(skinId, weaponKey))
end)
-- server: show the script's toast to a player
TriggerClientEvent('weaponskin:notification', source, 'Your skin is ready', 'success')About the Errors#
Every callback and export that can refuse returns a key, not a sentence: inventory_full, sold_out, not_enough_money, no_permission_shop. That is deliberate — the same failure reads in each player's own language. Log the key in your own scripts, and find its text under errors in locales/<code>.json. Common Errors lists the frequent ones.



