mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 16:23:21 +00:00
fix(es_extended/imports): init metatable
This commit is contained in:
@@ -4,6 +4,10 @@ ESX.currentResourceName = GetCurrentResourceName()
|
|||||||
OnPlayerData = function (key, val, last) end
|
OnPlayerData = function (key, val, last) end
|
||||||
|
|
||||||
local function TrackPedCoordsOnce()
|
local function TrackPedCoordsOnce()
|
||||||
|
if not ESX or not ESX.PlayerData then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
ESX.PlayerData.coords = nil
|
ESX.PlayerData.coords = nil
|
||||||
|
|
||||||
setmetatable(ESX.PlayerData, {
|
setmetatable(ESX.PlayerData, {
|
||||||
@@ -37,6 +41,8 @@ if not IsDuplicityVersion() then -- Only register this event for the client
|
|||||||
TrackPedCoordsOnce()
|
TrackPedCoordsOnce()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
TrackPedCoordsOnce()
|
||||||
|
|
||||||
ESX.SecureNetEvent("esx:onPlayerLogout", function()
|
ESX.SecureNetEvent("esx:onPlayerLogout", function()
|
||||||
ESX.PlayerLoaded = false
|
ESX.PlayerLoaded = false
|
||||||
ESX.PlayerData = {}
|
ESX.PlayerData = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user