Commands#
Clothing Creator registers one command to open the studio, a few for the console, and one key binding for players:
Command | Where | Description |
|---|---|---|
| In game · admins | Opens the studio. The name is a setting (Settings → Commands → Admin command); it appears in the chat suggestions, and the console prints it at start. |
| Server console · admins | Takes the clothing declarations that are waiting for a restart live now: every player is asked to press the refresh key. Typing it counts as confirming, even with players online. |
| Server console · admins | Runs a refresh cycle for everyone without new files. Brings back in step a player who missed a prompt, without asking them to reconnect. |
| F8 in game · anyone | Prints every clothing collection mounted on your ped and how many drawables each slot holds. The first thing to run when a published item refuses to go on. |
| Key binding · players | Answers the refresh prompt of a publish. Does nothing while no prompt is on screen. Players can rebind it in the game's key bindings; the default comes from Settings → Publishing → Flush key. |
qsc-applyandqsc-flushare restricted commands: from the server console they always run, and in game they need both admin access and the ace to run commands (thecommandace your admin group usually has).
Client Exports#
For opening the studio from your own scripts — a radial menu, a laptop prop, a tailor's shop for staff — and for dressing a player in a published piece.
OpenStudio · IsStudioOpen
exports['qs-clothing-designer']:OpenStudio()
local open = exports['qs-clothing-designer']:IsStudioOpen() -- booleanOpenStudio runs the same admin check as the command: anyone else is told You do not have permission to do that.
EquipPublishedItem
Puts a published piece on the local player, the same way the studio's Wear it now does. The values come from GetPublishedItems, or from the Collection slot the studio copies after a publish (component:11 qsc_m #37).
local ok, reason, notice = exports['qs-clothing-designer']:EquipPublishedItem({
kind = 'component', -- or 'prop'
gender = 'male', -- optional: refused on the other gender
slotId = 11, -- component or prop anchor id
collection = 'qsc_m',
localIndex = 37,
texture = 0, -- variation, 0 = A
})reason | Means |
|---|---|
| The player's ped is not mp_m / mp_f_freemode_01. |
| The piece was built for the other gender. |
| A publish cycle is running. Try again in a few seconds. |
| This game does not have the collection yet — it waits for a restart, or the player has to reconnect. |
| The collection exists but holds no drawable at that number. |
| A field is missing. |
notice is 'texture_pending' when the variation asked for is not declared to the game yet (it was added to a live item and arrives at the next restart): variation A was put on instead.
Server Exports#
How another resource reads what Clothing Creator has published — a shop that sells the pieces as items, a job outfit menu, a status page.
GetPublishedItems
Every live item, both genders:
local items = exports['qs-clothing-designer']:GetPublishedItems()
for _, item in ipairs(items) do
print(item.name, item.gender, item.kind, item.slotId, item.collection, item.localIndex, item.textureCount)
end
-- each item:
-- id, designId, name, gender ('male'|'female'), kind ('component'|'prop'),
-- slotId, collection ('qsc_m'), localIndex, templateId, textureCount,
-- highHeels, state ('live'), restart ('live'|'restart'|'changes'),
-- publishedBy, createdAt, updatedAtrestart says whether the piece is wearable now (live), waits for its declaration (restart), or is wearable with a change — a new variation count, high heels — that applies at the next start (changes).
ForceRebuild
Rebuilds one collection from the database and qs-clothing-data, and runs a publish cycle when the result differs from what is live. A repair tool — normally every start already does this.
local ok, err, info = exports['qs-clothing-designer']:ForceRebuild('male', 'qsc_m')GetSelfcheckReport
The start-up health report, passed checks included:
local report = exports['qs-clothing-designer']:GetSelfcheckReport()
-- { at = <timestamp>, failed = 0, checks = { { id, ok, detail, remedy }, ... } }
for _, check in ipairs(report.checks) do
print(check.id, check.ok, check.detail, check.remedy or '')
endCheck ids: dotnet, database, data-folder, data-writable, assets-resource, meta-resource, declarations, templates, template-files, game-build, allocator, item-textures, web.
Listening for publishes
Every client is told when an item is published or retired, so a client script of yours can refresh its own lists:
RegisterNetEvent('clothing:client:itemPublished', function(item)
if item.state ~= 'live' then return end -- a failed publish is reported too
print(('New clothing: %s (%s #%d)'):format(item.name, item.collection, item.localIndex))
end)
RegisterNetEvent('clothing:client:itemRetired', function(itemId)
print('Clothing retired: ' .. itemId)
end)item has the same shape as an entry of GetPublishedItems.
About the Errors#
Everything that can refuse returns a short code rather than a sentence — wrong_gender, restart_required, all_collections_full. The text a player or admin reads is the matching errors.<code> key in locales/<language>.json, so the same failure reads correctly in every language. The common ones are explained in Common Errors.



