Skip to content

Commit

Permalink
Merge pull request TomGrobbe#290 from MichaelCoding25/vMenu-Update-to…
Browse files Browse the repository at this point in the history
…-drug-wars-dlc

Add new content from The Criminal Enterprises, The Contract DLC, and LS Drug Wars (mpsum2, mpsecurity, mpchristmas3)
  • Loading branch information
TomGrobbe authored and Drift91 committed Aug 3, 2023
1 parent 6a732c0 commit 2c46d25
Show file tree
Hide file tree
Showing 10 changed files with 585 additions and 49 deletions.
37 changes: 27 additions & 10 deletions SharedClasses/PermissionsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public enum Permission
VORepair,
VOWash,
VOEngine,
VODestroyEngine,
VOBikeSeatbelt,
VOSpeedLimiter,
VOChangePlate,
Expand Down Expand Up @@ -148,6 +149,7 @@ public enum Permission
PVAll,
PVToggleEngine,
PVToggleLights,
PVToggleStance,
PVKickPassengers,
PVLockDoors,
PVDoors,
Expand Down Expand Up @@ -290,16 +292,31 @@ public enum Permission
WPUnarmed,
WPVintagePistol,
WPWrench,
WPPlasmaPistol, // xmas 2018 dlc (1604)
WPPlasmaCarbine, // xmas 2018 dlc (1604)
WPPlasmaMinigun, // xmas 2018 dlc (1604)
WPStoneHatchet, // xmas 2018 dlc (1604)
WPCeramicPistol, // xmas 2019 dlc (1868)
WPNavyRevolver, // xmas 2019 dlc (1868)
//WPHazardCan, // xmas 2019 dlc (1868) (Does not have label text)
WPPericoPistol, // xmas 2020 dlc (2189)
WPMilitaryRifle, // xmas 2020 dlc (2189)
WPCombatShotgun, // xmas 2020 dlc (2189)
WPPlasmaPistol,
WPPlasmaCarbine,
WPPlasmaMinigun,
WPStoneHatchet,
// MPHEIST3 DLC (v 1868)
WPCeramicPistol,
WPNavyRevolver,
WPHazardCan,
// MPHEIST4 DLC (v 2189)
WPPericoPistol,
WPMilitaryRifle,
WPCombatShotgun,
// MPSECURITY DLC (v 2545)
WPEMPLauncher,
WPHeavyRifle,
WPFertilizerCan,
WPStunGunMP,
// MPSUM2 DLC (v 2699)
WPPrecisionRifle,
WPTacticalRifle,
// MPCHRISTMAS3 DLC (V 2802)
WPPistolXM3,
WPCandyCane,
WPRailgunXM3,
WPAcidPackage,
#endregion

// Weapon Loadouts Menu
Expand Down
18 changes: 9 additions & 9 deletions vMenu/FunctionsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ async Task TogglePointing()
// Press the B button on keyboard once to toggle.
else
{
if (Game.IsControlJustReleased(0, Control.SpecialAbilitySecondary) && !Game.PlayerPed.IsInVehicle())
if (Game.IsControlJustReleased(0, Control.SpecialAbilitySecondary) && UpdateOnscreenKeyboard() != 0 && !Game.PlayerPed.IsInVehicle())
{
await TogglePointing();
}
Expand All @@ -983,18 +983,18 @@ async Task TogglePointing()
}
else
{
N_0xd5bb4025ae449a4e(Game.PlayerPed.Handle, "Pitch", GetPointingPitch());
N_0xd5bb4025ae449a4e(Game.PlayerPed.Handle, "Heading", GetPointingHeading());
N_0xb0a6cfd2c69c1088(Game.PlayerPed.Handle, "isBlocked", GetPointingIsBlocked());
SetTaskMoveNetworkSignalFloat(Game.PlayerPed.Handle, "Pitch", GetPointingPitch());
SetTaskMoveNetworkSignalFloat(Game.PlayerPed.Handle, "Heading", GetPointingHeading());
SetTaskMoveNetworkSignalBool(Game.PlayerPed.Handle, "isBlocked", GetPointingIsBlocked());
if (GetFollowPedCamViewMode() == 4)
{
N_0xb0a6cfd2c69c1088(Game.PlayerPed.Handle, "isFirstPerson", true);
SetTaskMoveNetworkSignalBool(Game.PlayerPed.Handle, "isFirstPerson", true);
}
else
{
N_0xb0a6cfd2c69c1088(Game.PlayerPed.Handle, "isFirstPerson", false);
SetTaskMoveNetworkSignalBool(Game.PlayerPed.Handle, "isFirstPerson", false);
}
N_0xd5bb4025ae449a4e(Game.PlayerPed.Handle, "Speed", 0.25f);
SetTaskMoveNetworkSignalFloat(Game.PlayerPed.Handle, "Speed", 0.25f);
}
}
}
Expand Down Expand Up @@ -1386,9 +1386,9 @@ private async Task WeaponOptions()
}

// Enable/disable infinite ammo.
if (Game.PlayerPed.Weapons.Current != null && Game.PlayerPed.Weapons.Current.Hash != WeaponHash.Unarmed)
if (IsAllowed(Permission.WPUnlimitedAmmo) && Game.PlayerPed.Weapons.Current != null && Game.PlayerPed.Weapons.Current.Hash != WeaponHash.Unarmed)
{
Game.PlayerPed.Weapons.Current.InfiniteAmmo = MainMenu.WeaponOptionsMenu.UnlimitedAmmo && IsAllowed(Permission.WPUnlimitedAmmo);
Game.PlayerPed.Weapons.Current.InfiniteAmmo = MainMenu.WeaponOptionsMenu.UnlimitedAmmo;
}

if (MainMenu.WeaponOptionsMenu.AutoEquipChute)
Expand Down
4 changes: 4 additions & 0 deletions vMenu/data/PedModels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ public static class PedModels
(uint)GetHashKey("a_c_cat_01"),
(uint)GetHashKey("a_c_chickenhawk"),
(uint)GetHashKey("a_c_chimp"),
(uint)GetHashKey("a_c_chimp_02"), // mpchristmas3
(uint)GetHashKey("a_c_chop"),
(uint)GetHashKey("a_c_chop_02"), // mpsecurity
(uint)GetHashKey("a_c_cormorant"),
(uint)GetHashKey("a_c_cow"),
(uint)GetHashKey("a_c_coyote"),
Expand All @@ -29,11 +31,13 @@ public static class PedModels
(uint)GetHashKey("a_c_husky"),
(uint)GetHashKey("a_c_killerwhale"),
(uint)GetHashKey("a_c_mtlion"),
(uint)GetHashKey("a_c_panther"), // mpheist4
(uint)GetHashKey("a_c_pig"),
(uint)GetHashKey("a_c_pigeon"),
(uint)GetHashKey("a_c_poodle"),
(uint)GetHashKey("a_c_pug"),
(uint)GetHashKey("a_c_rabbit_01"),
(uint)GetHashKey("a_c_rabbit_02"), // mpchristmas3
(uint)GetHashKey("a_c_rat"),
(uint)GetHashKey("a_c_retriever"),
(uint)GetHashKey("a_c_rhesus"),
Expand Down
114 changes: 98 additions & 16 deletions vMenu/data/ValidWeapon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -206,19 +206,30 @@ private static void CreateWeaponsList()
{ "weapon_unarmed", GetLabelText("WTD_UNARMED") },
{ "weapon_vintagepistol", GetLabelText("WTD_VPISTOL") },
{ "weapon_wrench", GetLabelText("WTD_WRENCH") },
// DLC CHRISTMAS2018 (v 1604)
{ "weapon_raypistol", GetLabelText("WTD_RAYPISTOL") },
{ "weapon_raycarbine", GetLabelText("WTD_RAYCARBINE") },
{ "weapon_rayminigun", GetLabelText("WTD_RAYMINIGUN") },
{ "weapon_stone_hatchet", GetLabelText("WTD_SHATCHET") },
// DLC CHRISTMAS2019 (v 1868)
// MPHEIST3 DLC (v 1868)
{ "weapon_ceramicpistol", GetLabelText("WTD_CERPST") },
{ "weapon_navyrevolver", GetLabelText("WTD_REV_NV") },
{ "weapon_hazardcan", "Hazard Can" }, //(Does not have label text)
// DLC CHRISTMAS2020 (v 2189)
{ "weapon_hazardcan", GetLabelText("WTD_HAZARDCAN") },
// MPHEIST4 DLC (v 2189)
{ "weapon_gadgetpistol", GetLabelText("WTD_GDGTPST") },
{ "weapon_militaryrifle", GetLabelText("WTD_MLTRYRFL") },
{ "weapon_combatshotgun", GetLabelText("WTD_CMBSHGN") }
{ "weapon_combatshotgun", GetLabelText("WTD_CMBSHGN") },
// MPSECURITY DLC (v 2545)
{ "weapon_emplauncher", GetLabelText("WTD_EMPL") },
{ "weapon_heavyrifle", GetLabelText("WTD_HEAVYRIFLE") },
{ "weapon_fertilizercan", GetLabelText("WTD_FERTILIZERCAN") },
{ "weapon_stungun_mp", GetLabelText("WTD_STNGUNMP") },
// MPSUM2 DLC (V 2699)
{ "weapon_tacticalrifle", GetLabelText("WTD_TACRIFLE") },
{ "weapon_precisionrifle", GetLabelText("WTD_PRCSRIFLE") },
// MPCHRISTMAS3 DLC (V 2802)
{ "weapon_pistolxm3", GetLabelText("WTD_PISTOLXM3") },
{ "weapon_candycane", GetLabelText("WTD_CANDYCANE") },
{ "weapon_railgunxm3", GetLabelText("WTD_RAILGUNXM3") },
};

public static readonly Dictionary<string, string> weaponNames = new Dictionary<string, string>()
Expand Down Expand Up @@ -309,19 +320,31 @@ private static void CreateWeaponsList()
{ "weapon_unarmed", GetLabelText("WT_UNARMED") },
{ "weapon_vintagepistol", GetLabelText("WT_VPISTOL") },
{ "weapon_wrench", GetLabelText("WT_WRENCH") },
// DLC CHRISTMAS2018 (v 1604)
{ "weapon_raypistol", GetLabelText("WT_RAYPISTOL") },
{ "weapon_raycarbine", GetLabelText("WT_RAYCARBINE") },
{ "weapon_rayminigun", GetLabelText("WT_RAYMINIGUN") },
{ "weapon_stone_hatchet", GetLabelText("WT_SHATCHET") },
// DLC CHRISTMAS2019 (v 1868)
// MPHEIST3 DLC (v 1868)
{ "weapon_ceramicpistol", GetLabelText("WT_CERPST") },
{ "weapon_navyrevolver", GetLabelText("WT_REV_NV") },
//{ "weapon_hazardcan", GetLabelText("WT_") }, (Does not have label text)
// DLC CHRISTMAS2020 (v 2189)
{ "weapon_hazardcan", GetLabelText("WT_HAZARDCAN") },
// MPHEIST4 DLC (v 2189)
{ "weapon_gadgetpistol", GetLabelText("WT_GDGTPST") },
{ "weapon_militaryrifle", GetLabelText("WT_MLTRYRFL") },
{ "weapon_combatshotgun", GetLabelText("WT_CMBSHGN") }
{ "weapon_combatshotgun", GetLabelText("WT_CMBSHGN") },
// MPSECURITY DLC (v 2545)
{ "weapon_emplauncher", GetLabelText("WT_EMPL") },
{ "weapon_heavyrifle", GetLabelText("WT_HEAVYRIFLE") },
{ "weapon_fertilizercan", GetLabelText("WT_FERTILIZERCAN") },
{ "weapon_stungun_mp", GetLabelText("WT_STNGUNMP") },
// MPSUM2 DLC (V 2699)
{ "weapon_tacticalrifle", GetLabelText("WT_TACRIFLE") },
{ "weapon_precisionrifle", GetLabelText("WT_PRCSRIFLE") },
// MPCHRISTMAS3 DLC (V 2802)
{ "weapon_pistolxm3", GetLabelText("WT_PISTOLXM3") },
{ "weapon_candycane", GetLabelText("WT_CANDYCANE") },
{ "weapon_railgunxm3", GetLabelText("WT_RAILGUNXM3") },
{ "weapon_acidpackage", GetLabelText("WT_ACIDPACKAGE") },
};
#endregion

Expand Down Expand Up @@ -414,19 +437,31 @@ private static void CreateWeaponsList()
["weapon_unarmed"] = Permission.WPUnarmed,
["weapon_vintagepistol"] = Permission.WPVintagePistol,
["weapon_wrench"] = Permission.WPWrench,
// DLC CHRISTMAS2018 (v 1604)
["weapon_raypistol"] = Permission.WPPlasmaPistol,
["weapon_raycarbine"] = Permission.WPPlasmaCarbine,
["weapon_rayminigun"] = Permission.WPPlasmaMinigun,
["weapon_stone_hatchet"] = Permission.WPStoneHatchet,
// DLC CHRISTMAS2019 (v 1868)
// MPHEIST3 DLC (v 1868)
["weapon_ceramicpistol"] = Permission.WPCeramicPistol,
["weapon_navyrevolver"] = Permission.WPNavyRevolver,
//["weapon_hazardcan"] = Permission.WPHazardCan, (Does not have label text)
// DLC CHRISTMAS2020 (v 2189)
["weapon_hazardcan"] = Permission.WPHazardCan,
// MPHEIST4 DLC (v 2189)
["weapon_gadgetpistol"] = Permission.WPPericoPistol,
["weapon_militaryrifle"] = Permission.WPMilitaryRifle,
["weapon_combatshotgun"] = Permission.WPCombatShotgun,
// MPSECURITY DLC (v 2545)
["weapon_emplauncher"] = Permission.WPEMPLauncher,
["weapon_heavyrifle"] = Permission.WPHeavyRifle,
["weapon_fertilizercan"] = Permission.WPFertilizerCan,
["weapon_stungun_mp"] = Permission.WPStunGunMP,
// MPSUM2 DLC (V 2699)
["weapon_tacticalrifle"] = Permission.WPTacticalRifle,
["weapon_precisionrifle"] = Permission.WPPrecisionRifle,
// MPCHRISTMAS3 DLC (V 2802)
["weapon_pistolxm3"] = Permission.WPPistolXM3,
["weapon_candycane"] = Permission.WPCandyCane,
["weapon_railgunxm3"] = Permission.WPRailgunXM3,
["weapon_acidpackage"] = Permission.WPAcidPackage,
};
#endregion

Expand Down Expand Up @@ -789,8 +824,55 @@ private static void CreateWeaponsList()
["COMPONENT_SWITCHBLADE_VARMOD_VAR2"] = GetLabelText("WCT_SB_VAR2"),
["COMPONENT_VINTAGEPISTOL_CLIP_01"] = GetLabelText("WCT_CLIP1"),
["COMPONENT_VINTAGEPISTOL_CLIP_02"] = GetLabelText("WCT_CLIP2"),
// CHRISTMAS 2018 DLC (v 1604)
["COMPONENT_RAYPISTOL_VARMOD_XMAS18"] = GetLabelText("WCT_VAR_RAY18")
["COMPONENT_RAYPISTOL_VARMOD_XMAS18"] = GetLabelText("WCT_VAR_RAY18"),
// MPHEIST3 DLC (v 1868)
["COMPONENT_CERAMICPISTOL_CLIP_01"] = GetLabelText("WCT_CLIP1"),
["COMPONENT_CERAMICPISTOL_CLIP_02"] = GetLabelText("WCT_CLIP2"),
["COMPONENT_CERAMICPISTOL_SUPP"] = GetLabelText("WCT_SUPP"),
// MPHEIST4 DLC (v 2189)
["COMPONENT_MILITARYRIFLE_CLIP_01"] = GetLabelText("WCT_CLIP1"),
["COMPONENT_MILITARYRIFLE_CLIP_02"] = GetLabelText("WCT_CLIP2"),
["COMPONENT_MILITARYRIFLE_SIGHT_01"] = GetLabelText("WCT_MRFL_SIGHT"),
// MPSECURITY DLC (v 2545)
["COMPONENT_APPISTOL_VARMOD_SECURITY"] = GetLabelText("WCT_VAR_STUD"),
["COMPONENT_MICROSMG_VARMOD_SECURITY"] = GetLabelText("WCT_VAR_WEED"),
["COMPONENT_PUMPSHOTGUN_VARMOD_SECURITY"] = GetLabelText("WCT_VAR_BONE"),
["COMPONENT_HEAVYRIFLE_CLIP_01"] = GetLabelText("WCT_CLIP1"),
["COMPONENT_HEAVYRIFLE_CLIP_02"] = GetLabelText("WCT_CLIP2"),
["COMPONENT_HEAVYRIFLE_SIGHT_01"] = GetLabelText("WCT_HVYRFLE_SIG"),
["COMPONENT_HEAVYRIFLE_CAMO1"] = GetLabelText("WCT_VAR_FAM"),
// MPSUM2 DLC (V 2699)
["COMPONENT_TACTICALRIFLE_CLIP_01"] = GetLabelText("WCT_CLIP1"),
["COMPONENT_TACTICALRIFLE_CLIP_02"] = GetLabelText("WCT_CLIP2"),
["COMPONENT_PRECISIONRIFLE_CLIP_01"] = GetLabelText("WCT_CLIP1"),
["COMPONENT_AT_AR_FLSH_REH"] = GetLabelText("WCT_FLASH"),
// MPCHRISTMAS3 DLC (V 2802)
["COMPONENT_PISTOLXM3_CLIP_01"] = GetLabelText("WCT_CLIP1"),
["COMPONENT_PISTOLXM3_SUPP"] = GetLabelText("WCT_SUPP"),
["COMPONENT_MICROSMG_VARMOD_XM3"] = GetLabelText("WCT_MSMG_XM3"),
["COMPONENT_PUMPSHOTGUN_VARMOD_XM3"] = GetLabelText("WCT_PUMPSHT_XM3"),
["COMPONENT_PISTOL_MK2_VARMOD_XM3"] = GetLabelText("WCT_PISTMK2_XM3"),
["COMPONENT_PISTOL_MK2_VARMOD_XM3_SLIDE"] = GetLabelText("WCT_PISTMK2_XM3"),
["COMPONENT_BAT_VARMOD_XM3"] = GetLabelText("WCT_BAT_XM3"),
["COMPONENT_BAT_VARMOD_XM3_01"] = GetLabelText("WCT_BAT_XM301"),
["COMPONENT_BAT_VARMOD_XM3_02"] = GetLabelText("WCT_BAT_XM302"),
["COMPONENT_BAT_VARMOD_XM3_03"] = GetLabelText("WCT_BAT_XM303"),
["COMPONENT_BAT_VARMOD_XM3_04"] = GetLabelText("WCT_BAT_XM304"),
["COMPONENT_BAT_VARMOD_XM3_05"] = GetLabelText("WCT_BAT_XM305"),
["COMPONENT_BAT_VARMOD_XM3_06"] = GetLabelText("WCT_BAT_XM306"),
["COMPONENT_BAT_VARMOD_XM3_07"] = GetLabelText("WCT_BAT_XM307"),
["COMPONENT_BAT_VARMOD_XM3_08"] = GetLabelText("WCT_BAT_XM308"),
["COMPONENT_BAT_VARMOD_XM3_09"] = GetLabelText("WCT_BAT_XM309"),
["COMPONENT_KNIFE_VARMOD_XM3"] = GetLabelText("WCT_KNIFE_XM3"),
["COMPONENT_KNIFE_VARMOD_XM3_01"] = GetLabelText("WCT_KNIFE_XM301"),
["COMPONENT_KNIFE_VARMOD_XM3_02"] = GetLabelText("WCT_KNIFE_XM302"),
["COMPONENT_KNIFE_VARMOD_XM3_03"] = GetLabelText("WCT_KNIFE_XM303"),
["COMPONENT_KNIFE_VARMOD_XM3_04"] = GetLabelText("WCT_KNIFE_XM304"),
["COMPONENT_KNIFE_VARMOD_XM3_05"] = GetLabelText("WCT_KNIFE_XM305"),
["COMPONENT_KNIFE_VARMOD_XM3_06"] = GetLabelText("WCT_KNIFE_XM306"),
["COMPONENT_KNIFE_VARMOD_XM3_07"] = GetLabelText("WCT_KNIFE_XM307"),
["COMPONENT_KNIFE_VARMOD_XM3_08"] = GetLabelText("WCT_KNIFE_XM308"),
["COMPONENT_KNIFE_VARMOD_XM3_09"] = GetLabelText("WCT_KNIFE_XM309"),
};
#endregion

Expand Down
Loading

0 comments on commit 2c46d25

Please sign in to comment.