When I returned the player items from a variable, they become unusableCode:Item[] Items = player.inventory.AllItems(); player.inventory.Strip();foreach(Item item in Items) { player.inventory.GiveItem(item); }
Solved Problem with giving items
Discussion in 'Rust Development' started by SwipoStyle, Nov 9, 2015.
-
Perhaps try (note: I am unable to test this for you at the moment but the code should work, its a matter of do the items work):
Code:Item[] Items = player.inventory.AllItems(); player.inventory.Strip();foreach (Item item in Items) { Item copy = ItemManager.CreateByItemID(item.info.itemid, item.amount, item.IsBlueprint()); player.GiveItem(copy); }
-