Storage.flush(): Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
No edit summary
Line 4: Line 4:
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
mp.storage.data.auth = {"login": "testplayer", "password": "qwerty" };
mp.storage.data.auth = { "login": "testplayer", "password": "qwerty" };
mp.storage.flush();  
mp.storage.flush();  
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
[[Category:Clientside API]]
[[Category:Clientside API]]

Revision as of 17:41, 22 August 2017

Flushes storage.data. It isn't neccessary to flush it after every change since it will be flushed on disconnect, but recommended.

Syntax

storage.flush();

Example

mp.storage.data.auth = { "login": "testplayer", "password": "qwerty" };
mp.storage.flush();

See also