qbox_multichar

Edit this file: qbx_core/client/character.lua

And replace the previewPed function with this one:

---@param citizenId? string
local function previewPed(citizenId)
    if not citizenId then
        randomPed()
        return
    end
    local skinData = exports["rcore_clothing"]:getSkinByIdentifier(citizenId)

    if skinData then
        local pedModel = skinData.ped_model
        lib.requestModel(pedModel, config.loadingModelsTimeout)
        SetPlayerModel(cache.playerId, pedModel)
        pcall(function()
            exports["rcore_clothing"]:setPedSkin(PlayerPedId(), skinData)
        end)
        SetModelAsNoLongerNeeded(pedModel)
    else
        randomPed()
    end
end

Last updated

Was this helpful?