fix(esx): Disable autospawning

- Fixes compatibility for players running basic-gamemode or maps
This commit is contained in:
Linden
2021-06-28 16:35:08 +10:00
parent bb581f9b6c
commit a17b44b1e7
+8 -5
View File
@@ -1,11 +1,14 @@
local pickups = {}
Citizen.CreateThread(function()
while NetworkIsPlayerActive(PlayerId()) and not Config.Multichar do
Citizen.Wait(5)
DoScreenFadeOut(0)
TriggerServerEvent('esx:onPlayerJoined')
break
while not Config.Multichar do
Citizen.Wait(0)
if NetworkIsPlayerActive(PlayerId()) then
exports.spawnmanager:setAutoSpawn(false)
DoScreenFadeOut(0)
TriggerServerEvent('esx:onPlayerJoined')
break
end
end
end)