ScriptHook: Script Config
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.
- number (float, integer, unsigned)
Although saved as a JSON file, this system does not support nested objects nor arrays (yet).
- Script():SetConfigOption(name, val)
local script = Script() script:SetConfigOption("hello", "world") print(script:GetConfigOption("hello")) -- prints "world"