Take item from first slot C#
Discussion in 'Rust Development' started by Ken_Alcapone, Oct 4, 2015.
-
By first slot Im going to assume you mean from the hotbar if not you can change out containerBelt for containerMain or containerWear
GetSlot(0) returns the item in slot 0 (the first slot) GetSlot(1) would be the next item and so on...
It would be something like this... not sure if the Remove first slot item line is correct but should point you in the right direction.
Code://First slot item to vars Item TheItem = baseplayer.inventory.containerBelt.GetSlot(0); string ItemName = TheItem.info.name; int ItemID = TheItem.info.itemid; int ItemAmount = TheItem.amount; //Remove first slot item baseplayer.inventory.containerBelt.Take(new System.Collections.Generic.List<Item> { }, ItemID, ItemAmount); -
Thank you! you sent me in the right direction =)
