mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:08:54 +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
|
||||
|
||||
local function TrackPedCoordsOnce()
|
||||
if not ESX or not ESX.PlayerData then
|
||||
return
|
||||
end
|
||||
|
||||
ESX.PlayerData.coords = nil
|
||||
|
||||
setmetatable(ESX.PlayerData, {
|
||||
@@ -37,6 +41,8 @@ if not IsDuplicityVersion() then -- Only register this event for the client
|
||||
TrackPedCoordsOnce()
|
||||
end)
|
||||
|
||||
TrackPedCoordsOnce()
|
||||
|
||||
ESX.SecureNetEvent("esx:onPlayerLogout", function()
|
||||
ESX.PlayerLoaded = false
|
||||
ESX.PlayerData = {}
|
||||
|
||||
Reference in New Issue
Block a user