Commands and permissions
Eleven Outfits reference: commands, ACE and group permissions, the exports added by the patch, the event that opens the catalog and the database tables.
Commands
| Command | Who | What it does |
|---|---|---|
/clothesphotos [category|all] [redo] | ACE in Config.Studio.permission | Photo of every garment on your server, saved in studio/. See Photo studio. |
/outfitphotos [missing|all] | ACE in Config.Studio.permission | Batch catalog photo of outfits without one (or of all). |
/outfitstudio | ACE in Config.Studio.permission | Free camera to place the framings. |
outfitcatalog_close | Anyone (F8 console) | Closes the catalog and gives the mouse back if the UI gets stuck. |
The first three are renamed in Config.Studio.commands and the last one in Config.CloseCommand. With Config.Studio.enabled = false, the studio commands do not exist.
Permissions
There are two separate permissions:
| For | Configured in | Default |
|---|---|---|
| Creating and removing outfits, retaking photos (from the catalog) | Config.Staff: an ACE in aces or a framework group in groups | ACE group.admin; groups admin and god |
| Studio commands | Config.Studio.permission (one ACE) | group.admin |
The commands are registered through ox_lib, which grants the Config.Studio.permission ACE the command.<name> permission for each of them. To give them to another group without changing the config, add to server.cfg:
# Example: the moderator group can use the studio
add_ace group.moderator command.outfitstudio allow
add_ace group.moderator command.clothesphotos allow
add_ace group.moderator command.outfitphotos allow
If you renamed them in Config.Studio.commands, use the new names in command.<name>.
To give your admins group.admin (if they do not have it yet):
add_ace group.admin group.admin allow
add_principal identifier.license:YOUR_LICENSE group.admin
Opening the catalog from another script
The illenium menu entry triggers this client event. You can trigger it yourself from another client script:
TriggerEvent('outfit-catalog:client:open')
The server still checks the same things: an MP character standing within Config.ShopRadius of an illenium-appearance clothing shop.
Exports added by the patch
outfit-catalog has no exports of its own. The patch adds three server exports to illenium-appearance, which the catalog uses and you can use too:
| Export | Returns | What it does |
|---|---|---|
exports['illenium-appearance']:GetClothingCost() | number | illenium-appearance's clothing shop price. |
exports['illenium-appearance']:IsNearShop(src, shopType, radius) | boolean | Whether the player is within radius metres (15 by default) of a store of that type (illenium's Config.Stores). |
exports['illenium-appearance']:AddPlayerOutfit(src, name, model, components, props, unique) | id or nil | Saves an outfit into the player's "My outfits". If they already own one with that name it returns its id; with unique = true it saves it as "name 2", "name 3"... |
-- Example (server)
local price = exports['illenium-appearance']:GetClothingCost()
local atShop = exports['illenium-appearance']:IsNearShop(source, 'clothing', 10.0)
Database
Tables are created automatically on start; no SQL to import.
outfit_catalog
| Column | Stores |
|---|---|
id | Outfit id. |
name | Name (up to 40 characters). |
style | Style id (from Config.Styles). |
model | mp_m_freemode_01 or mp_f_freemode_01. |
components, props | Clothes in illenium-appearance format (JSON). |
photo | Path (photos/...) or URL of the photo. NULL if none. |
active | 1 visible, 0 removed. |
created_by | citizenid of the creator. |
created_at | Creation date. |
outfit_catalog_garments
Studio log: one row per garment photographed with /clothesphotos.
| Column | Stores |
|---|---|
gender | m or f. |
kind | Category (c11, p0...). |
drawable | Garment number. |
textures | How many colours it has. |
updated_at | Last photo. |
Purchases are saved in illenium-appearance's player_outfits table, like any saved outfit.