InventoryBackup
Oxide plugin for Rust. Allows to save and restore players inventories
Plugin adds the ability to save and restore players inventories.
Permissions
inventorybackup.use-- Allows player to to save and restore players inventories
Configuration
{
"Storage duration (days)": -1.0,
"Clear inventories data on wipe": false,
"Logging enabled": false,
"Chat steamID icon": 0,
"Commands list": [
"invbackup"
]
}
Localization
{
"Error.Failed": "Operation failed!",
"Error.NoPermission": "You do not have permission to use this command!",
"Format.Prefix": "<color=#00FF00>[Inventory Backup]</color>: ",
"Info.Success": "Operation completed successfully!",
"Error.Syntax": "Syntax error occured!\n<color=#FFFF00>/{0} save <SteamID> <inventory name></color> - Save player inventory\n<color=#FFFF00>/{0} restore <SteamID> <inventory name></color> - Restore saved player inventory\n<color=#FFFF00>/{0} remove <SteamID> <inventory name></color> - Remove saved player inventory\n"
}
Developer API
InventorySave
Used to save player inventory.
bool InventorySave(ulong userID, string inventoryName)
- Example:
if (InventoryBackup != null && InventoryBackup.IsLoaded)
{
object resultCall = InventoryBackup.Call("InventorySave", player.userID, Name);
if (resultCall is bool && (bool)resultCall)
{
Puts("Inventory saved");
}
}
InventoryRestore
Used to restore player inventory. Use remove to remove saved inventory after restoration.
bool InventoryRestore(ulong userID, string inventoryName, bool remove = false)
- Example:
if (InventoryBackup != null && InventoryBackup.IsLoaded)
{
object resultCall = InventoryBackup.Call("InventoryRestore", player.userID, Name, true);
if (resultCall is bool && (bool)resultCall)
{
Puts("Inventory restored");
}
}
InventoryRemove
Used to remove player inventory.
bool InventoryRemove(ulong userID, string inventoryName)
- Example:
if (InventoryBackup != null && InventoryBackup.IsLoaded)
{
InventoryBackup.Call("InventoryRemove", player.userID, Name);
}
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

