ScriptHook: Script Config
From Nomad DB
You can store persistent data using the Script Config system. It allows reading and saving data to a user-options.json file, which is located in your ScriptHook: Script's folder.
Contents
Supported Types
- boolean
- number (float, integer, unsigned)
- string
Although saved as a JSON file, this system does not support nested objects nor arrays (yet).
Lua
- Script():SetConfigOption(name)
- Script():SetConfigOption(name, val)
Example
local script = Script()
script:SetConfigOption("hello", "world")
print(script:GetConfigOption("hello")) -- prints "world"