From 7c882b9f9420be28fa3e0aaada8e3119202d1467 Mon Sep 17 00:00:00 2001 From: Kenshin13 <63159154+Kenshiin13@users.noreply.github.com> Date: Mon, 23 Dec 2024 21:11:51 +0100 Subject: [PATCH] fix(client/main): wait for player to load before starting status thread --- client/main.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/main.lua b/client/main.lua index 0c1af18..945f58d 100644 --- a/client/main.lua +++ b/client/main.lua @@ -7,9 +7,12 @@ function HUD:SetHudColor() end function HUD:Start(xPlayer) + while not ESX.PlayerLoaded do Wait(0) end + if not xPlayer then xPlayer = ESX.GetPlayerData() end + self:SetHudColor() self:SlowThick() self:FastThick()