From 8852233a45525bd23166421bf9066633c37648ee Mon Sep 17 00:00:00 2001 From: renzuzu <82306584+renzuzu@users.noreply.github.com> Date: Wed, 15 Mar 2023 13:28:46 +0800 Subject: [PATCH] fix(client): remove esx sharedobject event --- client/function.lua | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/client/function.lua b/client/function.lua index 91f9cf9e..4dab31f2 100644 --- a/client/function.lua +++ b/client/function.lua @@ -764,16 +764,6 @@ end function Hud:Myinfo() if config.framework == 'ESX' then - TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) - while ESX == nil do - TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end) - Wait(0) - end - - while ESX.GetPlayerData().job == nil do - Wait(0) - end - ESX.PlayerData = ESX.GetPlayerData() xPlayer = ESX.PlayerData local money = 0 @@ -1012,7 +1002,7 @@ function Hud:SendNuiSeatBelt() if self.belt then DisableControlAction(1, 75, true) -- Disable exit vehicle when stop DisableControlAction(27, 75, true) -- Disable exit vehicle when Driving - end + end Wait(sleep) end Session[1],Session[2] = 0.0,0.0