# qbox\_multichar

Edit this file: `qbx_core/client/character.lua`

And replace the previewPed function with this one:

```lua
---@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
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.rcore.cz/paid-resources/rcore_clothing/impl/qbox_multichar.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
