Skip to content

Commit

Permalink
fix: Global Weapon hash(nlohmann#1)
Browse files Browse the repository at this point in the history
However, some empty models have been tested to cause the game to jam, such as melee weapons
  • Loading branch information
Bela Proinsias authored and core committed Sep 26, 2024
1 parent 2bd2735 commit e309b03
Show file tree
Hide file tree
Showing 11 changed files with 1,715 additions and 2,473 deletions.
2 changes: 1 addition & 1 deletion PrivateMenu/PrivateMenu.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,9 @@
</ClInclude>
<ClInclude Include="src\menu\util\inventory.h" />
<ClInclude Include="src\menu\util\inventoryTypes.h" />
<ClInclude Include="src\menu\util\joaat.hpp" />
<ClInclude Include="src\menu\util\session.h" />
<ClInclude Include="src\menu\util\socialclub.h" />
<ClInclude Include="src\menu\util\weapon.h" />
<ClInclude Include="src\util\memory\patternBatch.h" />
<ClInclude Include="src\util\memory\VPBypass.h" />
<ClInclude Include="src\util\profiler.h">
Expand Down
2 changes: 1 addition & 1 deletion PrivateMenu/PrivateMenu.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@
<ClInclude Include="src\menu\util\socialclub.h" />
<ClInclude Include="src\menu\util\inventoryTypes.h" />
<ClInclude Include="src\menu\util\inventory.h" />
<ClInclude Include="src\menu\util\joaat.hpp" />
<ClInclude Include="src\menu\util\weapon.h" />
</ItemGroup>
<ItemGroup>
<Library Include="minhook.lib" />
Expand Down
185 changes: 3 additions & 182 deletions PrivateMenu/src/menu/submenus/main/local/modelMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -738,185 +738,6 @@ namespace ModelMenuVars {
{ "Prisoner", "u_m_y_prisoner_01" }
};

Hash usableWeaponHashes[] = {
0xa2719263,
0xf9fbaebe,
0x8d4be52,
0x99b507ea,
0x678b81b1,
0x4e875f73,
0x958a4a8f,
0x440e4788,
0x84bd7bfd,
0x1b06d571,
0x5ef9fec4,
0x22d8fe39,
0x99aeeb3b,
0x13532244,
0x2be6766b,
0xefe7e2df,
0xbfefff6d,
0x83bf0278,
0xaf113f99,
0x9d07f764,
0x7fd62962,
0x1d073a89,
0x7846a318,
0xe284c527,
0x9d61e50f,
0x3656c8c1,
0x5fc3c11,
0xc472fe2,
0x33058e22,
0xa284510b,
0x4dd2dc56,
0xb1ca77b1,
0x166218ff,
0x13579279,
0x687652ce,
0x42bf8a85,
0x93e220bd,
0x2c3731d9,
0xfdbc8a50,
0xa0973d5e,
0x24b17070,
0x60ec506,
0x34a67b97,
0xfdbadced,
0xa720365c,
0xfbab5776,
0x39958261,
0x88c78eb7,
0x1b79f17,
0x23c9f95c,
0x497facc3,
0x73f7c04b,
0xf8a3939f,
0xcf0896e0,
0xeffd014b,
0x4b139b2d,
0x46b89c8e,
0x9f1a91de,
0xe2822a29,
0x5d6660ab,
0xcdac517d,
0xd276317e,
0xbefdc581,
0x48e7b178,
0xff58c4fb,
0x736f5990,
0x8b7333fb,
0x92bd4ebb,
0x2024f4e8,
0xcdc174b0,
0x364a29ec,
0xcc34325e,
0x7fc7d7a,
0xa36d413e,
0x145f1012,
0xb1205a4e,
0xdf8e89eb,
0xe5b7de7a,
0xbb8fe23d,
0x2c51ad11,
0xb4a915cb,
0xfa3ddce5,
0x335cdadd,
0x47d75ef1,
0x453467d1,
0xf4c67a9e,
0x38f8ecbe,
0xa687ec07,
0xe274ff96,
0x5a2b311,
0x6d5e2801,
0xf9e6aa4b,
0xbfd21232,
0x7f229f94,
0xc0a3098d,
0xd205520e,
0x6589186a,
0xf7f1e25e,
0x84d6fafd,
0x6a6c02e0,
0x1bc4fdb9,
0x969c3d67,
0x88374054,
0x555af99a,
0xfea23564,
0x34fdff66,
0x648a81d0,
0xaf3696a1,
0x476bf155,
0xb62d1f67,
0xcb96392f,
0x97ea20b8,
0x63ab0442,
0x787f0bb,
0xab564b93,
0x61012683,
0x92a27487,
0x83839c4,
0x7f7497e5,
0xa89cb99e,
0xf9dcbf2d,
0x6d544c99,
0x3aabbbaa,
0xc734385a,
0x2b5ef5ec,
0xba536372,
0x32a888bd,
0x9d1f17e6,
0x5a96ba4,
0x57a4368c,
0xd04c944d,
0xe232c28c,
0x47757124,
0x44db5498,
0x7fd2ea0b,
0x4170e491,
0xa4513e35,
0x61a31349,
0x917f6c8c,
0xd8df3c3c,
0xa3d4d34,
0xdc4db296,
0xef951fbb,
0xdd5df8d9,
0xdb1aa450,
0x624fe830,
0x8bb05fd7,
0x2c082d7d,
0x2b796481,
0xdfe37640,
0xc1b3c3d1,
0xb54f4918,
0x2fcc0f9,
0x50dc6ab,
0xebf9ff3e,
0x781fe4a,
0x19044ee0,
0xbd248b55,
0x94117305,
0x12e82d3d,
0xcd274149,
0xba45e8b8,
0xfad1f1c9,
0x394f415c,
0xdbbd7280,
0x78a97cd0,
0xa914799,
0xbfe256d4,
0x3813fc08,
0xdba2e809,
0xd1d5f52b,
0x6e7dddec,
0xc78d71b4,
0x184140a1,
0xdb26713a,
0x45cd9cf3,
};

shared_ptr<ButtonOption> m_modelOptions[NUMOF(m_models)];
shared_ptr<BreakOption> m_searchBreak;

Expand Down Expand Up @@ -998,7 +819,7 @@ void ModelMenu::Init() {
PED::SetPedRandomComponentVariation(GetLocalPlayer().m_ped, true);
PED::SetPedRandomProps(GetLocalPlayer().m_ped);
int Ammo = -1;
for (int i : usableWeaponHashes) {
for (int i : GlobalWeaponWeapons::usableWeaponHashes) {
WEAPON::GetMaxAmmo(GetLocalPlayer().m_ped, i, &Ammo);
WEAPON::GiveWeaponToPed(GetLocalPlayer().m_ped, i, Ammo, false, true);
}
Expand All @@ -1015,7 +836,7 @@ void ModelMenu::Init() {
PED::SetPedRandomComponentVariation(GetLocalPlayer().m_ped, true);
PED::SetPedRandomProps(GetLocalPlayer().m_ped);
int Ammo = -1;
for (int i: usableWeaponHashes) {
for (int i: GlobalWeaponWeapons::usableWeaponHashes) {
WEAPON::GetMaxAmmo(GetLocalPlayer().m_ped, i, &Ammo);
WEAPON::GiveWeaponToPed(GetLocalPlayer().m_ped, i, Ammo, false, true);
}
Expand Down Expand Up @@ -1087,7 +908,7 @@ void ModelMenu::Init() {
GetFiberPool()->DoJob([=] {
WAIT(1000);
int Ammo = -1;
for (int i : usableWeaponHashes) {
for (int i : GlobalWeaponWeapons::usableWeaponHashes) {
WEAPON::GetMaxAmmo(GetLocalPlayer().m_ped, i, &Ammo);
WEAPON::GiveWeaponToPed(GetLocalPlayer().m_ped, i, Ammo, false, true);
}
Expand Down
Loading

0 comments on commit e309b03

Please sign in to comment.