Storage.flush(): Difference between revisions
mNo edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
Flushes [[storage.data]]. It isn't neccessary to flush it after every change since it will be flushed on disconnect, but recommended. | Flushes [[storage.data]]. It isn't neccessary to flush it after every change since it will be flushed on disconnect, but recommended. | ||
<br />Data is saved in <path to RAGEMP>/client_resources/<server ip>.storage | <br />Data is saved in <path to RAGEMP>/client_resources/<server ip>/.storage | ||
==Syntax== | ==Syntax== | ||
<syntaxhighlight lang="javascript">storage.flush();</syntaxhighlight> | <syntaxhighlight lang="javascript">storage.flush();</syntaxhighlight> | ||
Revision as of 19:17, 5 April 2019
Flushes storage.data. It isn't neccessary to flush it after every change since it will be flushed on disconnect, but recommended.
Data is saved in <path to RAGEMP>/client_resources/<server ip>/.storage
Syntax
storage.flush();
Example
mp.storage.data.auth = { token: "abcd" };
mp.storage.flush();