1. Hey. So what i'm trying to do is prevent certain items being moved using the CanMoveItem. It works the way I want, but you can still move the items using other items. Like if you drag a boonie hat over a hoodie, the hoodie which is blocked will get moved. If anyone has a alternative i would grately appreciate it if you posted. Thanks.
     
  2. straight stupid way to break:
    Code:
    object CanWearItem(PlayerInventory inventory, Item item)
            {
                string name = item.info.displayName.english;
                if (name == "Hide Halterneck" || name.Contains("Snow Jacket") || name == "Bone Armor" || name == "Burlap Shirt" || name == "Hazmat Suit" || name == "Heavy Plate Jacket" || name == "Shirt" || name == "Longsleeve T-Shirt" || (name == "Hoodie" && !item.IsLocked()) || name == "T-Shirt" || name == "Tank Top" || name == "Hide Vest")
                    return false;
                return null;
            }
    Also you can block wearing exactly slot, instead of blocking each item of type
     
  3. Code:
    bool CanPlayerWearItem(BasePlayer player, Item item) {
          return(item.CanMoveTo(player.inventory.containerWear));
    }
    
     
  4. Also i dont think you got what i meant @HOUGAN_Y , read the top again
     
  5. CanWearItem is pefect work, cause i had plugin that shoult give red hoodie that u cant swap, and CanWearItem that return false at each of hoodie slot items worked good.
     
  6. No. I have a list of items you cant move but you can when you use something you CAN move by dragging it over it, itll move to the moveable items slot. ;)
     
  7. Try to check what is in the target slot, and if it's in your list of prohibited items, return false.