mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 16:23:21 +00:00
Add ESX.GetConfig optional parameter
This commit is contained in:
@@ -28,9 +28,10 @@ function ESX.GetRandomString(length)
|
|||||||
return length > 0 and ESX.GetRandomString(length - 1) .. Charset[math.random(1, #Charset)] or ""
|
return length > 0 and ESX.GetRandomString(length - 1) .. Charset[math.random(1, #Charset)] or ""
|
||||||
end
|
end
|
||||||
|
|
||||||
---@return table
|
---@param key? string Key pair to get specific value of config
|
||||||
function ESX.GetConfig()
|
---@return unknown: Returns the whole config if no key is passed, or a specific value
|
||||||
return Config
|
function ESX.GetConfig(key)
|
||||||
|
return key and Config[key] or Config
|
||||||
end
|
end
|
||||||
|
|
||||||
---@param weaponName string
|
---@param weaponName string
|
||||||
|
|||||||
Reference in New Issue
Block a user