Kartik Scripts

getPedComponents

Retrieves an array of clothing component drawables and textures currently equipped on a ped.

💡 Syntax

local components = exports['kartik-clothing']:getPedComponents(ped)

📥 Parameters

ParameterTypeOptionalDescription
pednumberYesTarget ped handle. Defaults to player ped.

📤 Returns

TypeDescription
table | nilList of { component_id, drawable, texture } tables.

💻 Example

local components = exports['kartik-clothing']:getPedComponents()
for _, comp in ipairs(components) do
    print(("Component %d: Drawable %d, Texture %d"):format(comp.component_id, comp.drawable, comp.texture))
end

On this page