Kartik Scripts

Overview & Architecture

When integrating kartik-clothing with a multicharacter resource, two main components need to connect:

  1. New Character Creation: Launching kartik-clothing character creator when a player creates a new character slot.
  2. Ped Preview & Selection: Fetching skin data from the database (kc_player_skins) and rendering it on the preview ped when players cycle characters on the selection UI.

🔑 Core Exports & Events

1. New Character Creation Trigger

-- Launch character creator
exports['kartik-clothing']:openCharacterCreator({ gender = 'male' })

-- Or launch with callback
exports['kartik-clothing']:startPlayerCustomization(function(appearance)
    -- Callback triggered when character creation is saved
end, { gender = 'male' })

2. Ped Preview Appearance (Client & Server)

-- Server-side: Fetch appearance data for a citizen ID
local appearanceData = exports['kartik-clothing']:getAppearance(citizenId)

-- Client-side: Apply appearance data onto a ped entity (preview ped)
exports['kartik-clothing']:setPedAppearance(pedEntity, appearanceData)

3. Drop-in Compatibility Layer

kartik-clothing features built-in compatibility wrappers matching illenium-appearance, fivem-appearance, and qb-clothing. If your multicharacter script supports illenium-appearance, you can select illenium-appearance in your multicharacter config and kartik-clothing will handle all calls natively.


📚 Resource Integration Guides

On this page