SetStorageValue

From Onset Developer Wiki
Revision as of 18:09, 21 January 2021 by BlueMountains (talk | contribs) (Created page with "{{Info|Function|Client|1.4.2}} {{FuncDescription|Can be used to save a variable/value on the client. Useful for some settings. Values can be retrieved with GetStorageValue...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
SetStorageValue

Type: Function
Context: Client
Introduced: v1.4.2

Description

Can be used to save a variable/value on the client. Useful for some settings.

Values can be retrieved with GetStorageValue.

Syntax

SetStorageValue(key, value)

Parameters

  • key
    The name of this value.
  • value
    The value to save, can be int, float, string and bool

Return Value

  • Returns true on success.

Example

SetStorageValue("var_str", "Some long string variable")
SetStorageValue("var_int", 1337)
SetStorageValue("var_float", 3.1415)
SetStorageValue("var_bool", true)

See also