diff --git a/client/character.lua b/client/character.lua index 54db5c72a..18305ca9a 100644 --- a/client/character.lua +++ b/client/character.lua @@ -355,6 +355,11 @@ local function createCharacter(cid) end local function chooseCharacter() + ---@type PlayerEntity[], integer + local characters, amount = lib.callback.await('qbx_core:server:getCharacters') + local firstCharacterCitizenId = characters[1] and characters[1].citizenid + previewPed(firstCharacterCitizenId) + randomLocation = config.characters.locations[math.random(1, #config.characters.locations)] SetFollowPedCamViewMode(2) DisplayRadar(false) @@ -379,8 +384,6 @@ local function chooseCharacter() ShutdownLoadingScreenNui() setupPreviewCam() - ---@type PlayerEntity[], integer - local characters, amount = lib.callback.await('qbx_core:server:getCharacters') local options = {} for i = 1, amount do local character = characters[i] @@ -410,6 +413,7 @@ local function chooseCharacter() local success = createCharacter(i) if success then return end + previewPed(firstCharacterCitizenId) lib.showContext('qbx_core_multichar_characters') end end @@ -505,7 +509,6 @@ CreateThread(function() if NetworkIsSessionStarted() then pcall(function() exports.spawnmanager:setAutoSpawn(false) end) Wait(250) - randomPed() chooseCharacter() break end