UNPKG

rock-mod

Version:

Rock-Mod is a powerful framework designed for creating and managing mods for Grand Theft Auto (GTA) games.

21 lines (20 loc) 543 B
export class RageStorageManager { getData(key) { const value = mp.storage.data[key]; return value !== null && value !== void 0 ? value : null; } setData(key, value) { mp.storage.data[key] = value; } removeData(key) { delete mp.storage.data[key]; } clearData(prefix) { const keys = Object.keys(mp.storage.data); keys.forEach((key) => { if (!prefix || key.startsWith(prefix)) { delete mp.storage.data[key]; } }); } }