# uniqers-multicharacter

<figure><img src="/files/hy3wVyUAkUtMzMR0NW5R" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/TnE6dPAy9VQJyVr4tup8" alt=""><figcaption></figcaption></figure>

## How to install

\-- depends xsound <https://github.com/Xogy/xsound/releases> download the latest\
\-- depents int\_carmeet map getting from keymaster

If you select Config.DefaultSpawnStyle = "buckrandom" you need install this.

First for qb-clothing\
open client/main.lua\
paste this code from line 1

```
local newdata = false
```

find this codes and change to new.

```
local function SaveSkin()
local model = GetEntityModel(PlayerPedId())
local clothing = json.encode(skinData)
TriggerServerEvent("qb-clothing:saveSkin", model, clothing)
if newdata then
TriggerServerEvent("uniqers:multi:returnBucket")
end
end

RegisterNetEvent('qb-clothes:client:CreateFirstCharacter')
AddEventHandler('qb-clothes:client:CreateFirstCharacter', function()
QBCore.Functions.GetPlayerData(function(pData)
local skin = "mp_m_freemode_01"
openMenu({
{menu = "character", label = "Character", selected = true},
{menu = "clothing", label = "Features", selected = false},
{menu = "accessoires", label = "Accessories", selected = false}
})

    if pData.charinfo.gender == 1 then
        skin = "mp_f_freemode_01"
    end

    ChangeToSkinNoUpdate(skin)
    SendNUIMessage({
        action = "ResetValues",
    })
	newdata = true
end)
end)

RegisterNUICallback('close', function(_, cb)
SetNuiFocus(false, false)
creatingCharacter = false
newdata = false
disableCam()
FreezeEntityPosition(PlayerPedId(), false)
TriggerEvent('qb-clothing:client:onMenuClose')
cb('ok')
end)
```

for esx\_skin

open client/main.lua

find this codes and change to new.

```
function OpenSaveableMenu(submitCb, cancelCb, restrict)
TriggerEvent("skinchanger:getSkin", function(skin)
lastSkin = skin
end)
```

```
OpenMenu(function(data, menu)
    menu.close()
    DeleteSkinCam()

    TriggerEvent("skinchanger:getSkin", function(skin)
        TriggerServerEvent("esx_skin:save", skin)
		TriggerServerEvent("uniqers:multi:returnBucket")

        if submitCb ~= nil then
            submitCb(data, menu)
        end
    end)
end, cancelCb, restrict)
end
```

done.

FOR OTHERS CLOTHING SCRIPT AFTER THE CHARACTER SELECT CLOTHING ADD THIS TRIGGER CODE

```
TriggerServerEvent("uniqers:multi:returnBucket")
```

Multicharacter MetaData Installing

FOR QBUS\
First open this > For QBCore > qb-core/server/player.lua\
Find this code >&#x20;

```
PlayerData.metadata['walletid'] = PlayerData.metadata['walletid'] or QBCore.Player.CreateWalletId()
```

after this code\
paste this code below

```
PlayerData.metadata["settings"] = PlayerData.metadata["settings"] ~= nil and PlayerData.metadata["settings"] or {
	["logincar"] = "default",
	["loginanim"] = "default",
	["logineffect"] = "default",	
	["loginweapon"] = "default",		
	["loginmusic"] = "default",	
	["loginoverlaycolor"] = "default",
	["loginoverlaybg"] = "default",
	["loginbgavatar"] = "default",
	["loginbggif"] = "default",
	["loginvip"] = "no",
	["loginppbackground"] = "default",
	["logintime"] = "default",
	["loginweather"] = "default",		
}
```

and save.

***

FOR QBCore\
Open your qb-core/config.lua\
Find metadata = { line\
and\
after this

```
 walletid = function() return QBCore.Player.CreateWalletId() end, 
```

```
    settings = {
        logincar = "default",
        loginanim = "default",
		logineffect = "default",
		loginweapon = "default",
		loginmusic = "default",
		loginoverlaycolor = "default",
		loginoverlaybg = "default",
		loginbgavatar = "default",
		loginbggif = "default",
		loginvip = "no",
		loginppbackground = "default",
		logintime = "default",
		loginweather = "default",
    },
```

paste this\
and save.

***

For qbus/qbcore need to be change this.

Open your qb-houses script server/main.lua\
find this code

```
TriggerClientEvent('qb-multicharacter:client:chooseChar', src)
```

and change

```
TriggerClientEvent('uniqers-multicharacter:client:choicescreen', src)
```

to and save.

FOR QBX\
Open your qbx\_core/server/player.lua\
Find this code >>>&#x20;

```
playerData.metadata.walletid = playerData.metadata.walletid or GenerateUniqueIdentifier('WalletId')
```

after this code\
paste this

```
playerData.metadata.settings = playerData.metadata.settings or {
logincar = "default",
loginanim = "default",
logineffect = "default",
loginweapon = "default",
loginmusic = "default",
loginoverlaycolor = "default",
loginoverlaybg = "default",
loginbgavatar = "default",
loginbggif = "default",
loginvip = "no",
loginppbackground = "default",
logintime = "default",
loginweather = "default",
}
```

and save it.

and open qbx\_spawn/client/main.lua\
find this code&#x20;

```
AddEventHandler('qb-spawn:client:setupSpawns', function()
```

\
and change to this&#x20;

```
RegisterNetEvent('qb-spawn:client:setupSpawns', function()
```

and save it

and open qbx\_properties/client/apartmentselect.lua\
find this code&#x20;

```
AddEventHandler('apartments:client:setupSpawnUI', function()
```

\
and change to this&#x20;

```
RegisterNetEvent('apartments:client:setupSpawnUI', function()
```

and save it.

and open multicharacter config.lua\
Config.QBX = true -- change to true. and save it.

and open qbx\_core/config.lua\
find this code useExternalCharacters = true, and change it to true and save it done.

FOR ESX you dont need add anything for meta data installing.

Just do this for esx

open your resources\[core]\es\_extended/config.lua

Find this code

```
Config.Multichar = GetResourceState("esx_multicharacter") ~= "missing"
```

and change to this

```
Config.Multichar = true
```

save it.

For esx need to be change this.\
open your skinchanger/client/main.lua script

find this codes.

```
function ApplySkin(skin, clothes)
local playerPed = GetPlayerPed(-1)
for k,v in pairs(skin) do
Character[k] = v
end
```

change to this code

```
function ApplySkin(skin, clothes, ped)
local playerPed = ped ~= nil and ped or PlayerPedId()

for k, v in pairs(skin) do
    Character[k] = v
end
```

after\
copy this code and paste to the bottom

```
exports("ApplySkin", ApplySkin)
```

and save.

***

Tebex Store Installing

First open your server.cfg\
Copy this code

TEBEX SERVER CONNECT CODE

```
set sv_tebexSecret "your secret code"
```

and paste your server.cfg and save.

After open your tebex store\
and create a package on your tebex store.\
Click game server commands at bottom and select your game server.\
Click Add Command\
paste this code for extra slot selling. >>>>&#x20;

```
multicharacter_extra_slot {"transfergetid": "{transaction}"}
```

then\
Click settings icon\
Require Player To Be Online : SHOULD BE > Execute the command even if the player is offline\
and add package and done.

if you want selling vip to

do everything as above but you just need to change the command code differently\
paste this commend code for selling vip. >>>>&#x20;

```
multicharacter_vip {"transfergetid": "{transaction}"}
```

***

LAST THING

You need to start like this

ensure int\_carmeet\
ensure uniqers-settings\
ensure uniqers-multicharacter

its done.

### Support & Updates & Questions <a href="#support-and-updates-and-questions" id="support-and-updates-and-questions"></a>

![https://discord.gg/MyrGhbf9tM](https://uniqers-scripts-docs.gitbook.io/~gitbook/image?url=https%3A%2F%2F1436200110-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FZO8XqahJMWr9lDZTL9c1%252Fuploads%252F6U1vJg05XehtFcmGXsMW%252F3670325.png%3Falt%3Dmedia%26token%3D603ba3cd-283e-42c5-a0e2-13d33fefb5bd\&width=768\&dpr=4\&quality=100\&sign=80843ce\&sv=2)

<https://discord.gg/MyrGhbf9tM>


---

# 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://uniqers-scripts-docs.gitbook.io/uniqers-scripts-docs/uniqers-multicharacter.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.
