Files
ND_Core/server/main.lua

25 lines
691 B
Lua
Raw Normal View History

-- For support join my discord: https://discord.gg/Z9Mxu72zZ6
NDCore = {}
2022-07-16 00:12:02 -04:00
NDCore.Players = {}
NDCore.Functions = {}
NDCore.Config = config
function GetCoreObject()
return NDCore
2022-08-09 00:53:35 +02:00
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)
2022-08-09 00:53:35 +02:00
end
end
end
end)