sami37 submitted a new resource:
ItemSplitter - ItemSplitter allow you to easily split your items from your main inventory.
Read more about this resource...
ItemSplitter
ItemSplitter allow you to easily split your items from your main inventory.
Total Downloads: 269 - First Release: Jul 22, 2017 - Last Update: Aug 4, 2017
- 5/5, 1 like
-
sami37 updated ItemSplitter with a new update entry:
1.0.0
-
What is the point of this plugin if we can split items using middle mouse button?
-
-
Also - why so? -
you probably didn't try to split a 1b wood stack..., on a 1b stack it just split 50k then 34k then lower and lower again and again
-
Why the hell players would have such stacks..... stacksize 100000 is more then enought....
As an admin I use to have stacks 100000000 and after spliiting such stack I'm just getting max stack size, so there is still no problem. Having higher stack size seems usless for me =) -
put your stack at 150k and you'll see the result, anyway it's usefull for high server rate
-
Ok, I got the reason. I may not agree, but who am I to judge?
Anyway - the question is still here - why drop? Can't you at least try to put it back into the inventory?
Why can't you use BasePlayer.GiveItem(Item item, BaseEntity.GiveItemReason reason = BaseEntity.GiveItemReason.Generic) ?
It will drop the item if it's impossible to give to(full inv for example)
Or, if you prefer to do everything on your own you can use this code:
Code:var moved = createdItem.MoveToContainer(player.inventory.containerBelt,-1,false) || createdItem.MoveToContainer(player.inventory.containerWear,-1,false) || createdItem.MoveToContainer(player.inventory.containerMain,-1,false); if(!moved) createdItem.Drop(player.eyes.position, player.eyes.BodyForward() * 2f);
But you can use the code I gave - false at the end of the MoveToContainer will prevent items stacking -
sami37 updated ItemSplitter with a new update entry:
1.1.0
-
=3
You are welcome =)
Also - update the description) -
Can you make it to split 3 stacks of the same size (or close enough?) spliting 3 ways is something i always need to do