# qb-multicharacter support

1. Navigate to **qb-multicharacter/client/main.lua** (around the line **100**) and add the following code after `SetNuiFocus(false, false)`:

```lua
skyCam(false)
```

2. Then, on **qb-multicharacter/server/main.lua**, search for `RegisterNetEvent('qb-multicharacter:server:loadUserData', function(cData)` and replace:

```lua
if GetResourceState('qb-apartments') == 'started' then
    TriggerClientEvent('apartments:client:setupSpawnUI', src, cData)
else
```

With:

<pre class="language-lua"><code class="lang-lua">if GetResourceState('okokSpawnSelector') == 'started' then
<strong>    local coords = json.decode(cData.position)
</strong><strong>    TriggerClientEvent('okokSpawnSelector:spawnMenu', src, false, coords)
</strong>else
</code></pre>

3. Now, in the same file, search for `RegisterNetEvent('qb-multicharacter:server:createCharacter', function(data)` and replace:

```lua
TriggerClientEvent('apartments:client:setupSpawnUI', src, newData)
```

With:

```lua
TriggerClientEvent('okokSpawnSelector:spawnMenu', src, true)
```


---

# 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://docs.okokscripts.io/scripts/okokspawnselector/qb-multicharacter-support.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.
