Module sv_configs
Config System
Functions
| SetConfig (addon, value) | SetConfig function. |
| GetConfig (addon) | GetConfig function. |
| CheckConfig (addon, config) | CheckConfig function. |
Functions
- SetConfig (addon, value)
-
SetConfig function.
This function sets a config value to a addon.
Parameters:
- addon The addon name. string
- value The config value. table
Usage:
exports.jones_util:SetConfig("jones_util", {test = true})
- GetConfig (addon)
-
GetConfig function.
This function gets a config value from a addon.
Parameters:
- addon The addon name. string
Returns:
-
table
Usage:
local config = exports.jones_util:GetConfig("jones_util")
- CheckConfig (addon, config)
-
CheckConfig function.
This function checks if the given config is correct.
Parameters:
- addon The addon name. string
- config table with the values as types. table
Returns:
-
boolean
Usage:
local correct = exports.jones_util:CheckConfig("jones_util", { drugs = { ["weed"] = { ["name"] = "string", ["price"] = "number", }, } })