mp.storage
Data that survives restarts: for the gamemode and per player (Open Road MP account). Plain JSON files in <gamemode>/data/.
get
mp.storage.get(key: string): StorageValue | undefinedA value of this gamemode's storage (kept in <gamemode>/data/storage.json, survives restarts).
Types: StorageValue
set
mp.storage.set(key: string, value: StorageValue | undefined): voidSaves a value (undefined deletes it). Written to disk within a second.
Types: StorageValue
delete
mp.storage.delete(key: string): voidDeletes a value.
keys
mp.storage.keys(): string[]All keys of the gamemode's storage.
player
mp.storage.player(player: PlayerRef): StoreThe player's own storage, by their Open Road MP account: the same data whenever they come back, under any name.
Types: Store