From f74b15db88961847bc7f3169453bf633c8334f63 Mon Sep 17 00:00:00 2001 From: 0xDEMXN <15928886+0xDEMXN@users.noreply.github.com> Date: Sat, 19 Feb 2022 17:31:07 +0100 Subject: [PATCH] fix: wait for nui to load properly --- client.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/client.lua b/client.lua index abbfc55..9c11cea 100644 --- a/client.lua +++ b/client.lua @@ -122,6 +122,9 @@ end) AddEventHandler('onResourceStart', function(resourceName) if (resourceName == GetCurrentResourceName()) then - if ESX.PlayerLoaded then InitHUD() end + if ESX.PlayerLoaded then + Citizen.Wait(50) + InitHUD() + end end end) \ No newline at end of file