Start of ND 2.0

This commit is contained in:
Andyyy7666
2023-07-09 03:07:46 +02:00
parent 7a5f26834e
commit f4846617a3
14 changed files with 271 additions and 1266 deletions

View File

@@ -1,21 +1,14 @@
-- For support join my discord: https://discord.gg/Z9Mxu72zZ6
ActivePlayers = {}
NDCore = {}
NDCore.Players = {}
NDCore.Functions = {}
NDCore.Commands = {}
NDCore.PlayersDiscordInfo = {}
NDCore.Config = config
function GetCoreObject()
return NDCore
function NDCore.getPlayer(src)
return ActivePlayers[src]
end
isResourceStarted("ox_inventory", function(started)
if not started then return end
SetConvarReplicated("inventory:framework", "nd")
AddEventHandler("playerDropped", function()
local src = source
local char = ActivePlayers[src]
if not char then return end
char:unload()
end)
for _, roleid in pairs(config.adminRoles) do
ExecuteCommand("add_principal identifier.discord:" .. roleid .. " group.admin")
end
SetConvarServerInfo("ND_Core", GetResourceMetadata(GetCurrentResourceName(), "version", 0) or "invalid")