Module cl_configs

Config Module

Functions

SetConfig (addon, value) SetConfig function.
GetConfig (addon) GetConfig function.
CheckConfig (addon, config) CheckConfig function.


Functions

SetConfig (addon, value)
SetConfig function. This function sets the config of an addon.

Parameters:

  • addon The addon. string
  • value The value. table

Usage:

    exports.jones_util:SetConfig("addon", { ["key"] = "value" })
GetConfig (addon)
GetConfig function. This function returns the config of an addon.

Parameters:

  • addon The addon. string

Returns:

    table

Usage:

    local config = exports.jones_util:GetConfig("addon")
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",
    			},
    		}
    })
generated by LDoc 1.5.0 Last updated 2024-05-13 19:05:24