I've been trying to clear either main, wear or belt and not the whole inventory.
I used
But I am now unable to move items to my belt and wear inventory - even after suiciding and reconnecting.Code:player.inventory.containerBelt:Kill()
Is there any way to reset my character/inventory without deleting anything but my own player data?
I THINK I saw @Mughisi mention a fix for this once, but I wasn't able to find it while searching.
Thanks in advance.
Inventory broken after using :Kill()
Discussion in 'Rust Development' started by mvrb, Oct 15, 2015.
-
Calytic Community Admin Community Mod
This is the C# used to initialize the containerBelt in PlayerInventory.Initialize().
You can use this code below.
Or you can attempt to simply re-initialize your inventory (also C#)..Code:player.inventory.containerBelt = new ItemContainer(); player.inventory.containerBelt.SetFlag(ItemContainer.Flag.IsPlayer, true); player.inventory.containerBelt.SetFlag(ItemContainer.Flag.Belt, true);
[DOUBLEPOST=1444919737][/DOUBLEPOST]Looking into player.inventory.Strip(), the following code is used to clean out the beltCode:player.inventory.ServerInit(player)
You may or may not need the DoRemoves call, I don't know.Code:this.containerBelt.Clear(); ItemManager.DoRemoves();
-
I was able to fix my inventory using:
Thank you very much!Code:player.inventory.ServerIplayer.inventory.ServerInit(player)nit(player)
