Skip to content

Commit

Permalink
fix: race condition on load on 'Status' table
Browse files Browse the repository at this point in the history
  • Loading branch information
curtfh authored Sep 29, 2023
1 parent 4084b65 commit 400ac94
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ RegisterNetEvent('esx_status:load')
AddEventHandler('esx_status:load', function(status)
ESX.PlayerLoaded = true
TriggerEvent('esx_status:loaded')

:: check_status_table ::
if #Status == 0 then
Citizen.Wait(1000)
goto check_status_table
end

for i=1, #Status, 1 do
for j=1, #status, 1 do
if Status[i].name == status[j].name then
Expand Down

0 comments on commit 400ac94

Please sign in to comment.