mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-17 05:56:01 +01:00
Rename ND_Core/server/main.lua to server/main.lua
This commit is contained in:
24
server/main.lua
Normal file
24
server/main.lua
Normal file
@@ -0,0 +1,24 @@
|
||||
-- For support join my discord: https://discord.gg/Z9Mxu72zZ6
|
||||
|
||||
NDCore = {}
|
||||
NDCore.Players = {}
|
||||
NDCore.Functions = {}
|
||||
NDCore.Config = config
|
||||
|
||||
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)
|
||||
Reference in New Issue
Block a user