OrigenNetwork
Docs

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.

lua
exports['origen_clothing']:getAppearance(identifier)
ParameterTypeDescription
identifierstringPlayer citizenid / identifier

checkItemPermissions(itemId, identifier)boolean

Checks whether a player has permission to wear a specific clothing item.

lua
exports['origen_clothing']:checkItemPermissions(itemId, identifier)
ParameterTypeDescription
itemIdnumberDB item ID from origen_clothing_items
identifierstringPlayer citizenid / identifier

Client-side exports

SetAppearance(ped, appearance)

Applies a full appearance data table to a ped.

lua
exports['origen_clothing']:SetAppearance(ped, appearance)
ParameterTypeDescription
pedintegerPed entity handle
appearancetableAppearance data (same format as GetAppearanceData)

GetAppearanceData(ped)table

Returns the current appearance data of a ped.

lua
local data = exports['origen_clothing']:GetAppearanceData(ped)

getAppearance()table | nil

Returns the local player's stored appearance from the DB (client-side version).

lua
local appearance = exports['origen_clothing']:getAppearance()

ReloadAppearanceData()

Forces a reload of the local player's appearance data from the server.

lua
exports['origen_clothing']:ReloadAppearanceData()

ReApplyAppearance()

Re-applies the currently loaded appearance to the local player ped without fetching from the DB.

lua
exports['origen_clothing']:ReApplyAppearance()

SetDefaultPedValues(ped)

Resets a ped to its default component and prop values.

lua
exports['origen_clothing']:SetDefaultPedValues(ped)

startPedCreation(data)

Opens the ped/character creation menu for the local player.

lua
exports['origen_clothing']:startPedCreation(data)

openCreation()

Opens the full character creation flow (ped + appearance).

lua
exports['origen_clothing']:openCreation()

openOutfitMenu()

Opens the outfit management menu for the local player.

lua
exports['origen_clothing']:openOutfitMenu()

getEquippedOutfit(onlyJob)table | nil

Returns the currently equipped outfit data.

lua
local outfit = exports['origen_clothing']:getEquippedOutfit(onlyJob)
ParameterTypeDescription
onlyJobbooleanIf true, returns only job outfit data

GetPedDrawables(ped)table

Returns the current drawable (component) variations of a ped.

lua
local drawables = exports['origen_clothing']:GetPedDrawables(ped)

SetPedDrawableByHash(ped, hash)

Applies a clothing item to a ped by its hash string.

lua
exports['origen_clothing']:SetPedDrawableByHash(ped, hash)
ParameterTypeDescription
pedintegerPed entity handle
hashstringItem hash in format collection--componentId--drawable--texture

SetPedPropByHash(ped, hash)

Applies a prop item to a ped by its hash string.

lua
exports['origen_clothing']:SetPedPropByHash(ped, hash)

RemoveClothing(ped, category)

Removes a clothing item from a ped by category, applying the Config.RemoveItem default values.

lua
exports['origen_clothing']:RemoveClothing(ped, category)
ParameterTypeDescription
pedintegerPed entity handle
categorystringCategory name — 'masks', 'jackets', 'shirts', etc.

GetRemoveHash(model, category)string

Returns the hash string used to "remove" a clothing category for a given ped model.

lua
local hash = exports['origen_clothing']:GetRemoveHash(model, category)
ParameterTypeDescription
modelnumberPed model hash
categorystringCategory name

ShowControls(controls, title)

Shows a controls overlay HUD (used during the screenshot process).

lua
exports['origen_clothing']:ShowControls({
    { key = 'E', text = 'Stop process' }
}, 'Controls')

HideControls()

Hides the controls overlay HUD.

lua
exports['origen_clothing']:HideControls()