Also I found a similar bug with restoring inventory after death.
Since IG.Data.RestoreOnce[playerID] may be true after server wipe or something else then we need to delete this flag.
I added IG.Data.RestoreOnce[playerID] = nil (line 761) for myself. Now it works fine.Code:… Line 759: if self.Config.Settings.RestoreUponDeath then Line 760: -- Save player inventory Line 761: IG.Data.RestoreOnce[playerID] = nil Line 762: IG:ClearSavedInventory(playerID) Line 763: else …
Or have I missed something and inventory just saves w/o restoring?

Inventory Guardian
Restore players inventory even after server wipe
Total Downloads: 3,604 - First Release: Jan 12, 2015 - Last Update: Feb 4, 2017
- 5/5, 19 likes
-
NexusBR updated Inventory Guardian with a new update entry:
Fixed restore upon death, Improved chat messages
-
I think corpses should be empty (after saving of course) if AutoRestore and RestoreUponDeath are true.
function PLUGIN:OnEntityDeath(entity)
-- Convert entity to player
local player = entity:ToPlayer()
-- Check if entity is a player
if player then
-- Grab the player his/her SteamID.
local playerID = rust.UserIDFromPlayer( player )
-- Add playerID to player death list
IG.PlayerDeaths[playerID] = true
-- Check if the Restore upon death is enabled
if self.Config.Settings.RestoreUponDeath then
-- Save player inventory
IG:SavePlayerInventory(player)
player.inventory:Strip()
else
-- Reset saved inventory
IG:ClearSavedInventory(playerID)
end
end
end After typing /ig.save or /ig.restore on players I got this:
-
NexusBR updated Inventory Guardian with a new update entry:
Minor fix on /ig.save and /ig.restore when using other plys
[DOUBLEPOST=1423067620][/DOUBLEPOST]
We should not break the lore/fun from Rust, If we strip the dead players body from all the items we will keep other players from getting the player loot.
Anyways by default Restore Upon Death is disabled. -
I have an idea, do you think you will add something like a blueprint support? I mean when someone learn a blueprint, the blueprint is save, and when the player log after a WIPE, he types like /blueprint and it gives him blueprint he learnt ? or /blueprint <name> ?
Nice day! (Sorry for poor english) -
-
So even if the server owner wipe the whole save map folder, Blueprints are saved.
But i think Rust blueprints could be saved on one global server like Team Fortress 2 Item Manager or DotA 2 Item Manager servers.
But garry is too lazy to do that. -
Oh that's nice! thanks for reply!
-
Wulf Community Admin
Temporary build compatible with Oxide builds 266+.
Attached Files:
-
-
NexusBR updated Inventory Guardian with a new update entry:
Small code rewrite, and fixed to 266+
-
We are getting errors when restoring inventories since the 26th Feb updates.
-
-
Hey guys, thanks for the great plugin.
I'm trying to modify this to allow me to send commands from the console to delete the inventory of a player. Specifically I cannot connect to my server because my inventory is messed up. Any suggestions? Thanks! -
-
Fantastic, thanks! I got close but haven't been able to figure out exactly how to direct arguments into the function. Let me know if I can help in any way!
-
[DOUBLEPOST=1425153308][/DOUBLEPOST]I'm implement item health save and BP save feature on Inventory Guardian now.
And fixed /ig.strip giving error.
I'll publish soon i done implementing and test. -
My Players now jumping from their House into dead. Inventory Guardian restores their Inventory. Then they loot the dead Body and have doubled the Inventory
-
Or you are using a very old version of Inventory Guardian...
[DOUBLEPOST=1425161636][/DOUBLEPOST]And if you want you can wipe all the saved inventory IF you are using an updated version by running ig.deleteall on console you can wipe all the saved players inventories.
So next time they kill themselves they will have nothing if you disabled restore Upon Death.
Last edited by a moderator: Mar 1, 2015 -
NexusBR updated Inventory Guardian with a new update entry:
Lots of improvements.
-