diff --git a/VORP-Character[Client-Server]/build/vorp_character/vorpcharacter_cl.net.dll b/VORP-Character[Client-Server]/build/vorp_character/vorpcharacter_cl.net.dll index c06ab8c..f76a25f 100644 Binary files a/VORP-Character[Client-Server]/build/vorp_character/vorpcharacter_cl.net.dll and b/VORP-Character[Client-Server]/build/vorp_character/vorpcharacter_cl.net.dll differ diff --git a/VORP-Character[Client-Server]/vorpcharacter_cl/Enums/ePedComponent.cs b/VORP-Character[Client-Server]/vorpcharacter_cl/Enums/ePedComponent.cs index 64ed598..fe8a06e 100644 --- a/VORP-Character[Client-Server]/vorpcharacter_cl/Enums/ePedComponent.cs +++ b/VORP-Character[Client-Server]/vorpcharacter_cl/Enums/ePedComponent.cs @@ -3,41 +3,66 @@ public enum ePedComponent : uint { UNKNOWN = 0xFAE91080, - Hair = 0x864B03AE, - Beard = 0xF8016BCA, - Hat = 0x9925C067, - EyeWear = 0x5E47CA6, - Mask = 0x7505EF42, - NeckWear = 0x5FC29285, - Suspender = 0x877A2CF7, - Vest = 0x485EE834, - Coat = 0xE06D30CE, - CoatClosed = 0x0662AC34, - Shirt = 0x2026C46D, - NeckTies = 0x7A96FACA, - Poncho = 0xAF14310B, - Cloak = 0x3C1A74CD, - Glove = 0xEABE0032, - RingRh = 0x7A6BBD0B, - RingLh = 0xF16A1D23, - Bracelet = 0x7BC10759, - Gunbelt = 0x9B2C8B89, - Belt = 0xA6D134C6, - Buckle = 0xFAE9107F, - Holster = 0xB6B6122D, - Pant = 0x1D4C528A, - Skirt = 0xA0E3AB7F, - Chap = 0x3107499B, + Accessories = 0x79D7DF96, + Armor = 0x72E6EF74, + Badges = 0x3F7F3587, + BeardsComplete = 0xF8016BCA, // MALE + Belts = 0xA6D134C6, + BeltBuckles = 0xFAE9107F, + BodiesLower = 0x823687F5, + BodiesUpper = 0x0B3966C9, Boots = 0x777EC6EF, - Spurs = 0x18729F39, - Spats = 0x514ADCEA, + BootAccessories = 0x18729F39, + Bow = 0x8E84A2AA, + Chaps = 0x3107499B, + Cloaks = 0x3C1A74CD, + Coats = 0xE06D30CE, + CoatsClosed = 0x0662AC34, + Dresses = 0xA2926F9B, + Eyes = 0xEA24B45E, + EyeWear = 0x05E47CA6, Gauntlets = 0x91CE9B20, + Gloves = 0xEABE0032, + Gunbelts = 0x9B2C8B89, + GunbeltAccessories = 0xF1542D11, + Hair = 0x864B03AE, + HairAccessories = 0x8E84A2AA, // FEMALE + Hats = 0x9925C067, + Heads = 0x378AD10C, + HolstersLeft = 0xB6B6122D, + JewelryBracelets = 0x7BC10759, + JewelryRingsLeft = 0xF16A1D23, + JewelryRingsRight = 0x7A6BBD0B, Loadouts = 0x83887E88, - Accessories = 0x79D7DF96, + Masks = 0x7505EF42, + Neckties = 0x7A96FACA, + Neckwear = 0x5FC29285, + Pants = 0x1D4C528A, + Ponchos = 0xAF14310B, Satchels = 0x94504D26, - GunbeltAccs = 0xF1542D11, - Bow = 0x8E84A2AA, - Armor = 0x72E6EF74, - Teeth = 0x72E6EF74, // this hash is invalid + ShirtsFull = 0x2026C46D, + Skirts = 0xA0E3AB7F, // FEMALE + Spats = 0x514ADCEA, + Suspenders = 0x877A2CF7, + Spurs = 0x18729F39, + Teeth = 0x96EDAE5C, + Vests = 0x485EE834, + HorseAccessories = 0xD3500E5D, + HorseBedrolls = 0xEFB31921, + HorseBlankets = 0x17CEB41A, + HorseManes = 0xAA0217AB, + HorseMustache = 0x30DEFDDF, + HorseSaddlebags = 0x80451C25, + HorseSaddles = 0xBAA7E618, + HorseShoes = 0xFACFC3C0, + HorseTails = 0xA63CAE10, + HorseSaddleHorns = 0x05447332, + HorseSaddleLanterns = 0x1530BE1C, + HorseSaddleStirrups = 0xDA6DADCA, + HorseBridles = 0x94B2E3AF, + HorseUnknown = 0xAC106B30, + // CUSTOM CATEGORIES + BodyType = 100, + BodyWaist = 101 } } diff --git a/VORP-Character[Client-Server]/vorpcharacter_cl/Menus/ClothesMenu.cs b/VORP-Character[Client-Server]/vorpcharacter_cl/Menus/ClothesMenu.cs index e8d5c20..7ee259d 100644 --- a/VORP-Character[Client-Server]/vorpcharacter_cl/Menus/ClothesMenu.cs +++ b/VORP-Character[Client-Server]/vorpcharacter_cl/Menus/ClothesMenu.cs @@ -11,6 +11,39 @@ class ClothesMenu { private static Menu clothesMenu = new Menu(Common.GetTranslation("TitleClothesMenu"), Common.GetTranslation("SubTitleClothesMenu")); private static bool setupDone = false; + + static MenuListItem mListHats; + static MenuListItem mListEyeWear; + static MenuListItem mListMask; + static MenuListItem mListNeckWear; + static MenuListItem mListNeckTies; + static MenuListItem mListShirts; + static MenuListItem mListSuspenders; + static MenuListItem mListVest; + static MenuListItem mListCoats; + static MenuListItem mListCoatsClosed; + static MenuListItem mListPonchos; + static MenuListItem mListCloak; + static MenuListItem mListGloves; + static MenuListItem mListRingsRhType; + static MenuListItem mListRingsLh; + static MenuListItem mListbracelets; + static MenuListItem mListGunbelt; + static MenuListItem mListBelt; + static MenuListItem mListBuckle; + static MenuListItem mListSHolsters; + static MenuListItem mListPants; + static MenuListItem mListSkirts; + static MenuListItem mListChaps; + static MenuListItem mListBoots; + static MenuListItem mListSpurs; + static MenuListItem mListSpats; + static MenuListItem mListGunbeltAccs; + static MenuListItem mListGauntlets; + static MenuListItem mListLoadouts; + static MenuListItem mListAccessories; + static MenuListItem mListSatchels; + private static void SetupMenu() { if (setupDone) return; @@ -39,7 +72,7 @@ private static void SetupMenu() hatType.Add(Common.GetTranslation("HatsValue") + i); } } - MenuListItem mListHats = new MenuListItem(Common.GetTranslation("Hats"), hatType, 0, Common.GetTranslation("HatsDesc")); + mListHats = new MenuListItem(Common.GetTranslation("Hats"), hatType, 0, Common.GetTranslation("HatsDesc")); clothesMenu.AddMenuItem(mListHats); List eyeWearType = new List(); @@ -61,7 +94,7 @@ private static void SetupMenu() eyeWearType.Add(Common.GetTranslation("GlassesValue") + i); } } - MenuListItem mListEyeWear = new MenuListItem(Common.GetTranslation("Glasses"), eyeWearType, 0, Common.GetTranslation("GlassesDesc")); // Añadimos la lista al boton + mListEyeWear = new MenuListItem(Common.GetTranslation("Glasses"), eyeWearType, 0, Common.GetTranslation("GlassesDesc")); // Añadimos la lista al boton clothesMenu.AddMenuItem(mListEyeWear); // Lo añadimos al menu List maskType = new List(); @@ -83,7 +116,7 @@ private static void SetupMenu() maskType.Add(Common.GetTranslation("MaskValue") + i); } } - MenuListItem mListMask = new MenuListItem(Common.GetTranslation("Masks"), maskType, 0, Common.GetTranslation("MasksDesc")); // Añadimos la lista al boton + mListMask = new MenuListItem(Common.GetTranslation("Masks"), maskType, 0, Common.GetTranslation("MasksDesc")); // Añadimos la lista al boton clothesMenu.AddMenuItem(mListMask); // Lo añadimos al menu List neckWearType = new List(); @@ -105,7 +138,7 @@ private static void SetupMenu() neckWearType.Add(Common.GetTranslation("NeckwearValue") + i); } } - MenuListItem mListNeckWear = new MenuListItem(Common.GetTranslation("Neckwear"), neckWearType, 0, Common.GetTranslation("NeckwearDesc")); // Añadimos la lista al boton + mListNeckWear = new MenuListItem(Common.GetTranslation("Neckwear"), neckWearType, 0, Common.GetTranslation("NeckwearDesc")); // Añadimos la lista al boton clothesMenu.AddMenuItem(mListNeckWear); // Lo añadimos al menu List neckTiesType = new List(); @@ -127,7 +160,7 @@ private static void SetupMenu() neckTiesType.Add(Common.GetTranslation("TiesValue") + i); } } - MenuListItem mListNeckTies = new MenuListItem(Common.GetTranslation("Ties"), neckTiesType, 0, Common.GetTranslation("TiesDesc")); // Añadimos la lista al boton + mListNeckTies = new MenuListItem(Common.GetTranslation("Ties"), neckTiesType, 0, Common.GetTranslation("TiesDesc")); // Añadimos la lista al boton clothesMenu.AddMenuItem(mListNeckTies); // Lo añadimos al menu List shirtsType = new List(); @@ -149,7 +182,7 @@ private static void SetupMenu() shirtsType.Add(Common.GetTranslation("ShirtsValue") + i); } } - MenuListItem mListShirts = new MenuListItem(Common.GetTranslation("Shirts"), shirtsType, 0, Common.GetTranslation("ShirtsDesc")); // Añadimos la lista al boton + mListShirts = new MenuListItem(Common.GetTranslation("Shirts"), shirtsType, 0, Common.GetTranslation("ShirtsDesc")); // Añadimos la lista al boton clothesMenu.AddMenuItem(mListShirts); // Lo añadimos al menu List suspendersType = new List(); @@ -171,7 +204,7 @@ private static void SetupMenu() suspendersType.Add(Common.GetTranslation("SuspendersValue") + i); } } - MenuListItem mListSuspenders = new MenuListItem(Common.GetTranslation("Suspenders"), suspendersType, 0, Common.GetTranslation("SuspendersDesc")); // Añadimos la lista al boton + mListSuspenders = new MenuListItem(Common.GetTranslation("Suspenders"), suspendersType, 0, Common.GetTranslation("SuspendersDesc")); // Añadimos la lista al boton clothesMenu.AddMenuItem(mListSuspenders); // Lo añadimos al menu @@ -194,7 +227,7 @@ private static void SetupMenu() vestType.Add(Common.GetTranslation("VestsValue") + i); } } - MenuListItem mListVest = new MenuListItem(Common.GetTranslation("Vests"), vestType, 0, Common.GetTranslation("VestsDesc")); // Añadimos la lista al boton + mListVest = new MenuListItem(Common.GetTranslation("Vests"), vestType, 0, Common.GetTranslation("VestsDesc")); // Añadimos la lista al boton clothesMenu.AddMenuItem(mListVest); // Lo añadimos al menu List coatsType = new List(); @@ -216,7 +249,7 @@ private static void SetupMenu() coatsType.Add(Common.GetTranslation("CoatsValue") + i); } } - MenuListItem mListCoats = new MenuListItem(Common.GetTranslation("Coats"), coatsType, 0, Common.GetTranslation("CoatsDesc")); // Añadimos la lista al boton + mListCoats = new MenuListItem(Common.GetTranslation("Coats"), coatsType, 0, Common.GetTranslation("CoatsDesc")); // Añadimos la lista al boton clothesMenu.AddMenuItem(mListCoats); // Lo añadimos al menu List coatsClosedType = new List(); @@ -238,7 +271,7 @@ private static void SetupMenu() coatsClosedType.Add(Common.GetTranslation("CoatsValue") + i); } } - MenuListItem mListCoatsClosed = new MenuListItem(Common.GetTranslation("CoatsClosed"), coatsClosedType, 0, Common.GetTranslation("CoatsDesc")); // Añadimos la lista al boton + mListCoatsClosed = new MenuListItem(Common.GetTranslation("CoatsClosed"), coatsClosedType, 0, Common.GetTranslation("CoatsDesc")); // Añadimos la lista al boton clothesMenu.AddMenuItem(mListCoatsClosed); // Lo añadimos al menu List ponchosType = new List(); @@ -260,7 +293,7 @@ private static void SetupMenu() ponchosType.Add(Common.GetTranslation("PonchosValue") + i); } } - MenuListItem mListPonchos = new MenuListItem(Common.GetTranslation("Ponchos"), ponchosType, 0, Common.GetTranslation("PonchosDesc")); // Añadimos la lista al boton + mListPonchos = new MenuListItem(Common.GetTranslation("Ponchos"), ponchosType, 0, Common.GetTranslation("PonchosDesc")); // Añadimos la lista al boton clothesMenu.AddMenuItem(mListPonchos); // Lo añadimos al menu List cloakType = new List(); @@ -282,7 +315,7 @@ private static void SetupMenu() cloakType.Add(Common.GetTranslation("CloaksValue") + i); } } - MenuListItem mListCloak = new MenuListItem(Common.GetTranslation("Cloaks"), cloakType, 0, Common.GetTranslation("CloaksDesc")); // Añadimos la lista al boton + mListCloak = new MenuListItem(Common.GetTranslation("Cloaks"), cloakType, 0, Common.GetTranslation("CloaksDesc")); // Añadimos la lista al boton clothesMenu.AddMenuItem(mListCloak); // Lo añadimos al menu List glovesType = new List(); @@ -304,7 +337,7 @@ private static void SetupMenu() glovesType.Add(Common.GetTranslation("GlovesValue") + i); } } - MenuListItem mListGloves = new MenuListItem(Common.GetTranslation("Gloves"), glovesType, 0, Common.GetTranslation("GlovesDesc")); // Añadimos la lista al boton + mListGloves = new MenuListItem(Common.GetTranslation("Gloves"), glovesType, 0, Common.GetTranslation("GlovesDesc")); // Añadimos la lista al boton clothesMenu.AddMenuItem(mListGloves); // Lo añadimos al menu List ringsRhType = new List(); @@ -326,7 +359,7 @@ private static void SetupMenu() ringsRhType.Add(Common.GetTranslation("RingsValue") + i); } } - MenuListItem mListRingsRhType = new MenuListItem(Common.GetTranslation("RightRings"), ringsRhType, 0, Common.GetTranslation("RightRingsDesc")); // Añadimos la lista al boton + mListRingsRhType = new MenuListItem(Common.GetTranslation("RightRings"), ringsRhType, 0, Common.GetTranslation("RightRingsDesc")); // Añadimos la lista al boton clothesMenu.AddMenuItem(mListRingsRhType); // Lo añadimos al menu List ringsLhType = new List(); @@ -348,7 +381,7 @@ private static void SetupMenu() ringsLhType.Add(Common.GetTranslation("RingsValue") + i); } } - MenuListItem mListRingsLh = new MenuListItem(Common.GetTranslation("LeftRings"), ringsLhType, 0, Common.GetTranslation("LeftRingsDesc")); // Añadimos la lista al boton + mListRingsLh = new MenuListItem(Common.GetTranslation("LeftRings"), ringsLhType, 0, Common.GetTranslation("LeftRingsDesc")); // Añadimos la lista al boton clothesMenu.AddMenuItem(mListRingsLh); // Lo añadimos al menu List braceletsType = new List(); @@ -370,7 +403,7 @@ private static void SetupMenu() braceletsType.Add(Common.GetTranslation("BraceletsValue") + i); } } - MenuListItem mListbracelets = new MenuListItem(Common.GetTranslation("Bracelets"), braceletsType, 0, Common.GetTranslation("BraceletsDesc")); // Añadimos la lista al boton + mListbracelets = new MenuListItem(Common.GetTranslation("Bracelets"), braceletsType, 0, Common.GetTranslation("BraceletsDesc")); // Añadimos la lista al boton clothesMenu.AddMenuItem(mListbracelets); // Lo añadimos al menu List gunbeltType = new List(); @@ -392,7 +425,7 @@ private static void SetupMenu() gunbeltType.Add(Common.GetTranslation("HolstersValue") + i); } } - MenuListItem mListGunbelt = new MenuListItem(Common.GetTranslation("PrimaryHolsters"), gunbeltType, 0, Common.GetTranslation("PrimaryHolstersDesc")); // Añadimos la lista al boton + mListGunbelt = new MenuListItem(Common.GetTranslation("PrimaryHolsters"), gunbeltType, 0, Common.GetTranslation("PrimaryHolstersDesc")); // Añadimos la lista al boton clothesMenu.AddMenuItem(mListGunbelt); // Lo añadimos al menu @@ -415,7 +448,7 @@ private static void SetupMenu() beltType.Add(Common.GetTranslation("BeltsValue") + i); } } - MenuListItem mListBelt = new MenuListItem(Common.GetTranslation("Belts"), beltType, 0, Common.GetTranslation("BeltsDesc")); // Añadimos la lista al boton + mListBelt = new MenuListItem(Common.GetTranslation("Belts"), beltType, 0, Common.GetTranslation("BeltsDesc")); // Añadimos la lista al boton clothesMenu.AddMenuItem(mListBelt); // Lo añadimos al menu List buckleType = new List(); @@ -437,7 +470,7 @@ private static void SetupMenu() buckleType.Add(Common.GetTranslation("BucklesValue") + i); } } - MenuListItem mListBuckle = new MenuListItem(Common.GetTranslation("Buckles"), buckleType, 0, Common.GetTranslation("BucklesDesc")); // Añadimos la lista al boton + mListBuckle = new MenuListItem(Common.GetTranslation("Buckles"), buckleType, 0, Common.GetTranslation("BucklesDesc")); // Añadimos la lista al boton clothesMenu.AddMenuItem(mListBuckle); // Lo añadimos al menu List holstersSType = new List(); @@ -459,7 +492,7 @@ private static void SetupMenu() holstersSType.Add(Common.GetTranslation("HolstersValue") + i); } } - MenuListItem mListSHolsters = new MenuListItem(Common.GetTranslation("SecondaryHolsters"), holstersSType, 0, Common.GetTranslation("SecondaryHolstersDesc")); // Añadimos la lista al boton + mListSHolsters = new MenuListItem(Common.GetTranslation("SecondaryHolsters"), holstersSType, 0, Common.GetTranslation("SecondaryHolstersDesc")); // Añadimos la lista al boton clothesMenu.AddMenuItem(mListSHolsters); // Lo añadimos al menu List pantsType = new List(); @@ -481,7 +514,7 @@ private static void SetupMenu() pantsType.Add(Common.GetTranslation("PantsValue") + i); } } - MenuListItem mListPants = new MenuListItem(Common.GetTranslation("Pants"), pantsType, 0, Common.GetTranslation("PantsDesc")); // Añadimos la lista al boton + mListPants = new MenuListItem(Common.GetTranslation("Pants"), pantsType, 0, Common.GetTranslation("PantsDesc")); // Añadimos la lista al boton clothesMenu.AddMenuItem(mListPants); // Lo añadimos al menu List skirtsType = new List(); @@ -498,7 +531,7 @@ private static void SetupMenu() skirtsType.Add(Common.GetTranslation("SkirtsValue") + i); } } - MenuListItem mListSkirts = new MenuListItem(Common.GetTranslation("Skirts"), skirtsType, 0, Common.GetTranslation("SkirtsDesc")); // Añadimos la lista al boton + mListSkirts = new MenuListItem(Common.GetTranslation("Skirts"), skirtsType, 0, Common.GetTranslation("SkirtsDesc")); // Añadimos la lista al boton clothesMenu.AddMenuItem(mListSkirts); // Lo añadimos al menu List chapsType = new List(); @@ -520,7 +553,7 @@ private static void SetupMenu() chapsType.Add(Common.GetTranslation("ChapsValue") + i); } } - MenuListItem mListChaps = new MenuListItem(Common.GetTranslation("Chaps"), chapsType, 0, Common.GetTranslation("ChapsDesc")); // Añadimos la lista al boton + mListChaps = new MenuListItem(Common.GetTranslation("Chaps"), chapsType, 0, Common.GetTranslation("ChapsDesc")); // Añadimos la lista al boton clothesMenu.AddMenuItem(mListChaps); // Lo añadimos al menu List bootsType = new List(); @@ -542,7 +575,7 @@ private static void SetupMenu() bootsType.Add(Common.GetTranslation("BootsValue") + i); } } - MenuListItem mListBoots = new MenuListItem(Common.GetTranslation("Boots"), bootsType, 0, Common.GetTranslation("BootsDesc")); // Añadimos la lista al boton + mListBoots = new MenuListItem(Common.GetTranslation("Boots"), bootsType, 0, Common.GetTranslation("BootsDesc")); // Añadimos la lista al boton clothesMenu.AddMenuItem(mListBoots); // Lo añadimos al menu List spursType = new List(); @@ -564,7 +597,7 @@ private static void SetupMenu() spursType.Add(Common.GetTranslation("SpursValue") + i); } } - MenuListItem mListSpurs = new MenuListItem(Common.GetTranslation("Spurs"), spursType, 0, Common.GetTranslation("SpursDesc")); // Añadimos la lista al boton + mListSpurs = new MenuListItem(Common.GetTranslation("Spurs"), spursType, 0, Common.GetTranslation("SpursDesc")); // Añadimos la lista al boton clothesMenu.AddMenuItem(mListSpurs); // Lo añadimos al menu @@ -585,7 +618,7 @@ private static void SetupMenu() spatsType.Add(Common.GetTranslation("SpatsValue") + i); } } - MenuListItem mListSpats = new MenuListItem(Common.GetTranslation("Spats"), spatsType, 0, Common.GetTranslation("SpatsDesc")); + mListSpats = new MenuListItem(Common.GetTranslation("Spats"), spatsType, 0, Common.GetTranslation("SpatsDesc")); clothesMenu.AddMenuItem(mListSpats); List gunbeltaccsType = new List(); @@ -605,7 +638,7 @@ private static void SetupMenu() gunbeltaccsType.Add(Common.GetTranslation("GunbeltAccsValue") + i); } } - MenuListItem mListGunbeltAccs = new MenuListItem(Common.GetTranslation("GunbeltAccs"), gunbeltaccsType, 0, Common.GetTranslation("GunbeltAccsDesc")); + mListGunbeltAccs = new MenuListItem(Common.GetTranslation("GunbeltAccs"), gunbeltaccsType, 0, Common.GetTranslation("GunbeltAccsDesc")); clothesMenu.AddMenuItem(mListGunbeltAccs); List gauntletsType = new List(); @@ -625,7 +658,7 @@ private static void SetupMenu() gauntletsType.Add(Common.GetTranslation("GauntletsValue") + i); } } - MenuListItem mListGauntlets = new MenuListItem(Common.GetTranslation("Gauntlets"), gauntletsType, 0, Common.GetTranslation("GauntletsDesc")); + mListGauntlets = new MenuListItem(Common.GetTranslation("Gauntlets"), gauntletsType, 0, Common.GetTranslation("GauntletsDesc")); clothesMenu.AddMenuItem(mListGauntlets); List loadoutsType = new List(); @@ -645,7 +678,7 @@ private static void SetupMenu() loadoutsType.Add(Common.GetTranslation("LoadoutsValue") + i); } } - MenuListItem mListLoadouts = new MenuListItem(Common.GetTranslation("Loadouts"), loadoutsType, 0, Common.GetTranslation("LoadoutsDesc")); + mListLoadouts = new MenuListItem(Common.GetTranslation("Loadouts"), loadoutsType, 0, Common.GetTranslation("LoadoutsDesc")); clothesMenu.AddMenuItem(mListLoadouts); List accessoriesType = new List(); @@ -665,7 +698,7 @@ private static void SetupMenu() accessoriesType.Add(Common.GetTranslation("AccessoriesValue") + i); } } - MenuListItem mListAccessories = new MenuListItem(Common.GetTranslation("Accessories"), accessoriesType, 0, Common.GetTranslation("AccessoriesDesc")); + mListAccessories = new MenuListItem(Common.GetTranslation("Accessories"), accessoriesType, 0, Common.GetTranslation("AccessoriesDesc")); clothesMenu.AddMenuItem(mListAccessories); List satchelsType = new List(); @@ -685,7 +718,7 @@ private static void SetupMenu() satchelsType.Add(Common.GetTranslation("SatchelsValue") + i); } } - MenuListItem mListSatchels = new MenuListItem(Common.GetTranslation("Satchels"), satchelsType, 0, Common.GetTranslation("SatchelsDesc")); + mListSatchels = new MenuListItem(Common.GetTranslation("Satchels"), satchelsType, 0, Common.GetTranslation("SatchelsDesc")); clothesMenu.AddMenuItem(mListSatchels); clothesMenu.OnMenuOpen += (_menu) => @@ -700,110 +733,84 @@ private static void SetupMenu() clothesMenu.OnListIndexChange += (_menu, _listItem, _oldIndex, _newIndex, _itemIndex) => { - switch (_itemIndex) - { - case 0: - CreateCharacter.SetPlayerComponent(_newIndex, 0x9925C067, "Hat", SkinsUtils.HATS_MALE, SkinsUtils.HATS_FEMALE); - break; - case 1: - CreateCharacter.SetPlayerComponent(_newIndex, 0x5E47CA6, "EyeWear", SkinsUtils.EYEWEAR_MALE, SkinsUtils.EYEWEAR_FEMALE); - break; - case 2: - CreateCharacter.SetPlayerComponent(_newIndex, 0x7505EF42, "Mask", SkinsUtils.MASK_MALE, SkinsUtils.MASK_FEMALE); - break; - case 3: - CreateCharacter.SetPlayerComponent(_newIndex, 0x5FC29285, "NeckWear", SkinsUtils.NECKWEAR_MALE, SkinsUtils.NECKWEAR_FEMALE); - break; - case 4: - CreateCharacter.SetPlayerComponent(_newIndex, 0x7A96FACA, "NeckTies", SkinsUtils.NECKTIES_MALE, SkinsUtils.NECKTIES_FEMALE); - break; - case 5: - CreateCharacter.SetPlayerComponent(_newIndex, 0x2026C46D, "Shirt", SkinsUtils.SHIRTS_MALE, SkinsUtils.SHIRTS_FEMALE); - break; - case 6: - CreateCharacter.SetPlayerComponent(_newIndex, 0x877A2CF7, "Suspender", SkinsUtils.SUSPENDERS_MALE, SkinsUtils.SUSPENDERS_FEMALE); - break; - case 7: - CreateCharacter.SetPlayerComponent(_newIndex, 0x485EE834, "Vest", SkinsUtils.VEST_MALE, SkinsUtils.VEST_FEMALE); - break; - case 8: - CreateCharacter.SetPlayerComponent(0, 0x0662AC34, "CoatClosed", SkinsUtils.COATS_CLOSED_MALE, SkinsUtils.COATS_CLOSED_FEMALE); - mListCoatsClosed.ListIndex = 0; - CreateCharacter.SetPlayerComponent(_newIndex, 0xE06D30CE, "Coat", SkinsUtils.COATS_MALE, SkinsUtils.COATS_FEMALE); - break; - case 9: - CreateCharacter.SetPlayerComponent(0, 0xE06D30CE, "Coat", SkinsUtils.COATS_MALE, SkinsUtils.COATS_FEMALE); - mListCoats.ListIndex = 0; - CreateCharacter.SetPlayerComponent(_newIndex, 0x0662AC34, "CoatClosed", SkinsUtils.COATS_CLOSED_MALE, SkinsUtils.COATS_CLOSED_FEMALE); - break; - case 10: - CreateCharacter.SetPlayerComponent(_newIndex, 0xAF14310B, "Poncho", SkinsUtils.PONCHOS_MALE, SkinsUtils.PONCHOS_FEMALE); - break; - case 11: - CreateCharacter.SetPlayerComponent(_newIndex, 0x3C1A74CD, "Cloak", SkinsUtils.CLOAK_MALE, SkinsUtils.CLOAK_FEMALE); - break; - case 12: - CreateCharacter.SetPlayerComponent(_newIndex, 0xEABE0032, "Glove", SkinsUtils.GLOVES_MALE, SkinsUtils.GLOVES_FEMALE); - break; - case 13: - CreateCharacter.SetPlayerComponent(_newIndex, 0x7A6BBD0B, "RingRh", SkinsUtils.RINGS_RH_MALE, SkinsUtils.RINGS_RH_FEMALE); - break; - case 14: - CreateCharacter.SetPlayerComponent(_newIndex, 0xF16A1D23, "RingLh", SkinsUtils.RINGS_LH_MALE, SkinsUtils.RINGS_LH_FEMALE); - break; - case 15: - CreateCharacter.SetPlayerComponent(_newIndex, 0x7BC10759, "Bracelet", SkinsUtils.BRACELETS_MALE, SkinsUtils.BRACELETS_FEMALE); - break; - case 16: - CreateCharacter.SetPlayerComponent(_newIndex, 0x9B2C8B89, "Gunbelt", SkinsUtils.GUNBELT_MALE, SkinsUtils.GUNBELT_FEMALE); - break; - case 17: - CreateCharacter.SetPlayerComponent(_newIndex, 0xA6D134C6, "Belt", SkinsUtils.BELT_MALE, SkinsUtils.BELT_FEMALE); - break; - case 18: - CreateCharacter.SetPlayerComponent(_newIndex, 0xFAE9107F, "Buckle", SkinsUtils.BUCKLE_MALE, SkinsUtils.BUCKLE_FEMALE); - break; - case 19: - CreateCharacter.SetPlayerComponent(_newIndex, 0xB6B6122D, "Holster", SkinsUtils.HOLSTERS_S_MALE, SkinsUtils.HOLSTERS_S_FEMALE); - break; - case 20: - CreateCharacter.SetPlayerComponent(_newIndex, 0x1D4C528A, "Pant", SkinsUtils.PANTS_MALE, SkinsUtils.PANTS_FEMALE); - break; - case 21: - CreateCharacter.SetPlayerComponent(_newIndex, 0xA0E3AB7F, "Skirt", SkinsUtils.SKIRTS_FEMALE, SkinsUtils.SKIRTS_FEMALE); - break; - case 22: - CreateCharacter.SetPlayerComponent(_newIndex, 0x3107499B, "Chap", SkinsUtils.CHAPS_MALE, SkinsUtils.CHAPS_FEMALE); - break; - case 23: - CreateCharacter.SetPlayerComponent(_newIndex, 0x777EC6EF, "Boots", SkinsUtils.BOOTS_MALE, SkinsUtils.BOOTS_FEMALE); - break; - case 24: - CreateCharacter.SetPlayerComponent(0, 0x514ADCEA, "Spats", SkinsUtils.SPATS_MALE, SkinsUtils.SPATS_FEMALE); - mListSpats.ListIndex = 0; - CreateCharacter.SetPlayerComponent(_newIndex, 0x18729F39, "Spurs", SkinsUtils.SPURS_MALE, SkinsUtils.SPURS_FEMALE); - break; - case 25: - CreateCharacter.SetPlayerComponent(0, 0x18729F39, "Spurs", SkinsUtils.SPURS_MALE, SkinsUtils.SPURS_FEMALE); - mListSpurs.ListIndex = 0; - CreateCharacter.SetPlayerComponent(_newIndex, 0x514ADCEA, "Spats", SkinsUtils.SPATS_MALE, SkinsUtils.SPATS_FEMALE); - break; - case 26: - CreateCharacter.SetPlayerComponent(_newIndex, 0x91CE9B20, "Gauntlets", SkinsUtils.GAUNTLETS_MALE, SkinsUtils.GAUNTLETS_FEMALE); - break; - case 27: - CreateCharacter.SetPlayerComponent(_newIndex, 0x83887E88, "Loadouts", SkinsUtils.LOADOUTS_MALE, SkinsUtils.LOADOUTS_FEMALE); - break; - case 28: - CreateCharacter.SetPlayerComponent(_newIndex, 0x79D7DF96, "Accessories", SkinsUtils.ACCESSORIES_MALE, SkinsUtils.ACCESSORIES_FEMALE); - break; - case 29: - CreateCharacter.SetPlayerComponent(_newIndex, 0x94504D26, "Satchels", SkinsUtils.SATCHELS_MALE, SkinsUtils.SATCHELS_FEMALE); - break; - case 30: - CreateCharacter.SetPlayerComponent(_newIndex, 0xF1542D11, "GunbeltAccs", SkinsUtils.GUNBELTACCS_MALE, SkinsUtils.GUNBELTACCS_MALE); - break; - } + if (_listItem == mListHats) + CreateCharacter.SetPlayerComponent(_newIndex, 0x9925C067, "Hat", SkinsUtils.HATS_MALE, SkinsUtils.HATS_FEMALE); + else if (_listItem == mListEyeWear) + CreateCharacter.SetPlayerComponent(_newIndex, 0x5E47CA6, "EyeWear", SkinsUtils.EYEWEAR_MALE, SkinsUtils.EYEWEAR_FEMALE); + else if (_listItem == mListMask) + CreateCharacter.SetPlayerComponent(_newIndex, 0x7505EF42, "Mask", SkinsUtils.MASK_MALE, SkinsUtils.MASK_FEMALE); + else if (_listItem == mListNeckWear) + CreateCharacter.SetPlayerComponent(_newIndex, 0x5FC29285, "NeckWear", SkinsUtils.NECKWEAR_MALE, SkinsUtils.NECKWEAR_FEMALE); + else if (_listItem == mListNeckTies) + CreateCharacter.SetPlayerComponent(_newIndex, 0x7A96FACA, "NeckTies", SkinsUtils.NECKTIES_MALE, SkinsUtils.NECKTIES_FEMALE); + else if (_listItem == mListShirts) + CreateCharacter.SetPlayerComponent(_newIndex, 0x2026C46D, "Shirt", SkinsUtils.SHIRTS_MALE, SkinsUtils.SHIRTS_FEMALE); + else if (_listItem == mListSuspenders) + CreateCharacter.SetPlayerComponent(_newIndex, 0x877A2CF7, "Suspender", SkinsUtils.SUSPENDERS_MALE, SkinsUtils.SUSPENDERS_FEMALE); + else if (_listItem == mListVest) + CreateCharacter.SetPlayerComponent(_newIndex, 0x485EE834, "Vest", SkinsUtils.VEST_MALE, SkinsUtils.VEST_FEMALE); + else if (_listItem == mListCoats) + { + CreateCharacter.SetPlayerComponent(0, 0x0662AC34, "CoatClosed", SkinsUtils.COATS_CLOSED_MALE, SkinsUtils.COATS_CLOSED_FEMALE); + mListCoatsClosed.ListIndex = 0; + CreateCharacter.SetPlayerComponent(_newIndex, 0xE06D30CE, "Coat", SkinsUtils.COATS_MALE, SkinsUtils.COATS_FEMALE); + } + else if (_listItem == mListCoatsClosed) + { + CreateCharacter.SetPlayerComponent(0, 0xE06D30CE, "Coat", SkinsUtils.COATS_MALE, SkinsUtils.COATS_FEMALE); + mListCoats.ListIndex = 0; + CreateCharacter.SetPlayerComponent(_newIndex, 0x0662AC34, "CoatClosed", SkinsUtils.COATS_CLOSED_MALE, SkinsUtils.COATS_CLOSED_FEMALE); + } + else if (_listItem == mListPonchos) + CreateCharacter.SetPlayerComponent(_newIndex, 0xAF14310B, "Poncho", SkinsUtils.PONCHOS_MALE, SkinsUtils.PONCHOS_FEMALE); + else if (_listItem == mListCloak) + CreateCharacter.SetPlayerComponent(_newIndex, 0x3C1A74CD, "Cloak", SkinsUtils.CLOAK_MALE, SkinsUtils.CLOAK_FEMALE); + else if (_listItem == mListGloves) + CreateCharacter.SetPlayerComponent(_newIndex, 0xEABE0032, "Glove", SkinsUtils.GLOVES_MALE, SkinsUtils.GLOVES_FEMALE); + else if (_listItem == mListRingsRhType) + CreateCharacter.SetPlayerComponent(_newIndex, 0x7A6BBD0B, "RingRh", SkinsUtils.RINGS_RH_MALE, SkinsUtils.RINGS_RH_FEMALE); + else if (_listItem == mListRingsLh) + CreateCharacter.SetPlayerComponent(_newIndex, 0xF16A1D23, "RingLh", SkinsUtils.RINGS_LH_MALE, SkinsUtils.RINGS_LH_FEMALE); + else if (_listItem == mListbracelets) + CreateCharacter.SetPlayerComponent(_newIndex, 0x7BC10759, "Bracelet", SkinsUtils.BRACELETS_MALE, SkinsUtils.BRACELETS_FEMALE); + else if (_listItem == mListGunbelt) + CreateCharacter.SetPlayerComponent(_newIndex, 0x9B2C8B89, "Gunbelt", SkinsUtils.GUNBELT_MALE, SkinsUtils.GUNBELT_FEMALE); + else if (_listItem == mListBelt) + CreateCharacter.SetPlayerComponent(_newIndex, 0xA6D134C6, "Belt", SkinsUtils.BELT_MALE, SkinsUtils.BELT_FEMALE); + else if (_listItem == mListBuckle) + CreateCharacter.SetPlayerComponent(_newIndex, 0xFAE9107F, "Buckle", SkinsUtils.BUCKLE_MALE, SkinsUtils.BUCKLE_FEMALE); + else if (_listItem == mListSHolsters) + CreateCharacter.SetPlayerComponent(_newIndex, 0xB6B6122D, "Holster", SkinsUtils.HOLSTERS_S_MALE, SkinsUtils.HOLSTERS_S_FEMALE); + else if (_listItem == mListPants) + CreateCharacter.SetPlayerComponent(_newIndex, 0x1D4C528A, "Pant", SkinsUtils.PANTS_MALE, SkinsUtils.PANTS_FEMALE); + else if (_listItem == mListSkirts) + CreateCharacter.SetPlayerComponent(_newIndex, 0xA0E3AB7F, "Skirt", SkinsUtils.SKIRTS_FEMALE, SkinsUtils.SKIRTS_FEMALE); + else if (_listItem == mListChaps) + CreateCharacter.SetPlayerComponent(_newIndex, 0x3107499B, "Chap", SkinsUtils.CHAPS_MALE, SkinsUtils.CHAPS_FEMALE); + else if (_listItem == mListBoots) + CreateCharacter.SetPlayerComponent(_newIndex, 0x777EC6EF, "Boots", SkinsUtils.BOOTS_MALE, SkinsUtils.BOOTS_FEMALE); + else if (_listItem == mListSpurs) + { + CreateCharacter.SetPlayerComponent(0, 0x514ADCEA, "Spats", SkinsUtils.SPATS_MALE, SkinsUtils.SPATS_FEMALE); + mListSpats.ListIndex = 0; + CreateCharacter.SetPlayerComponent(_newIndex, 0x18729F39, "Spurs", SkinsUtils.SPURS_MALE, SkinsUtils.SPURS_FEMALE); + } + else if (_listItem == mListSpats) + { + CreateCharacter.SetPlayerComponent(0, 0x18729F39, "Spurs", SkinsUtils.SPURS_MALE, SkinsUtils.SPURS_FEMALE); + mListSpurs.ListIndex = 0; + CreateCharacter.SetPlayerComponent(_newIndex, 0x514ADCEA, "Spats", SkinsUtils.SPATS_MALE, SkinsUtils.SPATS_FEMALE); + } + else if (_listItem == mListGunbeltAccs) + CreateCharacter.SetPlayerComponent(_newIndex, 0xF1542D11, "GunbeltAccs", SkinsUtils.GUNBELTACCS_MALE, SkinsUtils.GUNBELTACCS_MALE); + else if (_listItem == mListGauntlets) + CreateCharacter.SetPlayerComponent(_newIndex, 0x91CE9B20, "Gauntlets", SkinsUtils.GAUNTLETS_MALE, SkinsUtils.GAUNTLETS_FEMALE); + else if (_listItem == mListLoadouts) + CreateCharacter.SetPlayerComponent(_newIndex, 0x83887E88, "Loadouts", SkinsUtils.LOADOUTS_MALE, SkinsUtils.LOADOUTS_FEMALE); + else if (_listItem == mListAccessories) + CreateCharacter.SetPlayerComponent(_newIndex, 0x79D7DF96, "Accessories", SkinsUtils.ACCESSORIES_MALE, SkinsUtils.ACCESSORIES_FEMALE); + else if (_listItem == mListSatchels) + CreateCharacter.SetPlayerComponent(_newIndex, 0x94504D26, "Satchels", SkinsUtils.SATCHELS_MALE, SkinsUtils.SATCHELS_FEMALE); }; } diff --git a/VORP-Character[Client-Server]/vorpcharacter_cl/Script/LoadPlayer.cs b/VORP-Character[Client-Server]/vorpcharacter_cl/Script/LoadPlayer.cs index f2dac0d..bcf894b 100644 --- a/VORP-Character[Client-Server]/vorpcharacter_cl/Script/LoadPlayer.cs +++ b/VORP-Character[Client-Server]/vorpcharacter_cl/Script/LoadPlayer.cs @@ -95,7 +95,7 @@ private async void ReloadCharacterSkin(string part = "") switch (part) { case "clothes": - SetPedComponents(cache_cloths, Cache.PlayerPedId, isMale); + SetPedComponents(cache_cloths, Cache.PlayerPedId); Utilities.UpdatePedVariation(Cache.PlayerPedId, true); break; default: @@ -194,7 +194,7 @@ public static async void ApplyDefaultSkinSettings(int pedHandle) Utilities.UpdatePedVariation(pedHandle); } - public async Task SetupCharacter(bool isPlayer, Dictionary skin, Dictionary clothes, int delay = 0) + public async Task SetupCharacter(bool isPlayer, Dictionary skin, Dictionary clothes) { try { @@ -232,7 +232,7 @@ public async Task SetupCharacter(bool isPlayer, Dictionary if (!isPlayer) { - pedHandle = API.CreatePed(model_hash, 1701.316f, 1512.134f, 146.87f, 116.70f, false, false, true, true); + pedHandle = API.CreatePed(model_hash, 1701.316f, 1512.134f, 146.87f, 116.70f, false, true, true, true); } while (!Function.Call((Hash)0xA0BC8FAED8CFEB3C, pedHandle)) // IsPedReadyToRender @@ -240,12 +240,19 @@ public async Task SetupCharacter(bool isPlayer, Dictionary await BaseScript.Delay(0); } + Function.Call((Hash)0x0BFA1BD465CDFEFD, pedHandle); Utilities.UpdatePedVariation(pedHandle, true, true); PreloadPedTextures(skin, isMale); + await BaseScript.Delay(0); ApplyDefaultSkinSettings(pedHandle); + await BaseScript.Delay(0); SetupPedBodyTypes(pedHandle, skin); await BaseScript.Delay(0); + Utilities.RemoveTagFromMetaPed(pedHandle, 0x1D4C528A, 0); + Utilities.RemoveTagFromMetaPed(pedHandle, 0x3F1F01E5, 0); + Utilities.RemoveTagFromMetaPed(pedHandle, 0xDA0E2C55, 0); + await BaseScript.Delay(0); SetupPedFaceFeatures(pedHandle, skin); await BaseScript.Delay(0); SetPedBodyComponents(pedHandle, skin); @@ -254,7 +261,7 @@ public async Task SetupCharacter(bool isPlayer, Dictionary await BaseScript.Delay(0); SetupPedAdditionalFaceFeatures(pedHandle, skin); await BaseScript.Delay(0); - SetPedComponents(clothes, pedHandle, isMale); + SetPedComponents(clothes, pedHandle); ResetEntityAlpha(pedHandle); @@ -475,41 +482,41 @@ private static void SetPedFaceTextures(int pedHandle, Dictionary Utilities.UpdatePedVariation(pedHandle, true); } - private static void SetPedComponents(Dictionary clothes, int pedHandle, bool isMale) + public static void SetPedComponents(Dictionary clothes, int pedHandle) { - SetPlayerComponent(pedHandle, isMale, ePedComponent.Hat, "Hat", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.EyeWear, "EyeWear", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.Mask, "Mask", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.NeckWear, "NeckWear", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.Suspender, "Suspender", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.Vest, "Vest", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.Coat, "Coat", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.CoatClosed, "CoatClosed", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.Shirt, "Shirt", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.NeckTies, "NeckTies", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.Poncho, "Poncho", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.Cloak, "Cloak", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.Glove, "Glove", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.RingRh, "RingRh", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.RingLh, "RingLh", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.Bracelet, "Bracelet", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.Gunbelt, "Gunbelt", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.Belt, "Belt", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.Buckle, "Buckle", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.Holster, "Holster", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.Pant, "Pant", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.Bow, "bow", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.Armor, "armor", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.Teeth, "teeth", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.Chap, "Chap", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.Boots, "Boots", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.Spurs, "Spurs", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.Spats, "Spats", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.Gauntlets, "Gauntlets", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.Loadouts, "Loadouts", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.Accessories, "Accessories", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.Satchels, "Satchels", clothes); - SetPlayerComponent(pedHandle, isMale, ePedComponent.GunbeltAccs, "GunbeltAccs", clothes); + SetPlayerComponent(pedHandle, ePedComponent.Hats, "Hat", clothes); + SetPlayerComponent(pedHandle, ePedComponent.EyeWear, "EyeWear", clothes); + SetPlayerComponent(pedHandle, ePedComponent.Masks, "Mask", clothes); + SetPlayerComponent(pedHandle, ePedComponent.Neckwear, "NeckWear", clothes); + SetPlayerComponent(pedHandle, ePedComponent.Suspenders, "Suspender", clothes); + SetPlayerComponent(pedHandle, ePedComponent.Vests, "Vest", clothes); + SetPlayerComponent(pedHandle, ePedComponent.Coats, "Coat", clothes); + SetPlayerComponent(pedHandle, ePedComponent.CoatsClosed, "CoatClosed", clothes); + SetPlayerComponent(pedHandle, ePedComponent.ShirtsFull, "Shirt", clothes); + SetPlayerComponent(pedHandle, ePedComponent.Neckties, "NeckTies", clothes); + SetPlayerComponent(pedHandle, ePedComponent.Ponchos, "Poncho", clothes); + SetPlayerComponent(pedHandle, ePedComponent.Cloaks, "Cloak", clothes); + SetPlayerComponent(pedHandle, ePedComponent.Gloves, "Glove", clothes); + SetPlayerComponent(pedHandle, ePedComponent.JewelryRingsRight, "RingRh", clothes); + SetPlayerComponent(pedHandle, ePedComponent.JewelryRingsLeft, "RingLh", clothes); + SetPlayerComponent(pedHandle, ePedComponent.JewelryBracelets, "Bracelet", clothes); + SetPlayerComponent(pedHandle, ePedComponent.Gunbelts, "Gunbelt", clothes); + SetPlayerComponent(pedHandle, ePedComponent.Belts, "Belt", clothes); + SetPlayerComponent(pedHandle, ePedComponent.BeltBuckles, "Buckle", clothes); + SetPlayerComponent(pedHandle, ePedComponent.HolstersLeft, "Holster", clothes); + SetPlayerComponent(pedHandle, ePedComponent.Pants, "Pant", clothes); + SetPlayerComponent(pedHandle, ePedComponent.Bow, "bow", clothes); + SetPlayerComponent(pedHandle, ePedComponent.Armor, "armor", clothes); + SetPlayerComponent(pedHandle, ePedComponent.Teeth, "teeth", clothes); + SetPlayerComponent(pedHandle, ePedComponent.Chaps, "Chap", clothes); + SetPlayerComponent(pedHandle, ePedComponent.Boots, "Boots", clothes); + SetPlayerComponent(pedHandle, ePedComponent.Spurs, "Spurs", clothes); + SetPlayerComponent(pedHandle, ePedComponent.Spats, "Spats", clothes); + SetPlayerComponent(pedHandle, ePedComponent.Gauntlets, "Gauntlets", clothes); + SetPlayerComponent(pedHandle, ePedComponent.Loadouts, "Loadouts", clothes); + SetPlayerComponent(pedHandle, ePedComponent.Accessories, "Accessories", clothes); + SetPlayerComponent(pedHandle, ePedComponent.Satchels, "Satchels", clothes); + SetPlayerComponent(pedHandle, ePedComponent.GunbeltAccessories, "GunbeltAccs", clothes); Utilities.UpdatePedVariation(pedHandle, true); } @@ -537,7 +544,7 @@ public static uint ConvertValue(string s) } // what does this do really? - public static void SetPlayerComponent(int pedHandle, bool isMale, ePedComponent pedComponent, string component, Dictionary clothes) + public static void SetPlayerComponent(int pedHandle, ePedComponent pedComponent, string component, Dictionary clothes) { if (!clothes.ContainsKey(component)) return; @@ -547,16 +554,7 @@ public static void SetPlayerComponent(int pedHandle, bool isMale, ePedComponent if (clothes["Skirt"] > 0 && clothes["Pant"] > 0 && component == "Skirt") return; } - if (clothes[component] > 0) - { - long hash = clothes[component]; - Function.Call((Hash)0x59BD177A1A48600A, pedHandle, (uint)pedComponent); - Utilities.ApplyShopItemToPed(pedHandle, hash); - -#if DEVELOPMENT - Logger.Debug($"{component} : {clothes[component]}"); -#endif - } + Utilities.SetComponent(pedHandle, pedComponent, clothes[component]); } private async Task IsLoaded(Dictionary skin, Dictionary clothes) diff --git a/VORP-Character[Client-Server]/vorpcharacter_cl/Script/SelectCharacter.cs b/VORP-Character[Client-Server]/vorpcharacter_cl/Script/SelectCharacter.cs index c26c70d..e9a4211 100644 --- a/VORP-Character[Client-Server]/vorpcharacter_cl/Script/SelectCharacter.cs +++ b/VORP-Character[Client-Server]/vorpcharacter_cl/Script/SelectCharacter.cs @@ -125,10 +125,13 @@ public async Task StartSwapCharacter() API.DeletePed(ref pedHandle); await Delay(1000); pedHandle = await LoadNpcComps(json_skin, json_components); + Utilities.UpdatePedVariation(pedHandle, true); + tagId = Function.Call((Hash)0x53CB4B502E1C57EA, pedHandle, $"{Common.GetTranslation("MoneyTag")}: ~COLOR_WHITE~$" + "~COLOR_REPLAY_GREEN~" + myChars[selectedChar].money, false, false, "", 0); Function.Call((Hash)0xA0D7CE5F83259663, tagId, myChars[selectedChar].firstname + " " + myChars[selectedChar].lastname); Function.Call((Hash)0x5F57522BC1EB9D9D, tagId, 0); await Delay(500); + API.TaskGoToCoordAnyMeans(pedHandle, 1696.17f, 1508.474f, 147.85f, 0.8f, 0, false, 524419, -1f); API.PromptSetEnabled(DeletePrompt, 1); @@ -339,7 +342,7 @@ public async Task Controller() if (result.Equals(Common.GetTranslation("SUPPRCode"))) { TriggerServerEvent("vorp_DeleteCharacter", (int)myChars[selectedChar].charIdentifier); - if (myChars.Count <= 1) + if (myChars.Count == 0) { new CreateCharacter().StartCreationOfCharacter(); API.PromptSetEnabled(DeletePrompt, 0); @@ -397,8 +400,9 @@ public async Task LoadNpcComps(string skin_json, string cloths_json) { clothes[s.Key] = LoadPlayer.ConvertValue(s.Value.ToString()); } - - return pedHandle = await LoadPlayer.Instance.SetupCharacter(false, skin, clothes, delay: 10); + int _pedHandle = await LoadPlayer.Instance.SetupCharacter(false, skin, clothes); + LoadPlayer.SetPedComponents(clothes, _pedHandle); + return _pedHandle; } } } diff --git a/VORP-Character[Client-Server]/vorpcharacter_cl/Utils/Utilities.cs b/VORP-Character[Client-Server]/vorpcharacter_cl/Utils/Utilities.cs index 4a48776..2647b48 100644 --- a/VORP-Character[Client-Server]/vorpcharacter_cl/Utils/Utilities.cs +++ b/VORP-Character[Client-Server]/vorpcharacter_cl/Utils/Utilities.cs @@ -87,9 +87,22 @@ public static async Task SetPedFaceFeature(int pedHandle, ePedFaceFeature pedFac await BaseScript.Delay(delay); } - public static void ApplyShopItemToPed(int pedHandle, long componentHash, bool immediately = true, bool isMultiplayer = true, bool p4 = true) + public static void SetComponent(int pedHandle, ePedComponent componentCategory, long componentHash) + { + Logger.Debug($"SetComponent: {pedHandle} / {componentCategory} / {componentHash}"); + + if (componentCategory == ePedComponent.UNKNOWN) return; + if (componentHash == 0) + RemoveTagFromMetaPed((int)componentCategory, 0); + else + Function.Call((Hash)0x59BD177A1A48600A, pedHandle, componentHash); + Function.Call((Hash)0xD3A7B003ED343FD9, pedHandle, componentHash, true, true, false); + } + + public static void ApplyShopItemToPed(int pedHandle, long componentHash, bool immediately = true, bool isMultiplayer = true, bool p4 = false) { Function.Call((Hash)0xD3A7B003ED343FD9, pedHandle, componentHash, immediately, isMultiplayer, p4); + UpdatePedVariation(pedHandle); } public async static Task SetPlayerModel(uint hash)