From 4bb446da947eb18b2c0a46e212f7db9ae74bfa29 Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Sun, 22 Dec 2024 23:37:27 +0100 Subject: [PATCH] fix(client/main): remove manually setting ESX.PlayerLoaded The import does that for us already. --- client/main.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/main.lua b/client/main.lua index d855b47..a09c8ca 100644 --- a/client/main.lua +++ b/client/main.lua @@ -46,7 +46,6 @@ AddEventHandler('esx_status:unregisterStatus', function(name) end) RegisterNetEvent('esx:onPlayerLogout', function() - ESX.PlayerLoaded = false Status = {} if Config.Display then SendNUIMessage({ @@ -57,8 +56,9 @@ RegisterNetEvent('esx:onPlayerLogout', function() end) RegisterNetEvent('esx_status:load', function(status) + while not ESX.PlayerLoaded do Wait(0) end + OriginalStatus = status - ESX.PlayerLoaded = true TriggerEvent('esx_status:loaded') if Config.Display then TriggerEvent('esx_status:setDisplay', 0.5) end