From 29006870c3e9d696fe5ec5aa1af86ea237aad98a Mon Sep 17 00:00:00 2001 From: Andyyy7666 <86536434+Andyyy7666@users.noreply.github.com> Date: Sat, 23 Dec 2023 23:47:24 +0100 Subject: [PATCH] feat: getConfig function --- client/functions.lua | 7 +++++++ server/functions.lua | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/client/functions.lua b/client/functions.lua index be8d39f..e76a3b6 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -26,6 +26,13 @@ function NDCore.getPlayersFromCoords(distance, coords) return closePlayers end +function NDCore.getConfig(info) + if not info then + return Config + end + return Config[info] +end + function NDCore.revivePlayer(reset, keepDead) local usingAmbulance = GetResourceState("ND_Ambulance") == "started" if not keepDead then diff --git a/server/functions.lua b/server/functions.lua index 77dda58..cb79941 100644 --- a/server/functions.lua +++ b/server/functions.lua @@ -34,6 +34,13 @@ function NDCore.getPlayerServerInfo(source) return PlayersInfo[source] end +function NDCore.getConfig(info) + if not info then + return Config + end + return Config[info] +end + ---@param fileLocation string|tabale ---@return boolean function NDCore.loadSQL(fileLocation, resource)