https://github.com/monah-rasta/inventorybackup
Oxide plugin for Rust. Allows to save and restore players inventories
https://github.com/monah-rasta/inventorybackup
oxide plugin rust
Last synced: 3 months ago
JSON representation
Oxide plugin for Rust. Allows to save and restore players inventories
- Host: GitHub
- URL: https://github.com/monah-rasta/inventorybackup
- Owner: MONaH-Rasta
- Created: 2023-10-30T04:36:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-03T19:42:08.000Z (8 months ago)
- Last Synced: 2025-01-20T22:53:28.771Z (4 months ago)
- Topics: oxide, plugin, rust
- Language: C#
- Homepage: https://umod.org/plugins/inventory-backup
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# InventoryBackup
Oxide plugin for Rust. Allows to save and restore players inventoriesPlugin adds the ability to save and restore players inventories.
## Permissions
* `inventorybackup.use` -- Allows player to to save and restore players inventories
## Configuration
```json
{
"Storage duration (days)": -1.0,
"Clear inventories data on wipe": false,
"Logging enabled": false,
"Chat steamID icon": 0,
"Commands list": [
"invbackup"
]
}
```## Localization
```json
{
"Error.Failed": "Operation failed!",
"Error.NoPermission": "You do not have permission to use this command!",
"Format.Prefix": "[Inventory Backup]: ",
"Info.Success": "Operation completed successfully!",
"Error.Syntax": "Syntax error occured!\n/{0} save - Save player inventory\n/{0} restore - Restore saved player inventory\n/{0} remove - Remove saved player inventory\n"
}
```## Developer API
### InventorySave
Used to save player inventory.
```csharp
bool InventorySave(ulong userID, string inventoryName)
```* **Example**:
```csharp
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.
```csharp
bool InventoryRestore(ulong userID, string inventoryName, bool remove = false)
```* **Example**:
```csharp
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.
```csharp
bool InventoryRemove(ulong userID, string inventoryName)
```* **Example**:
```csharp
if (InventoryBackup != null && InventoryBackup.IsLoaded)
{
InventoryBackup.Call("InventoryRemove", player.userID, Name);
}
```