1. When I use CanEquipItem hook i try:

    Code:
     void CanEquipItem(PlayerInventory inventory, Item item)
    {
            item.MoveToContainer(inventory.containerMain);
               
    }
    And this don't work.
    But when i use this:

    Code:
    [ChatCommand("testm")]
            void AddressCommand(BasePlayer player, string command, string[] args)
            {
                player.inventory.containerBelt.GetSlot(1).MoveToContainer(player.inventory.containerMain);
            }
    this work fine.
     
  2. You probably misusing hook CanEquipItem.
    Possible situation: Hook being called when Rust are checking if item can be equipped.
    You are moving it to different container and when check ends rust moves item to the appropriate slot.

    Possible solution: Override behavior of CanEquipItem by returning bool value.
     
  3. @VVoid is correct - you are not using the CanEquipItem hook quite right. This hook is called before the item is moved to any inventory, and should have a return type of object, not void. Then if you're looking to prevent an item from being equipped into the belt, then all you have to do is return false (after checking for said item/inventory) and the item will not be moved to the belt.
     
  4. Essentially do what you where doing

    But like so
    Code:
    private object CanEquipItem(PlayerInventory inventory, Item item)
    {
        // Run your code here    return false; // to bypass the default move
    }