Storage.data: Difference between revisions
(Created page for storage.data) |
(fixed) |
||
| Line 10: | Line 10: | ||
mp.storage.data.auth = { token: "abcd" }; | mp.storage.data.auth = { token: "abcd" }; | ||
mp.storage.flush(); | mp.storage.flush(); | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==See also== | ==See also== | ||
[[Category:Clientside API]] | [[Category:Clientside API]] | ||
Revision as of 22:28, 10 September 2019
Used to set some client-related data. Saved on the client, see storage.flush() for more details.
Data is saved in <path to RAGEMP>/client_resources/<server ip>/.storage
Thus it is wiped when player deletes client folder.
Syntax
storage.data.someKey = obj;
Example
mp.storage.data.auth = { token: "abcd" };
mp.storage.flush();