qbox_multichar
Steps
---@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
endLast updated