diff --git a/[core]/es_extended/client/modules/actions.lua b/[core]/es_extended/client/modules/actions.lua index c021f350..de174910 100644 --- a/[core]/es_extended/client/modules/actions.lua +++ b/[core]/es_extended/client/modules/actions.lua @@ -33,13 +33,6 @@ function Actions:SetVehicleStatus() ESX.SetPlayerData("seat", self.seat) end -function Actions:TrackPedCoords() - local playerPed = ESX.PlayerData.ped - local coords = GetEntityCoords(playerPed) - - ESX.SetPlayerData("coords", coords) -end - function Actions:TrackPedCoordsOnce() CreateThread(function() while not ESX.IsPlayerLoaded() do @@ -49,7 +42,7 @@ function Actions:TrackPedCoordsOnce() ESX.PlayerData.coords = nil setmetatable(ESX.PlayerData, { - __index = function(self, key) + __index = function(_, key) if key ~= "coords" then return end @@ -215,7 +208,6 @@ end function Actions:SlowLoop() CreateThread(function() while ESX.PlayerLoaded do - -- self:TrackPedCoords() self:TrackPauseMenu() self:TrackVehicle() self:TrackWeapon() @@ -236,7 +228,7 @@ end function Actions:Init() self:SlowLoop() self:PedLoop() + self:TrackPedCoordsOnce() end Actions:Init() -Actions:TrackPedCoordsOnce()