//Forces skins on our side public static void SkinUpd() { //Todo: Make work if (Hooks.askScreenshot.NeedingSpy) { Player.player.clothing.tellVisualToggle(Provider.server, 0, false); Player.player.clothing.tellVisualToggle(Provider.server, 1, false); Player.player.clothing.tellVisualToggle(Provider.server, 2, false); } //Curerntly using a rare vehicle skin to detect if we set skins yet or not if (Player.player.channel.owner.vehicleSkins.Where(e => e.Value == 83701).Select(e => (KeyValuePair <ushort, int>?)e).FirstOrDefault() == null) { Player.player.channel.owner.vehicleSkins.Clear(); Player.player.channel.owner.vehicleSkins.Add(53, 83701); foreach (Sk x in SkinList) { foreach (ulong p in SkinsUsing) { if (x.instanceId == p) { if (!Player.player.channel.owner.itemSkins.ContainsKey(x.itemId)) { Player.player.channel.owner.itemSkins.Add(x.itemId, x.itemDef); } } } } } HumanClothes third = Player.player.clothing.thirdClothes, character = Player.player.clothing.characterClothes; if (third.visualShirt != Clothes[0] || third.visualHat != Clothes[0]) { third.visualShirt = Clothes[0]; character.visualShirt = Clothes[0]; third.visualPants = Clothes[1]; character.visualPants = Clothes[1]; third.visualHat = Clothes[2]; character.visualHat = Clothes[2]; third.visualBackpack = Clothes[3]; character.visualBackpack = Clothes[3]; third.visualVest = Clothes[4]; character.visualVest = Clothes[4]; third.visualMask = Clothes[5]; character.visualMask = Clothes[5]; third.visualGlasses = Clothes[6]; character.visualGlasses = Clothes[6]; } }
public static void ClearInventory(this Player player) { Items[] items = player.inventory.items; for (byte b = 0; b < PlayerInventory.PAGES - 2; b++) { if (items[b]?.items?.Count == 0) { continue; } items[b].ReverseClear(); if (b < PlayerInventory.SLOTS) { player.equipment.sendSlot(b); } } PlayerClothing clothing = player.clothing; HumanClothes clothes = clothing.thirdClothes; // I like sendSwap better but it can only be receieved from owner I think // I also really hate everything past this point if (clothing.backpack != 0) { clothes.backpack = 0; clothing.askWearBackpack(0, 0, PlaceholderArray, true); } if (clothing.glasses != 0) { clothes.glasses = 0; clothing.askWearGlasses(0, 0, PlaceholderArray, true); } if (clothing.hat != 0) { clothes.hat = 0; clothing.askWearHat(0, 0, PlaceholderArray, true); } if (clothing.mask != 0) { clothes.mask = 0; clothing.askWearMask(0, 0, PlaceholderArray, true); } if (clothing.pants != 0) { clothes.pants = 0; clothing.askWearPants(0, 0, PlaceholderArray, true); } if (clothing.shirt != 0) { clothes.shirt = 0; clothing.askWearShirt(0, 0, PlaceholderArray, true); } if (clothing.vest != 0) { clothes.vest = 0; clothing.askWearVest(0, 0, PlaceholderArray, true); } }