Files
ND_Core/server/main.lua

35 lines
1022 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 = {}
2022-11-30 03:32:52 +01:00
NDCore.Commands = {}
NDCore.PlayersDiscordInfo = {}
2022-07-16 00:12:02 -04:00
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-12-02 21:49:18 +01:00
isResourceStarted("ox_inventory", function(started)
if not started then return end
2022-11-19 18:28:57 +01:00
SetConvarReplicated("inventory:framework", "nd")
end)
2022-11-30 03:32:52 +01:00
for _, roleid in pairs(config.adminRoles) do
ExecuteCommand("add_principal identifier.discord:" .. roleid .. " group.admin")
2022-11-14 00:53:37 +01:00
end