Exports · origen_clothing
All exports are registered under the resource name origen_clothing.
Server-side exports
getAppearance(identifier) → table | nil
Returns the stored appearance data for a player by their identifier.
exports['origen_clothing']:getAppearance(identifier)| Parameter | Type | Description |
|---|---|---|
identifier | string | Player citizenid / identifier |
checkItemPermissions(itemId, identifier) → boolean
Checks whether a player has permission to wear a specific clothing item.
exports['origen_clothing']:checkItemPermissions(itemId, identifier)| Parameter | Type | Description |
|---|---|---|
itemId | number | DB item ID from origen_clothing_items |
identifier | string | Player citizenid / identifier |
Client-side exports
SetAppearance(ped, appearance)
Applies a full appearance data table to a ped.
exports['origen_clothing']:SetAppearance(ped, appearance)| Parameter | Type | Description |
|---|---|---|
ped | integer | Ped entity handle |
appearance | table | Appearance data (same format as GetAppearanceData) |
GetAppearanceData(ped) → table
Returns the current appearance data of a ped.
local data = exports['origen_clothing']:GetAppearanceData(ped)getAppearance() → table | nil
Returns the local player's stored appearance from the DB (client-side version).
local appearance = exports['origen_clothing']:getAppearance()ReloadAppearanceData()
Forces a reload of the local player's appearance data from the server.
exports['origen_clothing']:ReloadAppearanceData()ReApplyAppearance()
Re-applies the currently loaded appearance to the local player ped without fetching from the DB.
exports['origen_clothing']:ReApplyAppearance()SetDefaultPedValues(ped)
Resets a ped to its default component and prop values.
exports['origen_clothing']:SetDefaultPedValues(ped)startPedCreation(data)
Opens the ped/character creation menu for the local player.
exports['origen_clothing']:startPedCreation(data)openCreation()
Opens the full character creation flow (ped + appearance).
exports['origen_clothing']:openCreation()openOutfitMenu()
Opens the outfit management menu for the local player.
exports['origen_clothing']:openOutfitMenu()getEquippedOutfit(onlyJob) → table | nil
Returns the currently equipped outfit data.
local outfit = exports['origen_clothing']:getEquippedOutfit(onlyJob)| Parameter | Type | Description |
|---|---|---|
onlyJob | boolean | If true, returns only job outfit data |
GetPedDrawables(ped) → table
Returns the current drawable (component) variations of a ped.
local drawables = exports['origen_clothing']:GetPedDrawables(ped)SetPedDrawableByHash(ped, hash)
Applies a clothing item to a ped by its hash string.
exports['origen_clothing']:SetPedDrawableByHash(ped, hash)| Parameter | Type | Description |
|---|---|---|
ped | integer | Ped entity handle |
hash | string | Item hash in format collection--componentId--drawable--texture |
SetPedPropByHash(ped, hash)
Applies a prop item to a ped by its hash string.
exports['origen_clothing']:SetPedPropByHash(ped, hash)RemoveClothing(ped, category)
Removes a clothing item from a ped by category, applying the Config.RemoveItem default values.
exports['origen_clothing']:RemoveClothing(ped, category)| Parameter | Type | Description |
|---|---|---|
ped | integer | Ped entity handle |
category | string | Category name — 'masks', 'jackets', 'shirts', etc. |
GetRemoveHash(model, category) → string
Returns the hash string used to "remove" a clothing category for a given ped model.
local hash = exports['origen_clothing']:GetRemoveHash(model, category)| Parameter | Type | Description |
|---|---|---|
model | number | Ped model hash |
category | string | Category name |
ShowControls(controls, title)
Shows a controls overlay HUD (used during the screenshot process).
exports['origen_clothing']:ShowControls({
{ key = 'E', text = 'Stop process' }
}, 'Controls')HideControls()
Hides the controls overlay HUD.
exports['origen_clothing']:HideControls()