Skip to content

Commit

Permalink
fix(client/main): remove manually setting ESX.PlayerLoaded
Browse files Browse the repository at this point in the history
The import does that for us already.
  • Loading branch information
Kenshiin13 committed Dec 22, 2024
1 parent 2d83d70 commit 4bb446d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ AddEventHandler('esx_status:unregisterStatus', function(name)
end)

RegisterNetEvent('esx:onPlayerLogout', function()
ESX.PlayerLoaded = false
Status = {}
if Config.Display then
SendNUIMessage({
Expand All @@ -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
Expand Down

0 comments on commit 4bb446d

Please sign in to comment.