1. How to get that dressed player at the moment?
     
  2. Something like..
    Code:
    foreach(Item item in player.inventory.containerWear.ToList())
    {
    // Do stuff
    }
    
     
  3. Thanks.But how do I get one that is: Head \ torso \ legs \ shoes \ vest ?
     
  4. I suggest reading the source code and learning to use a decompiler.
    This is used to check whether a player can wear a certain item:
    Code:
    private bool CanWearItem(Item item)
    {
    if (item.IsBlueprint())
    {
        return false;
    }
    ItemModWearable component = item.info.GetComponent<ItemModWearable>();
    if (component == null)
    {
        return false;
    }
    Item[] array = this.containerWear.itemList.ToArray();
    for (int i = 0; i < array.Length; i++)
    {
        Item item2 = array[i];
        if (item2 != item)
        {
            ItemModWearable component2 = item2.info.GetComponent<ItemModWearable>();
            if (!(component2 == null))
            {
                if (!component.CanExistWith(component2) && !item2.MoveToContainer(this.containerMain, -1, true))
                {
                    item2.Drop(base.baseEntity.eyes.position, base.baseEntity.eyes.BodyForward() * 2f, default(Quaternion));
                }
            }
        }
    }
    object obj = Interface.CallHook("CanWearItem", new object[]
    {
        this,
        item
    });
    return !(obj is bool) || (bool)obj;
    }
    Let's follow the tracks of ItemModWearable, which contains the following code:
    Code:
    private bool IsHeadgear()
    {
    Wearable component = this.entityPrefab.Get().GetComponent<Wearable>();
    return component != null && (component.occupationOver & (Wearable.OccupationSlots.HeadTop | Wearable.OccupationSlots.Face | Wearable.OccupationSlots.HeadBack)) != (Wearable.OccupationSlots)0;
    }
    
    Wearable.OccupationSlots looks like what we need:
    Code:
    public enum OccupationSlots
    {
    HeadTop = 1,
    Face = 2,
    HeadBack = 4,
    TorsoFront = 8,
    TorsoBack = 16,
    LeftShoulder = 32,
    RightShoulder = 64,
    LeftArm = 128,
    RightArm = 256,
    LeftHand = 512,
    RightHand = 1024,
    Groin = 2048,
    Bum = 4096,
    LeftKnee = 8192,
    RightKnee = 16384,
    LeftLeg = 32768,
    RightLeg = 65536,
    LeftFoot = 131072,
    RightFoot = 262144
    }
    Now if we combine all this, we can obtain the OccupationSlots value as shown in the code above:
    Code:
    Wearable w = item.info.GetComponent<ItemModWearable>().entityPrefab.Get().GetComponent<Wearable>();
    Wearable.OccupationSlots u = w.occupationUnder;
    Wearable.OccupationSlots o = w.occupationOver;
    I'm not sure what the difference between occupationUnder and -Over is, you'll have to test that yourself.

    Now you can just retrieve the clothing type through bit flag matching. If you don't know what that is and how bitwise operations work, look it up.
     
  5. Why so difficult to do.There must be easy way to get thing that is wearing on his head?
     
  6. Because Rust has no single slot for head, torso, pants and shoes. A single piece of clothing may cover multiple areas, and depending on the areas it covers, you may not be able to wear certain other clothing.
    Certain things may overlap. The things that are allowed to work together are defined via said bit flags.
    It's difficult to do because Rust's clothing system is relatively complex, but also flexible.