fix(esx/client): delay esx:onPlayerJoined event

Race conditions were introduced due to a mix of FiveM's updated scheduling and the swap to oxmysql responding faster than the client can load.

This should alleviate the issue, though a more solid solution should be found.
This commit is contained in:
Linden
2022-02-14 18:20:22 +11:00
parent 843f395253
commit 0278f26c17
+1
View File
@@ -6,6 +6,7 @@ CreateThread(function()
if NetworkIsPlayerActive(PlayerId()) then
exports.spawnmanager:setAutoSpawn(false)
DoScreenFadeOut(0)
Wait(500)
TriggerServerEvent('esx:onPlayerJoined')
break
end