Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,17 @@ local function createCharacter(cid, character)
birthdate = character.birthdate,
cid = cid
})

if GetResourceState('qbx_spawn') == 'missing' then
spawnDefault()
else
if config.qbx_properties then
TriggerEvent('apartments:client:setupSpawnUI', newData)
else
TriggerEvent('qbx_core:client:spawnNoApartments')
end
end

spawnDefault()
destroyPreviewCam()
return true
end
Expand Down Expand Up @@ -277,7 +286,12 @@ RegisterNuiCallback('playCharacter', function(data, cb)
SetNuiFocus(false, false)
DoScreenFadeOut(10)
lib.callback.await('bub-multichar:server:loadCharacter', false, data.citizenid)
spawnLastLocation()
if config.spawnlastlocation then
spawnLastLocation()
else
TriggerEvent('qb-spawn:client:setupSpawns', data.citizenid)
TriggerEvent('qb-spawn:client:openUI', true)
end
destroyPreviewCam()
cb(1)
end)
Expand Down
3 changes: 3 additions & 0 deletions config/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ return {
loadingModelsTimeout = 10000, -- Waiting time for ox_lib to load the models before throws an error, for low specs pc
defaultAllowedCharacters = 4, -- The amount of characters you can have in total

qbx_properties = true, -- used to ensure that you get a starting apartment from qbx_properties
spawnlastlocation = false, -- change to true if you ALWAYS want to spawn at last location

characters = {
locations = { -- Spawn locations for multichar, these are chosen randomly
{
Expand Down