perf: updating last location

This commit is contained in:
Andyyy7666
2023-01-05 17:05:50 +01:00
parent 906383bbd9
commit 5242cf289d
2 changed files with 3 additions and 15 deletions

View File

@@ -11,20 +11,6 @@ function GetCoreObject()
return NDCore
end
CreateThread(function()
while true do
Wait(30000)
for player, playerInfo in pairs(NDCore.Players) do
local ped = GetPlayerPed(player)
if DoesEntityExist(ped) then
local lastLocation = GetEntityCoords(ped)
playerInfo.lastLocation = {x = lastLocation.x, y = lastLocation.y, z = lastLocation.z}
TriggerClientEvent("ND:updateLastLocation", player, playerInfo.lastLocation)
end
end
end
end)
isResourceStarted("ox_inventory", function(started)
if not started then return end
SetConvarReplicated("inventory:framework", "nd")