Merge pull request #1667 from Zykem/getconfig-single-value-2

Add ESX.GetConfig optional parameter
This commit is contained in:
Kenshin13
2025-07-06 16:23:49 +02:00
committed by GitHub
+4 -3
View File
@@ -28,9 +28,10 @@ function ESX.GetRandomString(length)
return length > 0 and ESX.GetRandomString(length - 1) .. Charset[math.random(1, #Charset)] or ""
end
---@return table
function ESX.GetConfig()
return Config
---@param key? string Key pair to get specific value of config
---@return unknown Returns the whole config if no key is passed, or a specific value
function ESX.GetConfig(key)
return key and Config[key] or Config
end
---@param weaponName string