diff --git a/[core]/es_extended/imports.lua b/[core]/es_extended/imports.lua index 91d5f887..46a79f93 100644 --- a/[core]/es_extended/imports.lua +++ b/[core]/es_extended/imports.lua @@ -20,8 +20,13 @@ local function TrackPedCoordsOnce() end if not IsDuplicityVersion() then -- Only register this event for the client - -- On Resource Start - local OnStart = (function() + -- On Resource Restarts + local OnResourceRestart = (function() + if not ESX.PlayerLoaded or not ESX.PlayerData then + -- Player hasn't loaded yet + return + end + TrackPedCoordsOnce() end)()