Multicharacter - Character Selection
Step by step installation guide, common issues & solutions, code snippets, error codes, config previews, locales previews, SQL previews, and changelogs; all in 1 easily accessible place.
Buy Here
This resource can be purchased as part of a bundle for a discount here.

1. Unzip the cd_multicharacter.zip and place this folder in your servers resource folder.
2. Add the resource to your server start config: ensure cd_multicharacter (it must be placed anywhere below your framework resource eg., es_extended, not above). The name of the folder must not be changed or the resource will not function correctly.
3. WARNING do not edit the obfuscated files in any way.

You MUST import the SQL file to your database. This SQL file is located inside theREAD_ME_AFTER_PURCHASING folder, the file is named SQL_main.sql. Watch this video if you are unsure how to do this HeidiSQL / PHPMyAdmin.

You may need to make some changes to the fxmanifest.lua, depending on your framework and dependencies. We have made this easier for you by commenting on the lines which you may need to change.

You MUST read all of the configurable options inside the config.lua and configure them to suit your server's needs. Please read the ”commented out help text” at the end of each line so you can understand what each config option does.
The most important sections are the options under the Framework and Important sections at the top of the config.lua. Everything else is optional.

Open the dependencies folder. The sub-folders inside will be the required dependencies. There will be a text file inside each sub-folder which includes a GitHub link. Download the dependencies from our GitHub using the links provided. Then add it to your resources folder.

We need to do a small modification to stop your framework registering our character instantly when we load into the server.
ESX version 1.1
ESX version 1.2
ESX version 1.final
Extendedmode
ESX Legacy 1.3.x
ESX Legacy 1.6.x
essentialmode/client/main.lua/line 5 - comment out this code.
If your fxmanifest.lua says you are using version 1.2, you need to confirm your version.
If you think you are using esx 1.2 please double-check and compare the code from these snippets, as in both esx 1.2 and esx 1.final say version 1.2 in the fxmanifest.lua. But in fact, the 2 versions are different and will cause major problems during installation if the wrong version is chosen in the config.lua of the multicharacter.
es_extended/client/main.lua/line 36 - comment out this code.
If your fxmanifest.lua says you are using version 1.2, you need to confirm your version.
If you think you are using esx 1.2 please double-check and compare the code from these snippets, as in both esx 1.2 and esx 1.final both say version 1.2 in the fxmanifest.lua. But in fact, the 2 versions are different and will cause major problems during installation if the wrong version is chosen in the config of the multicharacter.
es_extended/client/main.lua/line 3 - comment out this code.
extendedmode/client/main.lua/line 3 - comment out this code.
Make sure the Config.Multichar in es_extended’s config.lua is set to false.
es_extended/client/main.lua/line 3 - comment out this code.
Make sure the Config.Multichar in es_extended’s config.lua is set to false.
es_extended/client/main.lua/line 3 - comment out this code.

We will be setting the skin of your chosen character directly from the cd_multicharacter or cd_identity, so we don't need your skin creator script to do this also.
esx_skin
cui_character
betrayed_clothing
Part 1: Find the block of code that looks similar to the examples below in the client-side main.lua and comment out the code.
There are many different versions and not all will look the exact same.
View the examples below:
Example 1
Example 2
Part 1: Find the block of code below in the client-side main.lua and hash out/delete it This event can normally be found on on line 544. View the example.
Part 2: Copy and paste this block of code below into your cui_character script, anywhere in the client-side main.lua.
AddEventHandler('cui_character:SetPedClothes_multi')
RegisterNetEvent('cui_character:SetPedClothes_multi', function(new_character, skin)
playerLoaded = true
if new_character then
oldChar = GetDefaultCharacter(true)
LoadCharacter(oldChar)
TriggerEvent('cui_character:open', { 'identity', 'features', 'style', 'apparel' }, false)
else
oldLoadout = GetLoadout()
oldChar = skin
LoadCharacter(skin)
end
preparingSkin = false
end)
No changes needed.

Now we need to copy and paste some code into your character skin creation script so we can set the skin of the peds. Currently, we support 3 different clothing scripts, although we have 2 different methods for esx_skin as the first supports older versions and the second supports newer versions, but always try the older version first.
esx_skin (older versions)
esx_skin (newer versions)
cui_character
betrayed_clothing
If you use esx_skin, use this version first.
Part 1 - Copy and paste this export below into your skinchanger script, anywhere in the client-side main.lua.
exports('GetPedList', function()
return pedList
end)
Part 2 - Copy and paste this block of code below into your skinchanger script, at the very bottom of the client-side main.lua.
RegisterNetEvent('skinchanger:loadSkin2')
AddEventHandler('skinchanger:loadSkin2', function(multipedID, skin)
local MultiPed = {}
for i=1, #Components, 1 do
MultiPed[Components[i].name] = Components[i].value
end
for k,v in pairs(skin) do
MultiPed[k] = v
end
SetPedHeadBlendData (multipedID, MultiPed['face'], MultiPed['face'], MultiPed['face'], MultiPed['skin'], MultiPed['skin'], MultiPed['skin'], 1.0, 1.0, 1.0, true)
SetPedHairColor (multipedID, MultiPed['hair_color_1'], MultiPed['hair_color_2']) -- Hair Color
SetPedHeadOverlay (multipedID, 3, MultiPed['age_1'], (MultiPed['age_2'] / 10) + 0.0) -- Age + opacity
SetPedHeadOverlay (multipedID, 0, MultiPed['blemishes_1'], (MultiPed['blemishes_2'] / 10) + 0.0) -- Blemishes + opacity
SetPedHeadOverlay (multipedID, 1, MultiPed['beard_1'], (MultiPed['beard_2'] / 10) + 0.0) -- Beard + opacity
SetPedEyeColor (multipedID, MultiPed['eye_color'], 0, 1) -- Eyes color
SetPedHeadOverlay (multipedID, 2, MultiPed['eyebrows_1'], (MultiPed['eyebrows_2'] / 10) + 0.0) -- Eyebrows + opacity
SetPedHeadOverlay (multipedID, 4, MultiPed['makeup_1'], (MultiPed['makeup_2'] / 10) + 0.0) -- Makeup + opacity
SetPedHeadOverlay (multipedID, 8, MultiPed['lipstick_1'], (MultiPed['lipstick_2'] / 10) + 0.0) -- Lipstick + opacity
SetPedComponentVariation (multipedID, 2, MultiPed['hair_1'], MultiPed['hair_2'], 2) -- Hair
SetPedHeadOverlayColor (multipedID, 1, 1, MultiPed['beard_3'], MultiPed['beard_4']) -- Beard Color
SetPedHeadOverlayColor (multipedID, 2, 1, MultiPed['eyebrows_3'], MultiPed['eyebrows_4']) -- Eyebrows Color
SetPedHeadOverlayColor (multipedID, 4, 1, MultiPed['makeup_3'], MultiPed['makeup_4']) -- Makeup Color
SetPedHeadOverlayColor (multipedID, 8, 1, MultiPed['lipstick_3'], MultiPed['lipstick_4']) -- Lipstick Color
SetPedHeadOverlay (multipedID, 5, MultiPed['blush_1'], (MultiPed['blush_2'] / 10) + 0.0) -- Blush + opacity
SetPedHeadOverlayColor (multipedID, 5, 2, MultiPed['blush_3']) -- Blush Color
SetPedHeadOverlay (multipedID, 6, MultiPed['complexion_1'], (MultiPed['complexion_2'] / 10) + 0.0) -- Complexion + opacity
SetPedHeadOverlay (multipedID, 7, MultiPed['sun_1'], (MultiPed['sun_2'] / 10) + 0.0) -- Sun Damage + opacity
SetPedHeadOverlay (multipedID, 9, MultiPed['moles_1'], (MultiPed['moles_2'] / 10) + 0.0) -- Moles/Freckles + opacity
SetPedHeadOverlay (multipedID, 10, MultiPed['chest_1'], (MultiPed['chest_2'] / 10) + 0.0) -- Chest Hair + opacity
SetPedHeadOverlayColor (multipedID, 10, 1, MultiPed['chest_3']) -- Torso Color
SetPedHeadOverlay (multipedID, 11, MultiPed['bodyb_1'], (MultiPed['bodyb_2'] / 10) + 0.0) -- Body Blemishes + opacity
if MultiPed['ears_1'] == -1 then
ClearPedProp(multipedID, 2)
else
SetPedPropIndex (multipedID, 2, MultiPed['ears_1'], MultiPed['ears_2'], 2) -- Ears Accessories
end
SetPedComponentVariation (multipedID, 8, MultiPed['tshirt_1'], MultiPed['tshirt_2'], 2) -- Tshirt
SetPedComponentVariation (multipedID, 11, MultiPed['torso_1'], MultiPed['torso_2'], 2) -- torso parts
SetPedComponentVariation (multipedID, 3, MultiPed['arms'], MultiPed['arms_2'], 2) -- Amrs
SetPedComponentVariation (multipedID, 10, MultiPed['decals_1'], MultiPed['decals_2'], 2) -- decals
SetPedComponentVariation (multipedID, 4, MultiPed['pants_1'], MultiPed['pants_2'], 2) -- pants
SetPedComponentVariation (multipedID, 6, MultiPed['shoes_1'], MultiPed['shoes_2'], 2) -- shoes
SetPedComponentVariation (multipedID, 1, MultiPed['mask_1'], MultiPed['mask_2'], 2) -- mask
SetPedComponentVariation (multipedID, 9, MultiPed['bproof_1'], MultiPed['bproof_2'], 2) -- bulletproof
SetPedComponentVariation (multipedID, 7, MultiPed['chain_1'], MultiPed['chain_2'], 2) -- chain
SetPedComponentVariation (multipedID, 5, MultiPed['bags_1'], MultiPed['bags_2'], 2) -- Bag
if MultiPed['helmet_1'] == -1 then
ClearPedProp(multipedID, 0)
else
SetPedPropIndex (multipedID, 0, MultiPed['helmet_1'], MultiPed['helmet_2'], 2) -- Helmet
end
if MultiPed['glasses_1'] == -1 then
ClearPedProp(multipedID, 1)
else
SetPedPropIndex (multipedID, 1, MultiPed['glasses_1'], MultiPed['glasses_2'], 2) -- Glasses
end
if MultiPed['watches_1'] == -1 then
ClearPedProp(multipedID, 6)
else
SetPedPropIndex (multipedID, 6, MultiPed['watches_1'], MultiPed['watches_2'], 2) -- Watches
end
if MultiPed['bracelets_1'] == -1 then
ClearPedProp(multipedID, 7)
else
SetPedPropIndex (multipedID, 7, MultiPed['bracelets_1'], MultiPed['bracelets_2'], 2) -- Bracelets
end
MultiPed = nil
end)
If you use esx_skin and the first version showed errors in f8 from skinchanger related to blemishes, use this version instead.
Part 1: Copy and paste this export below into your skinchanger script, anywhere in the client-side main.lua.
exports('GetPedList', function()
return pedList
end)
Part 2: Copy and paste this block of code below into your skinchanger script, at the very bottom of the client-side main.lua.
RegisterNetEvent('skinchanger:loadSkin2')
AddEventHandler('skinchanger:loadSkin2', function(multipedID, skin)
local MultiPed = {}
for i=1, #Components, 1 do
MultiPed[Components[i].name] = Components[i].value
end
for k,v in pairs(skin) do
MultiPed[k] = v
end
SetPedHeadBlendData (multipedID, MultiPed['face'], MultiPed['face'], MultiPed['face'], MultiPed['skin'], MultiPed['skin'], MultiPed['skin'], 1.0, 1.0, 1.0, true)
SetPedHairColor (multipedID, MultiPed['hair_color_1'], MultiPed['hair_color_2']) -- Hair Color
SetPedHeadOverlay (multipedID, 3, MultiPed['age_1'], (MultiPed['age_2'] / 10) + 0.0) -- Age + opacity
SetPedHeadOverlay (multipedID, 1, MultiPed['beard_1'], (MultiPed['beard_2'] / 10) + 0.0) -- Beard + opacity
SetPedEyeColor (multipedID, MultiPed['eye_color'], 0, 1) -- Eyes color
SetPedHeadOverlay (multipedID, 2, MultiPed['eyebrows_1'], (MultiPed['eyebrows_2'] / 10) + 0.0) -- Eyebrows + opacity
SetPedHeadOverlay (multipedID, 4, MultiPed['makeup_1'], (MultiPed['makeup_2'] / 10) + 0.0) -- Makeup + opacity
SetPedHeadOverlay (multipedID, 8, MultiPed['lipstick_1'], (MultiPed['lipstick_2'] / 10) + 0.0) -- Lipstick + opacity
SetPedComponentVariation (multipedID, 2, MultiPed['hair_1'], MultiPed['hair_2'], 2) -- Hair
SetPedHeadOverlayColor (multipedID, 1, 1, MultiPed['beard_3'], MultiPed['beard_4']) -- Beard Color
SetPedHeadOverlayColor (multipedID, 2, 1, MultiPed['eyebrows_3'], MultiPed['eyebrows_4']) -- Eyebrows Color
SetPedHeadOverlayColor (multipedID, 4, 1, MultiPed['makeup_3'], MultiPed['makeup_4']) -- Makeup Color
SetPedHeadOverlayColor (multipedID, 8, 1, MultiPed['lipstick_3'], MultiPed['lipstick_4']) -- Lipstick Color
SetPedHeadOverlay (multipedID, 5, MultiPed['blush_1'], (MultiPed['blush_2'] / 10) + 0.0) -- Blush + opacity
SetPedHeadOverlayColor (multipedID, 5, 2, MultiPed['blush_3']) -- Blush Color
SetPedHeadOverlay (multipedID, 9, MultiPed['moles_1'], (MultiPed['moles_2'] / 10) + 0.0) -- Moles/Freckles + opacity
SetPedHeadOverlay (multipedID, 10, MultiPed['chest_1'], (MultiPed['chest_2'] / 10) + 0.0) -- Chest Hair + opacity
SetPedHeadOverlayColor (multipedID, 10, 1, MultiPed['chest_3']) -- Torso Color
if MultiPed['ears_1'] == -1 then
ClearPedProp(multipedID, 2)
else
SetPedPropIndex (multipedID, 2, MultiPed['ears_1'], MultiPed['ears_2'], 2) -- Ears Accessories
end
SetPedComponentVariation (multipedID, 8, MultiPed['tshirt_1'], MultiPed['tshirt_2'], 2) -- Tshirt
SetPedComponentVariation (multipedID, 11, MultiPed['torso_1'], MultiPed['torso_2'], 2) -- torso parts
SetPedComponentVariation (multipedID, 3, MultiPed['arms'], MultiPed['arms_2'], 2) -- Amrs
SetPedComponentVariation (multipedID, 10, MultiPed['decals_1'], MultiPed['decals_2'], 2) -- decals
SetPedComponentVariation (multipedID, 4, MultiPed['pants_1'], MultiPed['pants_2'], 2) -- pants
SetPedComponentVariation (multipedID, 6, MultiPed['shoes_1'], MultiPed['shoes_2'], 2) -- shoes
SetPedComponentVariation (multipedID, 1, MultiPed['mask_1'], MultiPed['mask_2'], 2) -- mask
SetPedComponentVariation (multipedID, 9, MultiPed['bproof_1'], MultiPed['bproof_2'], 2) -- bulletproof
SetPedComponentVariation (multipedID, 7, MultiPed['chain_1'], MultiPed['chain_2'], 2) -- chain
SetPedComponentVariation (multipedID, 5, MultiPed['bags_1'], MultiPed['bags_2'], 2) -- Bag
if MultiPed['helmet_1'] == -1 then
ClearPedProp(multipedID, 0)
else
SetPedPropIndex (multipedID, 0, MultiPed['helmet_1'], MultiPed['helmet_2'], 2) -- Helmet
end
if MultiPed['glasses_1'] == -1 then
ClearPedProp(multipedID, 1)
else
SetPedPropIndex (multipedID, 1, MultiPed['glasses_1'], MultiPed['glasses_2'], 2) -- Glasses
end
if MultiPed['watches_1'] == -1 then
ClearPedProp(multipedID, 6)
else
SetPedPropIndex (multipedID, 6, MultiPed['watches_1'], MultiPed['watches_2'], 2) -- Watches
end
if MultiPed['bracelets_1'] == -1 then
ClearPedProp(multipedID, 7)
else
SetPedPropIndex (multipedID, 7, MultiPed['bracelets_1'], MultiPed['bracelets_2'], 2) -- Bracelets
end
SetPedFaceFeature(multipedID, 0, MultiPed['nose_width'])
SetPedFaceFeature(multipedID, 1, MultiPed['nose_peak_hight'])
SetPedFaceFeature(multipedID, 2, MultiPed['nose_peak_lenght'])
SetPedFaceFeature(multipedID, 3, MultiPed['nose_bone_high'])
SetPedFaceFeature(multipedID, 4, MultiPed['nose_peak_lowering'])
SetPedFaceFeature(multipedID, 5, MultiPed['nose_bone_twist'])
SetPedFaceFeature(multipedID, 6, MultiPed['eyebrown_high'])
SetPedFaceFeature(multipedID, 7, MultiPed['eyebrown_forward'])
SetPedFaceFeature(multipedID, 8, MultiPed['cheeks_bone_high'])
SetPedFaceFeature(multipedID, 9, MultiPed['cheeks_bone_width'])
SetPedFaceFeature(multipedID, 10, MultiPed['cheeks_width'])
SetPedFaceFeature(multipedID, 11, MultiPed['eyes_openning'])
SetPedFaceFeature(multipedID, 12, MultiPed['lips_thickness'])
SetPedFaceFeature(multipedID, 13, MultiPed['jaw_bone_width'])
SetPedFaceFeature(multipedID, 14, MultiPed['jaw_bone_back_lenght'])
SetPedFaceFeature(multipedID, 15, MultiPed['chimp_bone_lowering'])
SetPedFaceFeature(multipedID, 16, MultiPed['chimp_bone_lenght'])
SetPedFaceFeature(multipedID, 17, MultiPed['chimp_bone_width'])
SetPedFaceFeature(multipedID, 18, MultiPed['chimp_hole'])
SetPedFaceFeature(multipedID, 19, MultiPed['neck_thikness'])
MultiPed = nil
end)
Part 1 - Copy and paste this block of code below into your cui_character script, at the very bottom of the client-side main.lua.
RegisterNetEvent('cui_character:MultiCharSkin')
AddEventHandler('cui_character:MultiCharSkin', function(multipedID, data)
-- Face Blend
local weightFace = data.face_md_weight / 100 + 0.0
local weightSkin = data.skin_md_weight / 100 + 0.0
SetPedHeadBlendData(multipedID, data.mom, data.dad, 0, data.mom, data.dad, 0, weightFace, weightSkin, 0.0, false)
-- Facial Features
SetPedFaceFeature(multipedID, 0, (data.nose_1 / 100) + 0.0) -- Nose Width
SetPedFaceFeature(multipedID, 1, (data.nose_2 / 100) + 0.0) -- Nose Peak Height
SetPedFaceFeature(multipedID, 2, (data.nose_3 / 100) + 0.0) -- Nose Peak Length
SetPedFaceFeature(multipedID, 3, (data.nose_4 / 100) + 0.0) -- Nose Bone Height
SetPedFaceFeature(multipedID, 4, (data.nose_5 / 100) + 0.0) -- Nose Peak Lowering
SetPedFaceFeature(multipedID, 5, (data.nose_6 / 100) + 0.0) -- Nose Bone Twist
SetPedFaceFeature(multipedID, 6, (data.eyebrows_5 / 100) + 0.0) -- Eyebrow height
SetPedFaceFeature(multipedID, 7, (data.eyebrows_6 / 100) + 0.0) -- Eyebrow depth
SetPedFaceFeature(multipedID, 8, (data.cheeks_1 / 100) + 0.0) -- Cheekbones Height
SetPedFaceFeature(multipedID, 9, (data.cheeks_2 / 100) + 0.0) -- Cheekbones Width
SetPedFaceFeature(multipedID, 10, (data.cheeks_3 / 100) + 0.0) -- Cheeks Width
SetPedFaceFeature(multipedID, 11, (data.eye_squint / 100) + 0.0) -- Eyes squint
SetPedFaceFeature(multipedID, 12, (data.lip_thickness / 100) + 0.0) -- Lip Fullness
SetPedFaceFeature(multipedID, 13, (data.jaw_1 / 100) + 0.0) -- Jaw Bone Width
SetPedFaceFeature(multipedID, 14, (data.jaw_2 / 100) + 0.0) -- Jaw Bone Length
SetPedFaceFeature(multipedID, 15, (data.chin_1 / 100) + 0.0) -- Chin Height
SetPedFaceFeature(multipedID, 16, (data.chin_2 / 100) + 0.0) -- Chin Length
SetPedFaceFeature(multipedID, 17, (data.chin_3 / 100) + 0.0) -- Chin Width
SetPedFaceFeature(multipedID, 18, (data.chin_4 / 100) + 0.0) -- Chin Hole Size
SetPedFaceFeature(multipedID, 19, (data.neck_thickness / 100) + 0.0) -- Neck Thickness
-- Appearance
SetPedComponentVariation(multipedID, 2, data.hair_1, data.hair_2, 2) -- Hair Style
SetPedHairColor(multipedID, data.hair_color_1, data.hair_color_2) -- Hair Color
SetPedHeadOverlay(multipedID, 2, data.eyebrows_1, data.eyebrows_2 / 100 + 0.0) -- Eyebrow Style + Opacity
SetPedHeadOverlayColor(multipedID, 2, 1, data.eyebrows_3, data.eyebrows_4) -- Eyebrow Color
SetPedHeadOverlay(multipedID, 1, data.beard_1, data.beard_2 / 100 + 0.0) -- Beard Style + Opacity
SetPedHeadOverlayColor(multipedID, 1, 1, data.beard_3, data.beard_4) -- Beard Color
SetPedHeadOverlay(multipedID, 0, data.blemishes_1, data.blemishes_2 / 100 + 0.0) -- Skin blemishes + Opacity
SetPedHeadOverlay(multipedID, 12, data.bodyb_3, data.bodyb_4 / 100 + 0.0) -- Skin blemishes body effect + Opacity
SetPedHeadOverlay(multipedID, 11, data.bodyb_1, data.bodyb_2 / 100 + 0.0) -- Body Blemishes + Opacity
SetPedHeadOverlay(multipedID, 3, data.age_1, data.age_2 / 100 + 0.0) -- Age + opacity
SetPedHeadOverlay(multipedID, 6, data.complexion_1, data.complexion_2 / 100 + 0.0) -- Complexion + Opacity
SetPedHeadOverlay(multipedID, 9, data.moles_1, data.moles_2 / 100 + 0.0) -- Moles/Freckles + Opacity
SetPedHeadOverlay(multipedID, 7, data.sun_1, data.sun_2 / 100 + 0.0) -- Sun Damage + Opacity
SetPedEyeColor(multipedID, data.eye_color) -- Eyes Color
SetPedHeadOverlay(multipedID, 4, data.makeup_1, data.makeup_2 / 100 + 0.0) -- Makeup + Opacity
SetPedHeadOverlayColor(multipedID, 4, 0, data.makeup_3, data.makeup_4) -- Makeup Color
SetPedHeadOverlay(multipedID, 5, data.blush_1, data.blush_2 / 100 + 0.0) -- Blush + Opacity
SetPedHeadOverlayColor(multipedID, 5, 2, data.blush_3) -- Blush Color
SetPedHeadOverlay(multipedID, 8, data.lipstick_1, data.lipstick_2 / 100 + 0.0) -- Lipstick + Opacity
SetPedHeadOverlayColor(multipedID, 8, 2, data.lipstick_3, data.lipstick_4) -- Lipstick Color
SetPedHeadOverlay(multipedID, 10, data.chest_1, data.chest_2 / 100 + 0.0) -- Chest Hair + Opacity
SetPedHeadOverlayColor(multipedID, 10, 1, data.chest_3, data.chest_4) -- Chest Hair Color
-- Clothing and Accessories
SetPedComponentVariation(multipedID, 8, data.tshirt_1, data.tshirt_2, 2) -- Undershirts
SetPedComponentVariation(multipedID, 11, data.torso_1, data.torso_2, 2) -- Jackets
SetPedComponentVariation(multipedID, 3, data.arms, data.arms_2, 2) -- Torsos
SetPedComponentVariation(multipedID, 10, data.decals_1, data.decals_2, 2) -- Decals
SetPedComponentVariation(multipedID, 4, data.pants_1, data.pants_2, 2) -- Legs
SetPedComponentVariation(multipedID, 6, data.shoes_1, data.shoes_2, 2) -- Shoes
SetPedComponentVariation(multipedID, 1, data.mask_1, data.mask_2, 2) -- Masks
SetPedComponentVariation(multipedID, 9, data.bproof_1, data.bproof_2, 2) -- Vests
SetPedComponentVariation(multipedID, 7, data.neckarm_1, data.neckarm_2, 2) -- Necklaces/Chains/Ties/Suspenders
SetPedComponentVariation(multipedID, 5, data.bags_1, data.bags_2, 2) -- Bags
if data.helmet_1 == -1 then
ClearPedProp(multipedID, 0)
else
SetPedPropIndex(multipedID, 0, data.helmet_1, data.helmet_2, 2) -- Hats
end
if data.glasses_1 == -1 then
ClearPedProp(multipedID, 1)
else
SetPedPropIndex(multipedID, 1, data.glasses_1, data.glasses_2, 2) -- Glasses
end
if data.lefthand_1 == -1 then
ClearPedProp(multipedID, 6)
else
SetPedPropIndex(multipedID, 6, data.lefthand_1, data.lefthand_2, 2) -- Left Hand Accessory
end
if data.righthand_1 == -1 then
ClearPedProp(multipedID, 7)
else
SetPedPropIndex(multipedID, 7, data.righthand_1, data.righthand_2, 2) -- Right Hand Accessory
end
if data.ears_1 == -1 then
ClearPedProp(multipedID, 2)
else
SetPedPropIndex (multipedID, 2, data.ears_1, data.ears_2, 2) -- Ear Accessory
end
end)
Part 1 - Copy and paste this block of code below into your clothing script, at the very bottom of the client-side main.lua.
RegisterNetEvent('otherclothing:MultiCharSkin')
AddEventHandler('otherclothing:MultiCharSkin', function(ped, skin)
-----SKIN-------
if ped then
if skin then
if skin['skin'] ~= nil then
for i = 1, #drawable_names do
if skin['skin'].drawables[0] == nil then
if drawable_names[i] == "undershirts" and skin['skin'].drawables[tostring(i-1)][2] == -1 then
SetPedComponentVariation(ped, i-1, 15, 0, 2)
else
SetPedComponentVariation(ped, i-1, skin['skin'].drawables[tostring(i-1)][2], skin['skin'].drawtextures[i][2], 2)
end
else
if drawable_names[i] == "undershirts" and skin['skin'].drawables[i-1][2] == -1 then
SetPedComponentVariation(ped, i-1, 15, 0, 2)
else
SetPedComponentVariation(ped, i-1, skin['skin'].drawables[i-1][2], skin['skin'].drawtextures[i][2], 2)
end
end
end
for i = 1, #prop_names do
local propZ = (skin['skin'].drawables[0] == nil and skin['skin'].props[tostring(i-1)][2] or skin['skin'].props[i-1][2])
ClearPedProp(ped, i-1)
SetPedPropIndex(ped,i-1,propZ,skin['skin'].proptextures[i][2], true)
end
Citizen.Wait(500)
if skin['skin'].model == 1885233650 or skin['skin'].model == -1667301416 then
-----FACE-------
if skin['face'] ~= nil then
SetPedHairColor(ped, tonumber(skin['face'].hairColor[1]), tonumber(skin['face'].hairColor[2]))
SetPedHeadBlendData(ped,
tonumber(skin['face'].headBlend['shapeFirst']),
tonumber(skin['face'].headBlend['shapeSecond']),
tonumber(skin['face'].headBlend['shapeThird']),
tonumber(skin['face'].headBlend['skinFirst']),
tonumber(skin['face'].headBlend['skinSecond']),
tonumber(skin['face'].headBlend['skinThird']),
tonumber(skin['face'].headBlend['shapeMix']),
tonumber(skin['face'].headBlend['skinMix']),
tonumber(skin['face'].headBlend['thirdMix']),
false)
for i = 1, #face_features do
SetPedFaceFeature(ped, i-1, skin['face'].headStructure[i])
end
if json.encode(skin['face'].headOverlay) ~= "[]" then
for i = 1, #head_overlays do
if skin['face'].headOverlay[i].name == "eyecolor" then
SetPedEyeColor(ped, tonumber(skin['face'].headOverlay[i].val))
else
SetPedHeadOverlay(ped, i-1, tonumber(skin['face'].headOverlay[i].overlayValue), tonumber(skin['face'].headOverlay[i].overlayOpacity))
end
end
SetPedHeadOverlayColor(ped, 0, 0, tonumber(skin['face'].headOverlay[1].firstColour), tonumber(skin['face'].headOverlay[1].secondColour))
SetPedHeadOverlayColor(ped, 1, 1, tonumber(skin['face'].headOverlay[2].firstColour), tonumber(skin['face'].headOverlay[2].secondColour))
SetPedHeadOverlayColor(ped, 2, 1, tonumber(skin['face'].headOverlay[3].firstColour), tonumber(skin['face'].headOverlay[3].secondColour))
SetPedHeadOverlayColor(ped, 3, 0, tonumber(skin['face'].headOverlay[4].firstColour), tonumber(skin['face'].headOverlay[4].secondColour))
SetPedHeadOverlayColor(ped, 4, 2, tonumber(skin['face'].headOverlay[5].firstColour), tonumber(skin['face'].headOverlay[5].secondColour))
SetPedHeadOverlayColor(ped, 5, 2, tonumber(skin['face'].headOverlay[6].firstColour), tonumber(skin['face'].headOverlay[6].secondColour))
SetPedHeadOverlayColor(ped, 6, 0, tonumber(skin['face'].headOverlay[7].firstColour), tonumber(skin['face'].headOverlay[7].secondColour))
SetPedHeadOverlayColor(ped, 7, 0, tonumber(skin['face'].headOverlay[8].firstColour), tonumber(skin['face'].headOverlay[8].secondColour))
SetPedHeadOverlayColor(ped, 8, 2, tonumber(skin['face'].headOverlay[9].firstColour), tonumber(skin['face'].headOverlay[9].secondColour))
SetPedHeadOverlayColor(ped, 9, 0, tonumber(skin['face'].headOverlay[10].firstColour), tonumber(skin['face'].headOverlay[10].secondColour))
SetPedHeadOverlayColor(ped, 10, 1, tonumber(skin['face'].headOverlay[11].firstColour), tonumber(skin['face'].headOverlay[11].secondColour))
SetPedHeadOverlayColor(ped, 11, 0, tonumber(skin['face'].headOverlay[12].firstColour), tonumber(skin['face'].headOverlay[12].secondColour))
end
else
print('skin[face] is nil')
end
-----TATTOOS-------
if skin['tattoo'] ~= nil then
ClearPedDecorations(ped)
for i = 1, #skin['tattoo'] do
ApplyPedOverlay(ped, skin['tattoo'][i][1], skin['tattoo'][i][2])
end
else
print('skin[tattoo] is nil')
end
end
else
print('skin[skin] is nil')
end
else
print('skin is nil')
end
else
print('ped is nil')
end
end)

WARNING If you are not 100% sure what you are doing here we would not recommend doing this, but if you insist please do read the information before implementing these changes. If you are unsure what this does, read more about it on our Web Store.
This is completely optional. We do not recommend using this option unless you have basic knowledge of Lua and you understand what needs to be done from reading the instructions below. This method is more complicated and more effort to install but is far more optimized than the standard esx_kashacters method.
Part 1: Set the Config.UseAdvancedMultiCharMethod in the config.lua to true.
Part 2: If you are switching from the standard multicharacter version to the advanced multicharacter version you need to use this command in your server console below before any players join.
Use this chat command in the server console.
AdvancedMultichar
Part 3: Replace the FiveM native method of getting a players identifier (steam id, license) GetPlayerIdentifiers(source)[1] or GetPlayerIdentifiers(source)[2] with xPlayer.identifier for every server-side resource which uses the identifier to fetch a character's data from the database. xPlayer of course needs to be defined before using it eg., local xPlayer = ESX.GetPlayerFromId(source).
Example 1: Do not change this.
Example 2: Change this.
Part 4: Follow the guide below for your version of ESX.
ESX version 1.1
ESX version 1.2
ESX version 1.final
Extendedmode
ESX Legacy 1.3.x
ESX Legacy 1.6.x
essentialmode/server/main.lua/line 41 - replace the existing block of code with this.
View the Before and After examples here.
RegisterServerEvent('es:firstJoinProper')
AddEventHandler('es:firstJoinProper', function(charID)
local Source = source
Citizen.CreateThread(function()
local id
for k,v in ipairs(GetPlayerIdentifiers(Source)) do
if string.match(v, 'steam:') then
id = charID..''..v:sub(7)
break
end
end
if not id then
DropPlayer(Source, "SteamID not found, please try reconnecting with Steam open.")
else
registerUser(id, Source)
justJoined[Source] = true
if(settings.defaultSettings.pvpEnabled)then
TriggerClientEvent("es:enablePvp", Source)
end
end
return