Exemplo n.º 1
0
        /// <summary>
        /// This function is used to set the current clothes on the ped.
        /// </summary>
        public bool AddClothes(ClothesTexture texture, ClothesModel model, ClothesSlot slot)
        {
            string t = texture.ToString();
            string m = model.ToString();

            if (IsClothesSlotTattoo(slot))
            {
                t = ((int)slot).ToString() + t;
                m = ((int)slot).ToString() + m;
            }
            return(MtaShared.AddPedClothes(element, t, m, (int)slot));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Remove clothes from a certain slot
 /// </summary>
 public bool RemoveClothes(ClothesSlot slot)
 {
     return(MtaShared.RemovePedClothes(element, (int)slot, null, null));
 }
Exemplo n.º 3
0
        /// <summary>
        /// Get the current clothes texture of a slot
        /// </summary>
        public ClothesTexture GetClothesTexture(ClothesSlot slot)
        {
            Tuple <string, string> result = MtaShared.GetPedClothes(element, (int)slot);

            return((ClothesTexture)Enum.Parse(typeof(ClothesTexture), result.Item1));
        }
Exemplo n.º 4
0
        /// <summary>
        /// Get the current clothes model of a slot
        /// </summary>
        public ClothesModel GetClothesModel(ClothesSlot slot)
        {
            Tuple <string, string> result = MtaShared.GetPedClothes(element, (int)slot);

            return((ClothesModel)Enum.Parse(typeof(ClothesModel), result.Item2));
        }
Exemplo n.º 5
0
        /// <summary>
        /// Add a clothes item from a slot and an index
        /// </summary>
        public bool AddClothes(ClothesSlot slot, int index)
        {
            Tuple <string, string> result = MtaShared.GetClothesByTypeIndex((int)slot, index);

            return(MtaShared.AddPedClothes(element, result.Item1, result.Item2, (int)slot));
        }
Exemplo n.º 6
0
 protected bool IsClothesSlotTattoo(ClothesSlot slot)
 {
     return((int)slot > 3 && (int)slot < 13);
 }