1. I am working on a simple Loadout plugin for my server and everything is going well apart from the containerBelt.

    Code:
    item.MoveToContainer(player.inventory.containerBelt, -1, true);
    Above is the line of code being used it works for the first 5 items then the 6th one just does not get added to the player.

    Any help would be much appreciated.
     
  2. After further looking into this it seems the containerBelt is full after adding 5 items but it should be able to have 6.
    Once in game you can place something in the empty slot.

    Code:
    player.inventory.Strip();//Imagine for loop adding six items with the line below
    item.MoveToContainer(player.inventory.containerBelt, -1, true);
     
  3. Wulf

    Wulf Community Admin

    0, 1, 2, 3, 4, 5

    Are you starting with 0 or 1?
     
  4. Solved,

    For some reason player.inventory.strip() was leaving a ghost item of the rock or something.

    Used the lines below instead of player.inventory.strip()

    Code:
    player.inventory.containerBelt.GetSlot(0).RemoveFromContainer();          
    player.inventory.containerBelt.GetSlot(1).RemoveFromContainer();