Multichar integration guide

This guide is only for multicharacter authors to integrate rcore_clothing with their system. If you are not a multicharacter author, you can ignore this guide.

This guide will help you integrate rcore_clothing with your multicharacter system.

Step 1 - Getting the skin

In your multicharacter system, you will need to get the skin of the character. For that you will need to call the getSkinByIdentifier function from rcore_clothing and pass the identifier of the character.

  • this event can be called either on client or server side

  • return structure is a table with ped_model and skin keys

local skin = exports["rcore_clothing"]:getSkinByIdentifier(identifier)

Step 2 - Setting the skin

After you have the skin, you will need to set it on the player. For that you will need to call the setPedSkin function from rcore_clothing and pass the ped and the skin.

exports.rcore_clothing:setPedSkin(ped, skin)

Step 3 - Opening the char creator

Character creator can be opened by calling the following events (which your multichar probably already calls)

ESX:

TriggerEvent('esx_skin:resetFirstSpawn')
TriggerEvent('esx_skin:playerRegistered')

QBCore:

TriggerEvent('qb-clothes:client:CreateFirstCharacter')

Or open directly:

TriggerEvent('rcore_clothing:openCharCreator')

Last updated