mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-16 21:46:03 +01:00
Start of ND 2.0
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user