Run the generic setup#
-- config/main.lua
Config.Preset = false
Config.Permissions = 'ace'
Config.Appearance = 'auto'
Move the lockers#
Config.Lockers = {
{ dept = 'police', coords = vec3(0.0, 0.0, 0.0), size = vec3(1.8, 1.8, 2.0), rotation = 90 },
{ dept = 'ems', coords = vec3(0.0, 0.0, 0.0), size = vec3(1.8, 1.8, 2.0), rotation = 0 },
}
Replace the coordinates with your own station interiors.
Add a fire department#
Config.Depts.fire = {
jobs = { 'fire' },
label = 'Fire and Rescue',
short = 'FRS',
exeFrom = 4,
marks = {},
tabs = {
{ id = 'gd', short = 'GD', label = 'Firefighter', icon = 'shield' },
{ id = 'exe', short = 'EXE', label = 'Command', icon = 'star', exe = true },
},
extras = {
{ id = 'hivis', label = 'Hi-vis vest', slots = { 9 } },
},
outfits = {
{ tab = 'gd', name = 'Station Uniform', min = 0, desc = 'Standard station wear.' },
{ tab = 'exe', name = 'Dress Uniform', min = 4, desc = 'Formal dress for command.' },
},
}
table.insert(Config.Lockers, {
dept = 'fire', coords = vec3(0.0, 0.0, 0.0), size = vec3(1.8, 1.8, 2.0), rotation = 0,
})
The outfit list only seeds the department the first time it starts. The outfits have no clothes until staff save their look onto them.
Add a division tab with a role gate#
-- inside Config.Depts.police.tabs
{ id = 'hwp', short = 'HWY', label = 'Highway Patrol', icon = 'bike', roles = { 'Highway Patrol' } },
In ACE mode, give the permission to a group:
add_ace group.police_hwp glitch-uniforms.police.hwp allow
With glitch-admin, assign the Highway Patrol role to the uniforms.police.hwp gate in its role gate settings.
Set an outfit up#
- Dress a ped with your clothing editor.
- Open a locker. Staff with edit permission see a Set up button.
- Pick an outfit, or add one, and press Save my clothes. Hats, shoulder slides and add-on pieces are saved the same way from what the ped is wearing.
- Set the outfit's name, description, grade range and tab, and whether it shows shoulder slides.
Male and female looks are saved separately. An outfit with no look for a player's gender stays hidden from that player.
Open the locker from your own script#
-- client side, for example from an ox_target option in a station interior
exports['glitch-uniforms']:Open('police')
Add the spot to Config.OpenPoints so the range check accepts it:
Config.OpenPoints = { vec3(441.0, -981.0, 30.7) }
Use the clothing menu command#
Config.MenuCommand = 'uniformmenu'
add_ace group.admin glitch-uniforms.menu allow
Then /uniformmenu opens the locker for yourself, and /uniformmenu 12 opens it for player 12.
Stuck on a step?Ask in the Discord →