From 0278f26c177ed5a75bf9cf4ea0ec63f3a9559db5 Mon Sep 17 00:00:00 2001 From: Linden <65407488+thelindat@users.noreply.github.com> Date: Mon, 14 Feb 2022 18:20:22 +1100 Subject: [PATCH] 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. --- [esx]/es_extended/client/main.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/[esx]/es_extended/client/main.lua b/[esx]/es_extended/client/main.lua index cb34fec4..ba0774bb 100644 --- a/[esx]/es_extended/client/main.lua +++ b/[esx]/es_extended/client/main.lua @@ -6,6 +6,7 @@ CreateThread(function() if NetworkIsPlayerActive(PlayerId()) then exports.spawnmanager:setAutoSpawn(false) DoScreenFadeOut(0) + Wait(500) TriggerServerEvent('esx:onPlayerJoined') break end