Start the script in server.cfg , ensure lvs_clothing.
Step 7. qb-multicharacter
Open qb-multicharacter/server/main.lua find the callback qb-multicharacter:server:getSkin (line 198) and replace with:
QBCore.Functions.CreateCallback("qb-multicharacter:server:getSkin", function(_,cb,cid)local result = MySQL.query.await('SELECT * FROM playerskins WHERE citizenid = ? AND active = ?', {cid, 1})if result[1] ~=nilthencb(json.decode(result[1].skin))elsecb(nil)endend)
Open qb-multicharacter/client/main.lua find the nuicallback RegisterNUICallback('cDataPed', function(nData, cb) (line 206) and replace with:
RegisterNUICallback('cDataPed', function(nData,cb)local cData = nData.cDataSetEntityAsMissionEntity(charPed, true, true)DeleteEntity(charPed)if cData ~=nilthenifnot cached_player_skins[cData.citizenid] thenlocal temp_model = promise.new()local temp_data = promise.new() QBCore.Functions.TriggerCallback('qb-multicharacter:server:getSkin', function(data)local model = data.model or"mp_m_freemode_01" temp_model:resolve(model) temp_data:resolve(data)end, cData.citizenid)local resolved_model = Citizen.Await(temp_model)local resolved_data = Citizen.Await(temp_data) cached_player_skins[cData.citizenid] = {model = resolved_model, data = resolved_data}endlocal model = cached_player_skins[cData.citizenid].modellocal data = cached_player_skins[cData.citizenid].dataif model ~=niltheninitializePedModel(model, data)elseinitializePedModel()endcb("ok")elseinitializePedModel()cb("ok")endend)