Uniqers Scripts Docs
  • Docs
  • uniqers-marriage
  • uniqers-spawn
  • uniqers-multicharacter
  • uniqers-investments
  • uniqers-announces
  • Store
Powered by GitBook
On this page
  • How to install
  • Support & Updates & Questions

uniqers-multicharacter

How to install and all exports infos.

Previousuniqers-spawnNextuniqers-investments

Last updated 2 days ago

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 >

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",		
}

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",
    },

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 >>>

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",
}

and save it.

and open qbx_spawn/client/main.lua find this code

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

and change to this

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

and save it

and open qbx_properties/client/apartmentselect.lua find this code

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

and change to this

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. >>>>

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. >>>>

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

https://discord.gg/MyrGhbf9tM