I have seen these plugins that skin your items that use a container to hold the items being skinned. My question is how do they do the whole make and access a box thing? I have been looking at the Skins plugin by misticos and I came up with this:
[ChatCommand("test")]
void testcommand(BasePlayer player, string command, string[] args) {
ItemContainer itemcont = new ItemContainer {
entityOwner = player,
capacity = 36,
isServer = true,
allowedContents = ItemContainer.ContentsType.Generic
};
itemcont.GiveUID();
timer.Once(0.5 f, () => test(player, itemcont));
}
public void test(BasePlayer Owner, ItemContainer container) {
var loot = Owner.inventory.loot;
loot.Clear();
loot.PositionChecks = false;
loot.entitySource = Owner;
loot.itemSource = null;
loot.AddContainer(container);
loot.SendImmediate();
Owner.ClientRPCPlayer(null, Owner, "RPC_OpenLootPanel", "generic");
}This briefly opens a container and fires the OnPlayerLootEnd event but it disappears after that. Any help and suggestions would be much appreciated.