Files
ND_Core/server/main.lua

33 lines
987 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)
2022-11-14 00:53:37 +01:00
2022-11-19 18:28:57 +01:00
AddEventHandler("onResourceStart", function(resourceName)
Wait(3000)
if resourceName ~= "ox_inventory" then return end
SetConvarReplicated("inventory:framework", "nd")
end)
if GetResourceState("ox_inventory") == "started" then
2022-11-14 00:53:37 +01:00
SetConvarReplicated("inventory:framework", "nd")
end