Item Locks & Restricted Clothing
Restrict an individual garment, or a single colour of it, to a job, a minimum grade, or one citizen. Or blacklist it so nobody wears it at all.
You do this in the shop UI. Commands exist for the same job and are documented below, but nothing here requires typing.
Looking for store-level access, ped access or the tattoo situation? Start at Access Control & Blacklists.
Moving from illenium-appearance? Do not re-type their blacklist, import it. Blacklist Import (illenium).
🖥️ The Lock Editor (the normal way)
1. Arm the editor
Open any clothing shop as an admin (/clothing, or walk into a store). At the top of the garment grid, beside COMPAT EDITOR, is a LOCK EDITOR button. It renders for admins only.
Press it. The button reads LOCK EDITOR ON, every garment tile now shows its numeric id, and a pencil appears on each tile.
2. Pick what you are restricting
| Click the pencil on… | And the lock scopes to… |
|---|---|
| A garment tile | That garment, every colour |
| A variation tile in the TEXTURE VARIATIONS panel | That one colour |
Either way you can change your mind inside the panel, the scope chips win.
3. Fill in the panel
| Section | What it does |
|---|---|
| SCOPE | ALL COLOURS / THIS COLOUR ONLY, and BOTH BODIES / MALE ONLY–FEMALE ONLY. Picking THIS COLOUR ONLY reveals WHICH COLOUR so you can point at a specific swatch. |
| Blacklist entirely | Nobody wears it. Rules are ignored while this is ticked. Use it for broken, duplicate or NSFW addon garments. |
| WHO MAY WEAR IT | + JOB adds a job row with a minimum grade box; + CITIZEN ID adds a single-player row. Add as many as you like, the bin icon removes one. |
| Hint | Optional text players see on the locked tile, e.g. LSPD issue only. Saves a lot of support questions. |
4. Save
SAVE LOCK writes it and refreshes the grid immediately. To undo, reopen the same garment and press REMOVE LOCK (or REMOVE BLACKLIST), that deletes the lock and every rule under it.
[!NOTE] The panel refuses to save a lock with no job, no citizen id and no blacklist tick, because such a lock would silently bar everyone. It tells you so rather than writing it.
What players see
- Restricted garments are greyed out with your hint, or hidden entirely,
Config.ItemLocksShowLockeddecides which. - Either way the server strips a disallowed garment on save, replacing the slot with its
Config.BareDefaultsvalue. - While your editor is armed, restricted garments stay visible to you even in hide mode.
💬 The Same Thing By Command
Useful for bulk edits, the server console, or scripting. Identical rows, identical behaviour. Full reference: Item Lock Commands.
/lockworn component 11 job:police:2 -- lock the top you are wearing
/lockworn component 11 job:police:2 male exact -- ...only this colour, male body
/lockitem component 11 84 job:ambulance -- lock by explicit ids
/lockitem prop 0 15 cid:ABC12345 -- lock to one citizen
/lockitem component 11 200 none -- blacklist
/unlockitem component 11 84 male -- remove lock + all its rules
/itemlocks -- print every lock to the console| Rule | Effect |
|---|---|
job:police | Anyone with the police job, any grade. |
job:police:2 | The police job at grade 2 or above. |
cid:ABC12345 | That one citizen. |
none | Blacklist, nobody may wear it. |
Running /lockitem again with a different rule adds a rule to the same garment; rules accumulate and OR together.
🎯 Scope Chips
A lock is matched most-specific-first, exactly like compatibility rows:
| Scope | Meaning |
|---|---|
ALL COLOURS (texture omitted) | Every colour of that drawable is locked. |
THIS COLOUR ONLY (texture given) | Only that one colour is locked. |
BOTH BODIES (gender = any) | Both bodies. |
MALE ONLY / FEMALE ONLY | Only that body. |
[!WARNING] Drawable ids do not line up between the male and female peds. A lock authored on the male body and applied to both would restrict an unrelated garment on the female one. The UI and
/lockwornboth default to the body you read the garment from, keep it that way unless you have checked both.
⚙️ Configuration
-- shared/config.lua
-- Whether admins may wear restricted garments. Off by default so what staff
-- see is what players get.
Config.ItemLocksAdminBypass = false
-- Whether a restricted garment is greyed out in the shop grid, or hidden from
-- it entirely. The server strips it on save either way; this is only what the
-- player is shown.
Config.ItemLocksShowLocked = trueThat is the whole config surface for locks, the locks themselves are data, authored in-game.
🔌 For Developers
getItemLocks: every lock and its rules.mayWearItem: whether one player may wear one garment right now.
if not exports['kartik-clothing']:mayWearItem(source, 'component', 11, 84) then
-- refuse the uniform issue
endRules are sent to the client too, but only to admins, they carry citizen ids, and broadcasting those to a shop full of players would leak them for no benefit. Ordinary players receive each lock pre-resolved to a plain allowed / not-allowed flag.
🗄️ Database
| Table | Contents |
|---|---|
kc_item_locks | One row per locked garment scope, kind, item id, drawable, texture, gender, blacklisted, optional hint text. |
kc_item_lock_rules | The rules under a lock, job + min_grade, or citizenid. Cascades on delete. |
texture = -1 and gender = 'any' are sentinels rather than NULL, so the unique key still collapses duplicates and re-locking the same garment stays a no-op.