Setting
Allows the creation, updating and reading of persistent settings
Functions
impulse.DefineSetting(name, settingData)
View source »Defines a new setting for use - only call this inside the DefineSettings hook
Parameters
-
name
string
Setting class name
-
settingData
A table containg setting data (see below)
See Also
impulse.LoadSettings()
Internal
This is an internal function! You are able to use it, but you risk unintended side effects if used incorrectly.
Loads the settings from the clientside database
impulse.SetSetting(name, value)
View source »Sets a setting to a specified value
Parameters
-
name
string
Setting class name
-
value
New value
Tables
SettingData
View source »A collection of data that defines how a setting will behave
Fields
-
name
string
The pretty name for the setting (we'll see this in the settings menu)
-
category
string
The category the setting will belong to
-
type
string
tickbox, dropdown, slider, plainint
-
default
The default value of the setting
-
minValue
int
optional
Minimum value (slider only)
-
maxValue
int
optional
Maximum value (slider only)
-
options
A table of string options (dropdown only)
-
onChanged
function
optional
Called when setting is changed