Studios
Uniformshouse-3.jpg

Commands & Exports

SoonUniformsQbox
PAGE 06 OF 06  ·  TROUBLESHOOTING → COMMANDS & EXPORTSdocs.glitchstudios.dev
Browse docs

Commands#

Command Who What
/<Config.MenuCommand> [playerID] uniforms.menu permission, or staff level Config.EditLevel and up Opens the locker for yourself, or for another player for ten minutes with every department shown. Not registered while Config.MenuCommand is false.

Client exports#

Export signature What it does
Open(dept) Opens the locker. dept is a department id from Config.Depts, and with no argument the player's job decides. The server refuses the open for players who are not near a Config.Lockers or Config.OpenPoints spot (staff and menu-granted players are exempt), unless Config.OpenRange is false.
exports['glitch-uniforms']:Open('police')

Server exports#

None.

Events#

Event Side Purpose
glitch-uniforms:openFor Client, sent by the server Opens the locker on the target player after the menu command.
glitch-uniforms:changed Client, sent by the server Sent with a department id to players who have that locker open, so their list refreshes after a staff edit.

Both are sent by this resource. They are not meant to be triggered from other scripts.

Callbacks#

These are ox_lib callbacks used by the locker page. Other resources should not call them.

Callback Purpose
glitch-uniforms:open Returns the department payload for the player's gender. Rate limited and range checked.
glitch-uniforms:wear Checks that the outfit exists, belongs to the open locker's department and is allowed by the player's tab access and grade.
glitch-uniforms:close Marks the locker as closed for that player.
glitch-uniforms:edit Staff edits: new, details, look, clearLook, hat, clearHat, move, saveHatSet, applyHatSet, deleteHatSet, clone, delete, slide, clearSlide, slideRule, extra and clearExtra.
glitch-uniforms:keepCivvies Keeps the clothes the player walked in with.
glitch-uniforms:takeCivvies Returns the kept clothes without deleting them.
glitch-uniforms:clearCivvies Deletes the kept clothes once they are back on and saved.

Integrations#

The resource calls these when the matching resource is running.

Resource What it uses
glitch-admin GetStaffLevel, hasRoleGate and registerRoleGates exports, and the glitch-admin:roleGatesReady event.
glitch-appearance getPedAppearance, setPedComponents and setPedProps, plus ClothingRegistryMatches, getClothingIdent, resolveClothingIdent and forgetClothingIdent for clothing idents.
illenium-appearance getPedAppearance, setPedComponents and setPedProps.
Saving the look The illenium-appearance:server:saveAppearance server event and the illenium-appearance:client:reloadSkin client event, which both supported appearance resources provide.