From f3179fabbe9ed23d1b82b6fdcf3a9f11f1205839 Mon Sep 17 00:00:00 2001 From: Rohit Lalwani Date: Fri, 2 May 2025 02:15:17 +0530 Subject: [PATCH 1/9] clear damage and skip line in phone conversation commands. (#257) * change clear damage into toggle command. add skip conversation command which skips current line of phone conversation upon activation. * revert clear damage command to as it was earlier. add new toggle command to keep player clean. * rename new class to KeepPlayerClean --- src/game/features/self/KeepPlayerClean.cpp | 20 ++++++++++++++++++++ src/game/features/self/SkipConversation.cpp | 18 ++++++++++++++++++ src/game/frontend/submenus/Self.cpp | 2 ++ 3 files changed, 40 insertions(+) create mode 100644 src/game/features/self/KeepPlayerClean.cpp create mode 100644 src/game/features/self/SkipConversation.cpp diff --git a/src/game/features/self/KeepPlayerClean.cpp b/src/game/features/self/KeepPlayerClean.cpp new file mode 100644 index 0000000..d39013e --- /dev/null +++ b/src/game/features/self/KeepPlayerClean.cpp @@ -0,0 +1,20 @@ +#include "core/commands/LoopedCommand.hpp" +#include "game/backend/Self.hpp" + +namespace YimMenu::Features +{ + class KeepPlayerClean : public LoopedCommand + { + using LoopedCommand::LoopedCommand; + + virtual void OnTick() override + { + if (!Self::GetPed()) + return; + + Self::GetPed().ClearDamage(); + } + }; + + static KeepPlayerClean _KeepPlayerClean{"keepplayerclean", "Keep Player Clean", "Keeps the player clean from any blood, dirt, water."}; +} \ No newline at end of file diff --git a/src/game/features/self/SkipConversation.cpp b/src/game/features/self/SkipConversation.cpp new file mode 100644 index 0000000..501c734 --- /dev/null +++ b/src/game/features/self/SkipConversation.cpp @@ -0,0 +1,18 @@ +#include "core/commands/Command.hpp" +#include "game/backend/Self.hpp" +#include + +namespace YimMenu::Features +{ + class SkipConversation : Command + { + using Command::Command; + + virtual void OnCall() override + { + AUDIO::SKIP_TO_NEXT_SCRIPTED_CONVERSATION_LINE(); + } + }; + + static SkipConversation _SkipConversation{"skipconversation", "Skip Conversation", "Skips current conversation in the phone."}; +} \ No newline at end of file diff --git a/src/game/frontend/submenus/Self.cpp b/src/game/frontend/submenus/Self.cpp index 266270e..a9b9fc7 100644 --- a/src/game/frontend/submenus/Self.cpp +++ b/src/game/frontend/submenus/Self.cpp @@ -23,8 +23,10 @@ namespace YimMenu::Submenus globalsGroup->AddItem(std::make_shared("unlimitedoxygen"_J)); globalsGroup->AddItem(std::make_shared("formatmoney"_J)); globalsGroup->AddItem(std::make_shared("mobileradio"_J)); + globalsGroup->AddItem(std::make_shared("keepplayerclean"_J)); toolsGroup->AddItem(std::make_shared("skipcutscene"_J)); + toolsGroup->AddItem(std::make_shared("skipconversation"_J)); toolsGroup->AddItem(std::make_shared("suicide"_J)); toolsGroup->AddItem(std::make_shared("heal"_J)); toolsGroup->AddItem(std::make_shared("cleardamage"_J)); From 8554c7bb243f964572bcf4d260461ecc02bed9b4 Mon Sep 17 00:00:00 2001 From: latiao-1337 <146958060+latiao-1337@users.noreply.github.com> Date: Fri, 2 May 2025 04:45:33 +0800 Subject: [PATCH 2/9] add hostkick (#259) --- src/game/features/players/kick/HostKick.cpp | 18 ++++++++++++++++++ src/game/frontend/submenus/Player/Kick.cpp | 1 + 2 files changed, 19 insertions(+) create mode 100644 src/game/features/players/kick/HostKick.cpp diff --git a/src/game/features/players/kick/HostKick.cpp b/src/game/features/players/kick/HostKick.cpp new file mode 100644 index 0000000..aa03275 --- /dev/null +++ b/src/game/features/players/kick/HostKick.cpp @@ -0,0 +1,18 @@ +#include "game/commands/PlayerCommand.hpp" +#include "game/backend/NativeHooks.hpp" +#include "game/gta/Natives.hpp" + +namespace YimMenu::Features +{ + class HostKick : public PlayerCommand + { + using PlayerCommand::PlayerCommand; + virtual void OnCall(Player player) override + { + NETWORK::NETWORK_SESSION_KICK_PLAYER(player.GetId()); + } + + }; + + static HostKick _HostKick{"HKick", "Host Kick", "Only available as host and the target is unblockable"}; +} \ No newline at end of file diff --git a/src/game/frontend/submenus/Player/Kick.cpp b/src/game/frontend/submenus/Player/Kick.cpp index d4760b3..abe0301 100644 --- a/src/game/frontend/submenus/Player/Kick.cpp +++ b/src/game/frontend/submenus/Player/Kick.cpp @@ -7,6 +7,7 @@ namespace YimMenu::Submenus auto menu = std::make_shared("Kick"); auto kicks = std::make_shared("Kicks"); + kicks->AddItem(std::make_shared("hkick"_J)); kicks->AddItem(std::make_shared("shkick"_J)); kicks->AddItem(std::make_shared("endkick"_J)); kicks->AddItem(std::make_shared("nfkick"_J)); From cf99e561e1abedd72bb0779211f09aba5490a733 Mon Sep 17 00:00:00 2001 From: kurumimeow Date: Sat, 3 May 2025 19:29:45 +0530 Subject: [PATCH 3/9] fixed cayo perico heist secondary loot causes transaction error (#269) * add heist modifier * move cayo perico cooldown into heist tab * fixes - used tunables instead of globals for primary target - removed cayo perico "remove cooldown" as setup gets the job done * fix cayo perico heist secondary loot causes transaction error * format --- .../recovery/Heist/CayoPericoHeist.cpp | 76 +++++++++---------- .../recovery/Heist/DiamondCasinoHeist.cpp | 36 ++++----- .../features/recovery/Heist/DoomsdayHeist.cpp | 2 +- .../Recovery/Heist/CayoPericoHeist.cpp | 4 +- .../Recovery/Heist/DiamondCasinoHeist.cpp | 4 +- 5 files changed, 61 insertions(+), 61 deletions(-) diff --git a/src/game/features/recovery/Heist/CayoPericoHeist.cpp b/src/game/features/recovery/Heist/CayoPericoHeist.cpp index 401c5df..9867b41 100644 --- a/src/game/features/recovery/Heist/CayoPericoHeist.cpp +++ b/src/game/features/recovery/Heist/CayoPericoHeist.cpp @@ -43,8 +43,8 @@ namespace YimMenu::Features *base.At(0, 27).At(8).At(0).As() = 1; *base.At(1, 27).At(8).At(1).As() = 1; - *base.At(2, 27).At(8).At(2).As() = 1; - *base.At(3, 27).At(8).At(3).As() = 1; + *base.At(2, 27).At(8).At(2).As() = 1; + *base.At(3, 27).At(8).At(3).As() = 1; } }; @@ -80,46 +80,46 @@ namespace YimMenu::Features virtual void OnCall() override { Stats::SetInt("MPX_H4CNF_TARGET", _CayoPericoHeistPrimaryTarget.GetState()); // Primary target - Stats::SetInt("MPX_H4LOOT_CASH_I", 2359448); - Stats::SetInt("MPX_H4LOOT_CASH_I_SCOPED", 2359448); - Stats::SetInt("MPX_H4LOOT_CASH_C", 0); - Stats::SetInt("MPX_H4LOOT_CASH_C_SCOPED", 0); - Stats::SetInt("MPX_H4LOOT_COKE_I", 4901222); - Stats::SetInt("MPX_H4LOOT_COKE_I_SCOPED", 4901222); - Stats::SetInt("MPX_H4LOOT_COKE_C", 0); - Stats::SetInt("MPX_H4LOOT_COKE_C_SCOPED", 0); - Stats::SetInt("MPX_H4LOOT_GOLD_I", 0); - Stats::SetInt("MPX_H4LOOT_GOLD_I_SCOPED", 0); - Stats::SetInt("MPX_H4LOOT_GOLD_C", 255); - Stats::SetInt("MPX_H4LOOT_GOLD_C_SCOPED", 255); - Stats::SetInt("MPX_H4LOOT_WEED_I", 0); - Stats::SetInt("MPX_H4LOOT_WEED_I_SCOPED", 0); - Stats::SetInt("MPX_H4LOOT_WEED_C", 0); - Stats::SetInt("MPX_H4LOOT_WEED_C_SCOPED", 0); - Stats::SetInt("MPX_H4LOOT_PAINT", 127); - Stats::SetInt("MPX_H4LOOT_PAINT_SCOPED", 127); - Stats::SetInt("MPX_H4LOOT_CASH_V", 599431); - Stats::SetInt("MPX_H4LOOT_COKE_V", 1198863); - Stats::SetInt("MPX_H4LOOT_GOLD_V", 1598484); - Stats::SetInt("MPX_H4LOOT_PAINT_V", 1198863); - Stats::SetInt("MPX_H4LOOT_WEED_V", 0); + Stats::SetInt("MPX_H4LOOT_CASH_I", 16711680); + Stats::SetInt("MPX_H4LOOT_CASH_I_SCOPED", 16711680); + Stats::SetInt("MPX_H4LOOT_CASH_C", 0); + Stats::SetInt("MPX_H4LOOT_CASH_C_SCOPED", 0); + Stats::SetInt("MPX_H4LOOT_COKE_I", 255); + Stats::SetInt("MPX_H4LOOT_COKE_I_SCOPED", 255); + Stats::SetInt("MPX_H4LOOT_COKE_C", 0); + Stats::SetInt("MPX_H4LOOT_COKE_C_SCOPED", 0); + Stats::SetInt("MPX_H4LOOT_GOLD_I", 0); + Stats::SetInt("MPX_H4LOOT_GOLD_I_SCOPED", 0); + Stats::SetInt("MPX_H4LOOT_GOLD_C", 255); + Stats::SetInt("MPX_H4LOOT_GOLD_C_SCOPED", 255); + Stats::SetInt("MPX_H4LOOT_WEED_I", 65280); + Stats::SetInt("MPX_H4LOOT_WEED_I_SCOPED", 65280); + Stats::SetInt("MPX_H4LOOT_WEED_C", 0); + Stats::SetInt("MPX_H4LOOT_WEED_C_SCOPED", 0); + Stats::SetInt("MPX_H4LOOT_PAINT", 127); + Stats::SetInt("MPX_H4LOOT_PAINT_SCOPED", 127); + Stats::SetInt("MPX_H4LOOT_CASH_V", 83250); + Stats::SetInt("MPX_H4LOOT_COKE_V", 202500); + Stats::SetInt("MPX_H4LOOT_GOLD_V", 333333); + Stats::SetInt("MPX_H4LOOT_WEED_V", 135000); + Stats::SetInt("MPX_H4LOOT_PAINT_V", 180000); Stats::SetInt("MPX_H4_PROGRESS", _CayoPericoHeistDifficulty.GetState()); // Difficulty - Stats::SetInt("MPX_H4CNF_BS_GEN", 262143); - Stats::SetInt("MPX_H4CNF_BS_ENTR", 63); - Stats::SetInt("MPX_H4CNF_BS_ABIL", 63); - Stats::SetInt("MPX_H4CNF_WEP_DISRP", 3); - Stats::SetInt("MPX_H4CNF_ARM_DISRP", 3); - Stats::SetInt("MPX_H4CNF_HEL_DISRP", 3); - Stats::SetInt("MPX_H4CNF_APPROACH", -1); - Stats::SetInt("MPX_H4CNF_BOLTCUT", 4424); - Stats::SetInt("MPX_H4CNF_UNIFORM", 5256); - Stats::SetInt("MPX_H4CNF_GRAPPEL", 5156); - Stats::SetInt("MPX_H4_MISSIONS", -1); + Stats::SetInt("MPX_H4CNF_BS_GEN", 262143); + Stats::SetInt("MPX_H4CNF_BS_ENTR", 63); + Stats::SetInt("MPX_H4CNF_BS_ABIL", 63); + Stats::SetInt("MPX_H4CNF_WEP_DISRP", 3); + Stats::SetInt("MPX_H4CNF_ARM_DISRP", 3); + Stats::SetInt("MPX_H4CNF_HEL_DISRP", 3); + Stats::SetInt("MPX_H4CNF_APPROACH", -1); + Stats::SetInt("MPX_H4CNF_BOLTCUT", 4424); + Stats::SetInt("MPX_H4CNF_UNIFORM", 5256); + Stats::SetInt("MPX_H4CNF_GRAPPEL", 5156); + Stats::SetInt("MPX_H4_MISSIONS", -1); Stats::SetInt("MPX_H4CNF_WEAPONS", _CayoPericoHeistWeapon.GetState()); // Weapon - Stats::SetInt("MPX_H4CNF_TROJAN", 5); + Stats::SetInt("MPX_H4CNF_TROJAN", 5); Stats::SetInt("MPX_H4_PLAYTHROUGH_STATUS", 100); - ScriptMgr::Yield(500ms); + ScriptMgr::Yield(500ms); *ScriptLocal("heist_island_planning"_J, 1566).As() = 2; } diff --git a/src/game/features/recovery/Heist/DiamondCasinoHeist.cpp b/src/game/features/recovery/Heist/DiamondCasinoHeist.cpp index 0fa8ac0..7e6c251 100644 --- a/src/game/features/recovery/Heist/DiamondCasinoHeist.cpp +++ b/src/game/features/recovery/Heist/DiamondCasinoHeist.cpp @@ -42,8 +42,8 @@ namespace YimMenu::Features *base.At(0, 68).At(8).At(0).As() = 1; *base.At(1, 68).At(8).At(1).As() = 1; - *base.At(2, 68).At(8).At(2).As() = 1; - *base.At(3, 68).At(8).At(3).As() = 1; + *base.At(2, 68).At(8).At(2).As() = 1; + *base.At(3, 68).At(8).At(3).As() = 1; } }; @@ -66,9 +66,9 @@ namespace YimMenu::Features static std::vector>>> diamondCasinoHeistWeapon = { { - {{0, "MK II Shotgun Loadout"}, {1, "MK II Rifle Loadout"}}, - {{0, "MK II SMG Loadout"}, {1, "MK II Rifle Loadout"}}, - {{0, "MK II Shotgun Loadout"}, {1, "MK II Rifle Loadout"}} + {{0, "MK II Shotgun Loadout"}, {1, "MK II Rifle Loadout"}}, + {{0, "MK II SMG Loadout"}, {1, "MK II Rifle Loadout"}}, + {{0, "MK II Shotgun Loadout"}, {1, "MK II Rifle Loadout"}} }, { {{0, "Rifle Loadout"}, {1, "Shotgun Loadout"}}, @@ -81,17 +81,17 @@ namespace YimMenu::Features {{0, "Shotgun Loadout"}, {1, "Combat MG Loadout"}} }, { - {{0, "SMG Loadout"}, {1, "Shotgun Loadout"}}, - {{0, "Machine Pistol Loadout"}, {1, "Shotgun Loadout"}}, - {{0, "SMG Loadout"}, {1, "Shotgun Loadout"}} + {{0, "SMG Loadout"}, {1, "Shotgun Loadout"}}, + {{0, "Machine Pistol Loadout"}, {1, "Shotgun Loadout"}}, + {{0, "SMG Loadout"}, {1, "Shotgun Loadout"}} }, { - {{0, "Micro SMG Loadout"}, {1, "Machine Pistol Loadout"}}, - {{0, "Micro SMG Loadout"}, {1, "Shotgun Loadout"}}, + {{0, "Micro SMG Loadout"}, {1, "Machine Pistol Loadout"}}, + {{0, "Micro SMG Loadout"}, {1, "Shotgun Loadout"}}, {{0, "Shotgun Loadout"}, {1, "Revolver Loadout"}} }, { - {{0, " "}, {1, ""}}, + {{0, " "}, {1, ""}}, {{0, ""}, {1, ""}}, {{0, ""}, {1, ""}} } @@ -152,7 +152,7 @@ namespace YimMenu::Features {{0, "Retinue MK II"}, {1, "Drifty Yosemite"}, {2, "Sugoi"}, {3, "Jugular"}}, {{0, "Manchez"}, {1, "Stryder"}, {2, "Defiler"}, {3, "Lectro"}}, {{0, "Issi Classic"}, {1, "Asbo"}, {2, "Kanjo"}, {3, "Sentinel Classic"}}, - {{0, " "}, {1, ""}, {2, ""}, {3, ""}} + {{0, " "}, {1, ""}, {2, ""}, {3, ""}} }; static ListCommand _DiamondCasinoHeistVehicle{"diamondcasinoheistvehicle", "Vehicle", "Vehicle", diamondCasinoHeistVehicle[5], 0}; @@ -179,11 +179,11 @@ namespace YimMenu::Features static std::vector> diamondCasinoHeistHacker = { {4, "Avi Schwartzman"}, - {5, "Paige Harris"}, - {2, "Christian Feltz"}, - {3, "Yohan Blair"}, - {1, "Rickie Lukens"}, - {6, "Remove Hacker"} + {5, "Paige Harris"}, + {2, "Christian Feltz"}, + {3, "Yohan Blair"}, + {1, "Rickie Lukens"}, + {6, "Remove Hacker"} }; static ListCommand _DiamondCasinoHeistHacker{"diamondcasinoheisthacker", "Hacker", "Hacker", diamondCasinoHeistHacker, 6}; @@ -242,7 +242,7 @@ namespace YimMenu::Features Stats::SetInt("MPX_H3OPT_BITSET0", rand() % (INT_MAX)); // Refresh board Stats::SetInt("MPX_H3OPT_BITSET1", rand() % (INT_MAX)); // Refresh board - ScriptMgr::Yield(500ms); + ScriptMgr::Yield(500ms); Stats::SetInt("MPX_H3OPT_BITSET0", -1); // Refresh board Stats::SetInt("MPX_H3OPT_BITSET1", -1); // Refresh board diff --git a/src/game/features/recovery/Heist/DoomsdayHeist.cpp b/src/game/features/recovery/Heist/DoomsdayHeist.cpp index 2431dd3..d2c19c7 100644 --- a/src/game/features/recovery/Heist/DoomsdayHeist.cpp +++ b/src/game/features/recovery/Heist/DoomsdayHeist.cpp @@ -40,7 +40,7 @@ namespace YimMenu::Features *base.At(0, 149).At(43).At(0).At(4).At(8).As() = 1; *base.At(1, 149).At(43).At(1).At(4).At(8).As() = 1; - *base.At(2, 149).At(43).At(2).At(4).At(8).As() = 1; + *base.At(2, 149).At(43).At(2).At(4).At(8).As() = 1; *base.At(3, 149).At(43).At(3).At(4).At(8).As() = 1; } }; diff --git a/src/game/frontend/submenus/Recovery/Heist/CayoPericoHeist.cpp b/src/game/frontend/submenus/Recovery/Heist/CayoPericoHeist.cpp index 471059f..a4050e1 100644 --- a/src/game/frontend/submenus/Recovery/Heist/CayoPericoHeist.cpp +++ b/src/game/frontend/submenus/Recovery/Heist/CayoPericoHeist.cpp @@ -27,12 +27,12 @@ namespace YimMenu::Submenus loots->AddItem(std::make_shared([] { ImGui::SameLine(); })); - loots->AddItem(std::make_shared("cayopericoheistsetprimarytargetvalue"_J)); + loots->AddItem(std::make_shared("cayopericoheistsetprimarytargetvalue"_J, "Set##primarytargetvalue")); loots->AddItem(std::make_shared("cayopericoheistsecondarytakevalue"_J)); loots->AddItem(std::make_shared([] { ImGui::SameLine(); })); - loots->AddItem(std::make_shared("cayopericoheistsetsecondarytakevalue"_J)); + loots->AddItem(std::make_shared("cayopericoheistsetsecondarytakevalue"_J, "Set##secondarytakevalue")); misc->AddItem(std::make_shared("cayopericoheistskiphacking"_J)); misc->AddItem(std::make_shared("cayopericoheistcutsewer"_J)); diff --git a/src/game/frontend/submenus/Recovery/Heist/DiamondCasinoHeist.cpp b/src/game/frontend/submenus/Recovery/Heist/DiamondCasinoHeist.cpp index 3ef6b85..a7b9463 100644 --- a/src/game/frontend/submenus/Recovery/Heist/DiamondCasinoHeist.cpp +++ b/src/game/frontend/submenus/Recovery/Heist/DiamondCasinoHeist.cpp @@ -39,12 +39,12 @@ namespace YimMenu::Submenus loots->AddItem(std::make_shared([] { ImGui::SameLine(); })); - loots->AddItem(std::make_shared("diamondcasinoheistsetpotentialtake"_J)); + loots->AddItem(std::make_shared("diamondcasinoheistsetpotentialtake"_J, "Set##potentialtake")); loots->AddItem(std::make_shared("diamondcasinoheistactualtake"_J)); loots->AddItem(std::make_shared([] { ImGui::SameLine(); })); - loots->AddItem(std::make_shared("diamondcasinoheistsetactualtake"_J)); + loots->AddItem(std::make_shared("diamondcasinoheistsetactualtake"_J, "Set##actualtake")); misc->AddItem(std::make_shared("diamondcasinoheistskiphacking"_J)); misc->AddItem(std::make_shared("diamondcasinoheistskipdrilling"_J)); From 947cae56c4eb2f08e6b4c3c9cc68f453ad7dd932 Mon Sep 17 00:00:00 2001 From: Arthur <121949966+ShinyWasabi@users.noreply.github.com> Date: Sun, 4 May 2025 16:51:10 +0300 Subject: [PATCH 4/9] feat(network): Pause Game (#282) --- src/core/hooking/Hooking.cpp | 2 ++ src/game/features/network/PauseGame.cpp | 35 +++++++++++++++++++++++++ src/game/frontend/submenus/Network.cpp | 1 + src/game/frontend/submenus/Self.cpp | 2 +- src/game/hooks/Hooks.hpp | 5 ++++ src/game/pointers/Pointers.cpp | 10 +++++++ src/game/pointers/Pointers.hpp | 2 ++ 7 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 src/game/features/network/PauseGame.cpp diff --git a/src/core/hooking/Hooking.cpp b/src/core/hooking/Hooking.cpp index 9667da0..56a6707 100644 --- a/src/core/hooking/Hooking.cpp +++ b/src/core/hooking/Hooking.cpp @@ -35,6 +35,8 @@ namespace YimMenu BaseHook::Add(new DetourHook("WriteNetArrayData", Pointers.WriteNetArrayData, Hooks::Spoofing::WriteNetArrayData)); BaseHook::Add(new DetourHook("WriteNodeData", Pointers.WriteNodeData, Hooks::Spoofing::WriteNodeData)); BaseHook::Add(new DetourHook("WriteSyncTree", Pointers.WriteSyncTree, Hooks::Spoofing::WriteSyncTree)); + + BaseHook::Add(new DetourHook("OpenPauseMenu", Pointers.OpenPauseMenu, Hooks::Features::OpenPauseMenu)); } Hooking::~Hooking() diff --git a/src/game/features/network/PauseGame.cpp b/src/game/features/network/PauseGame.cpp new file mode 100644 index 0000000..5c8539e --- /dev/null +++ b/src/game/features/network/PauseGame.cpp @@ -0,0 +1,35 @@ +#include "core/commands/BoolCommand.hpp" +#include "core/hooking/DetourHook.hpp" +#include "game/hooks/Hooks.hpp" +#include "game/pointers/Pointers.hpp" + +namespace YimMenu::Features +{ + class PauseGame : public BoolCommand + { + using BoolCommand::BoolCommand; + + virtual void OnEnable() override + { + Pointers.AllowPausingInSessionPatch->Apply(); + } + + virtual void OnDisable() override + { + Pointers.AllowPausingInSessionPatch->Restore(); + } + }; + + static PauseGame _PauseGame{"pausegame", "Pause Game", "Allows you to pause the game in online (local only)."}; +} + +namespace YimMenu::Hooks +{ + void Features::OpenPauseMenu(uint32_t menuHash, bool pause, uint32_t unk1, bool unk2) + { + if (YimMenu::Features::_PauseGame.GetState() && menuHash == 0xBA33ADB3) + pause = true; + + BaseHook::Get>()->Original()(menuHash, pause, unk1, unk2); + } +} \ No newline at end of file diff --git a/src/game/frontend/submenus/Network.cpp b/src/game/frontend/submenus/Network.cpp index b521f35..0e3d22b 100644 --- a/src/game/frontend/submenus/Network.cpp +++ b/src/game/frontend/submenus/Network.cpp @@ -79,6 +79,7 @@ namespace YimMenu::Submenus enhancements->AddItem(std::make_shared("despawnbypass"_J)); // move this somewhere else? enhancements->AddItem(std::make_shared("bypasscasinogeoblock"_J)); enhancements->AddItem(std::make_shared("forcescripthost"_J)); + enhancements->AddItem(std::make_shared("pausegame"_J)); session->AddItem(joinGroup); session->AddItem(bountyGroup); diff --git a/src/game/frontend/submenus/Self.cpp b/src/game/frontend/submenus/Self.cpp index a9b9fc7..9d752da 100644 --- a/src/game/frontend/submenus/Self.cpp +++ b/src/game/frontend/submenus/Self.cpp @@ -11,7 +11,7 @@ namespace YimMenu::Submenus auto main = std::make_shared("Main"); auto globalsGroup = std::make_shared("Globals"); auto movementGroup = std::make_shared("Movement"); - auto toolsGroup = std::make_shared("Tools", 1); + auto toolsGroup = std::make_shared("Tools", 2); auto wantedGroup = std::make_shared("Wanted"); globalsGroup->AddItem(std::make_shared("godmode"_J)); diff --git a/src/game/hooks/Hooks.hpp b/src/game/hooks/Hooks.hpp index e88af87..8e8d3a6 100644 --- a/src/game/hooks/Hooks.hpp +++ b/src/game/hooks/Hooks.hpp @@ -73,4 +73,9 @@ namespace YimMenu::Hooks { extern LRESULT WndProc(HWND hwnd, UINT umsg, WPARAM wparam, LPARAM lparam); } + + namespace Features + { + extern void OpenPauseMenu(uint32_t menuHash, bool pause, uint32_t unk1, bool unk2); + } } \ No newline at end of file diff --git a/src/game/pointers/Pointers.cpp b/src/game/pointers/Pointers.cpp index e1b793f..c84c9be 100644 --- a/src/game/pointers/Pointers.cpp +++ b/src/game/pointers/Pointers.cpp @@ -334,6 +334,16 @@ namespace YimMenu GetAssistedAimTypePatch = BytePatches::Add(ptr.Sub(0xE).As(), std::vector{0xB0, 0x01, 0xC3}); }); + constexpr auto allowPausingInSessionPatchPtrn = Pattern<"80 88 ? ? ? ? ? EB ? E8">("AllowPausingInSessionPatch"); + scanner.Add(allowPausingInSessionPatchPtrn, [this](PointerCalculator ptr) { + AllowPausingInSessionPatch = BytePatches::Add(ptr.Sub(0x1E).As(), 0xEB); + }); + + constexpr auto openPauseMenuPtrn = Pattern<"E9 ? ? ? ? B9 30 09 09 21">("OpenPauseMenu"); + scanner.Add(openPauseMenuPtrn, [this](PointerCalculator ptr) { + OpenPauseMenu = ptr.Add(1).Rip().As(); + }); + if (!scanner.Scan()) { LOG(FATAL) << "Some patterns could not be found, unloading."; diff --git a/src/game/pointers/Pointers.hpp b/src/game/pointers/Pointers.hpp index 8a5a878..958392f 100644 --- a/src/game/pointers/Pointers.hpp +++ b/src/game/pointers/Pointers.hpp @@ -140,6 +140,8 @@ namespace YimMenu PVOID FormatIntCaller2; BytePatch ShouldNotTargetEntityPatch; BytePatch GetAssistedAimTypePatch; + BytePatch AllowPausingInSessionPatch; + PVOID OpenPauseMenu; }; struct Pointers : PointerData From 3fd450c3961bf8639940b7c23910abfdc1586fa8 Mon Sep 17 00:00:00 2001 From: latiao-1337 <146958060+latiao-1337@users.noreply.github.com> Date: Mon, 5 May 2025 09:43:21 +0800 Subject: [PATCH 5/9] add peds ignore and CopsDispatch and PedRiotMode and ExplosiveAmmo (#279) * add peds ignore * CopsDispatch * PedRiotMode * ExplosiveAmmo * improve --- src/game/features/self/ExplosiveAmmo.cpp | 21 +++++++++++++++++ src/game/features/world/CopsDispatch.cpp | 25 ++++++++++++++++++++ src/game/features/world/Pedsignore.cpp | 30 ++++++++++++++++++++++++ src/game/features/world/RiotMode.cpp | 25 ++++++++++++++++++++ src/game/frontend/submenus/Self.cpp | 1 + src/game/frontend/submenus/World.cpp | 9 +++++++ 6 files changed, 111 insertions(+) create mode 100644 src/game/features/self/ExplosiveAmmo.cpp create mode 100644 src/game/features/world/CopsDispatch.cpp create mode 100644 src/game/features/world/Pedsignore.cpp create mode 100644 src/game/features/world/RiotMode.cpp diff --git a/src/game/features/self/ExplosiveAmmo.cpp b/src/game/features/self/ExplosiveAmmo.cpp new file mode 100644 index 0000000..a9f7280 --- /dev/null +++ b/src/game/features/self/ExplosiveAmmo.cpp @@ -0,0 +1,21 @@ +#include "core/commands/LoopedCommand.hpp" +#include "game/backend/Self.hpp" +#include "game/gta/Pools.hpp" + +#include + +namespace YimMenu::Features +{ + class ExplosiveAmmo : public LoopedCommand + { + using LoopedCommand::LoopedCommand; + virtual void OnTick() override + { + MISC::SET_EXPLOSIVE_AMMO_THIS_FRAME(Self::GetPlayer().GetId()); + + } + }; + + static ExplosiveAmmo _ExplosiveAmmo{"ExplosiveAmmo", "Explosive Ammo", "Every bullet you shoot explodes."}; + +} \ No newline at end of file diff --git a/src/game/features/world/CopsDispatch.cpp b/src/game/features/world/CopsDispatch.cpp new file mode 100644 index 0000000..0551408 --- /dev/null +++ b/src/game/features/world/CopsDispatch.cpp @@ -0,0 +1,25 @@ +#include "core/commands/LoopedCommand.hpp" +#include "game/backend/Self.hpp" +#include "game/gta/Pools.hpp" + +#include + +namespace YimMenu::Features +{ + class CopsDispatch : public LoopedCommand + { + using LoopedCommand::LoopedCommand; + virtual void OnTick() override + { + PLAYER::SET_DISPATCH_COPS_FOR_PLAYER(Self::GetPlayer().GetId(), FALSE); + } + + virtual void OnDisable() override + { + PLAYER::SET_DISPATCH_COPS_FOR_PLAYER(Self::GetPlayer().GetId(), TRUE); + } + }; + + static CopsDispatch _CopsDispatch{"CopsDispatch", "Cops Dispatch", "When you are wanted, no police will be spawned."}; + +} \ No newline at end of file diff --git a/src/game/features/world/Pedsignore.cpp b/src/game/features/world/Pedsignore.cpp new file mode 100644 index 0000000..24130b5 --- /dev/null +++ b/src/game/features/world/Pedsignore.cpp @@ -0,0 +1,30 @@ +#include "core/commands/LoopedCommand.hpp" +#include "game/gta/Pools.hpp" +#include "game/backend/Self.hpp" +#include + +namespace YimMenu::Features +{ + class PedIgnore : public LoopedCommand + { + using LoopedCommand::LoopedCommand; + virtual void OnTick() override + { + PLAYER::SET_EVERYONE_IGNORE_PLAYER(Self::GetPlayer().GetId(), TRUE); + PLAYER::SET_POLICE_IGNORE_PLAYER(Self::GetPlayer().GetId(), TRUE); + PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS_FOR_AMBIENT_PEDS_THIS_FRAME(TRUE); + PED::SET_PED_RESET_FLAG(Self::GetPed().GetHandle(), 124, true); + + } + + virtual void OnDisable() override + { + PLAYER::SET_EVERYONE_IGNORE_PLAYER(Self::GetPlayer().GetId(), FALSE); + PLAYER::SET_POLICE_IGNORE_PLAYER(Self::GetPlayer().GetId(), FALSE); + + } + }; + + static PedIgnore _PedIgnore{"pedsignore", "Peds Ignore", "Nearby peds will ignore you and become oblivious to your actions."}; + +} \ No newline at end of file diff --git a/src/game/features/world/RiotMode.cpp b/src/game/features/world/RiotMode.cpp new file mode 100644 index 0000000..66fb40f --- /dev/null +++ b/src/game/features/world/RiotMode.cpp @@ -0,0 +1,25 @@ +#include "core/commands/LoopedCommand.hpp" +#include "game/backend/Self.hpp" +#include "game/gta/Pools.hpp" + +#include + +namespace YimMenu::Features +{ + class PedRiotMode : public LoopedCommand + { + using LoopedCommand::LoopedCommand; + virtual void OnTick() override + { + MISC::SET_RIOT_MODE_ENABLED(TRUE); + } + + virtual void OnDisable() override + { + MISC::SET_RIOT_MODE_ENABLED(FALSE); + } + }; + + static PedRiotMode _PedRiotMode{"PedRiotMode", "Riot Mode", "All PEDs attack each other."}; + +} \ No newline at end of file diff --git a/src/game/frontend/submenus/Self.cpp b/src/game/frontend/submenus/Self.cpp index 9d752da..129b688 100644 --- a/src/game/frontend/submenus/Self.cpp +++ b/src/game/frontend/submenus/Self.cpp @@ -66,6 +66,7 @@ namespace YimMenu::Submenus weaponsGlobalsGroup->AddItem(std::make_shared("rapidfire"_J)); weaponsGlobalsGroup->AddItem(std::make_shared("aimbot"_J)); weaponsGlobalsGroup->AddItem(std::make_shared("infiniteparachutes"_J)); + weaponsGlobalsGroup->AddItem(std::make_shared("ExplosiveAmmo"_J)); weaponsGlobalsGroup->AddItem(std::make_shared("giveallweapons"_J)); weapons->AddItem(weaponsGlobalsGroup); diff --git a/src/game/frontend/submenus/World.cpp b/src/game/frontend/submenus/World.cpp index 7a23e5f..fd8d64f 100644 --- a/src/game/frontend/submenus/World.cpp +++ b/src/game/frontend/submenus/World.cpp @@ -27,10 +27,16 @@ namespace YimMenu::Submenus weatherOpts->AddItem(std::make_shared("forceweather"_J, std::make_shared("setweather"_J), true)); weatherOpts->AddItem(std::make_shared("forceweather"_J)); + auto otherOpts = std::make_shared("Other", 1); + otherOpts->AddItem(std::make_shared("pedsignore"_J)); + otherOpts->AddItem(std::make_shared("PedRiotMode"_J)); + otherOpts->AddItem(std::make_shared("CopsDispatch"_J)); + main->AddItem(std::move(killPeds)); main->AddItem(std::move(deleteOpts)); main->AddItem(std::move(bringOpts)); main->AddItem(std::move(weatherOpts)); + main->AddItem(std::move(otherOpts)); auto spawnGroup = std::make_shared("Vehicle"); auto modsGroup = std::make_shared("Modifications"); @@ -52,6 +58,9 @@ namespace YimMenu::Submenus iplsGroup->AddItem(std::make_shared("unloadipl"_J)); iplsGroup->AddItem(std::make_shared("ipltp"_J)); + + + AddCategory(std::move(main)); AddCategory(std::move(spawnersGroup)); AddCategory(std::move(iplsGroup)); From afc062776629e0a15f4c884ef00594fbbf5a61ef Mon Sep 17 00:00:00 2001 From: Mr-X-GTA <110748953+Mr-X-GTA@users.noreply.github.com> Date: Wed, 7 May 2025 02:40:43 +0200 Subject: [PATCH 6/9] feat(self): improve aimbot (#285) * feat(self): improve aimbot * feat(tlsContext): update for 1.70-814.9 --- src/game/features/self/Aimbot.cpp | 32 +++++++++++++++++++++++++++++ src/game/frontend/submenus/Self.cpp | 7 ++++++- src/game/pointers/Pointers.cpp | 25 ++++++++++++++-------- src/game/pointers/Pointers.hpp | 2 ++ src/types/rage/tlsContext.hpp | 4 ++-- 5 files changed, 59 insertions(+), 11 deletions(-) diff --git a/src/game/features/self/Aimbot.cpp b/src/game/features/self/Aimbot.cpp index 42375cb..486b89b 100644 --- a/src/game/features/self/Aimbot.cpp +++ b/src/game/features/self/Aimbot.cpp @@ -20,5 +20,37 @@ namespace YimMenu::Features } }; + class AimbotAimForHead : BoolCommand + { + using BoolCommand::BoolCommand; + + virtual void OnEnable() override + { + Pointers.GetLockOnPosPatch->Apply(); + } + + virtual void OnDisable() override + { + Pointers.GetLockOnPosPatch->Restore(); + } + }; + + class AimbotTargetDrivers : BoolCommand + { + using BoolCommand::BoolCommand; + + virtual void OnEnable() override + { + Pointers.ShouldAllowDriverLockOnPatch->Apply(); + } + + virtual void OnDisable() override + { + Pointers.ShouldAllowDriverLockOnPatch->Restore(); + } + }; + static Aimbot _Aimbot{"aimbot", "Aimbot", "Locks on to enemies and other players"}; + static AimbotAimForHead _AimbotAimForHead{"aimbotaimforhead", "Aim For Head", "Targets the head when locking on to enemies and other players"}; + static AimbotTargetDrivers _AimbotTargetDrivers{"aimbottargetdrivers", "Target Drivers", "Allows aimbot to lock on to enemies and other players in vehicles"}; } \ No newline at end of file diff --git a/src/game/frontend/submenus/Self.cpp b/src/game/frontend/submenus/Self.cpp index 129b688..c01c7b8 100644 --- a/src/game/frontend/submenus/Self.cpp +++ b/src/game/frontend/submenus/Self.cpp @@ -60,16 +60,21 @@ namespace YimMenu::Submenus auto weapons = std::make_shared("Weapons"); auto weaponsGlobalsGroup = std::make_shared("Globals"); + auto weaponsAimbotGroup = std::make_shared("Aimbot", 1); weaponsGlobalsGroup->AddItem(std::make_shared("infiniteammo"_J)); weaponsGlobalsGroup->AddItem(std::make_shared("infiniteclip"_J)); weaponsGlobalsGroup->AddItem(std::make_shared("rapidfire"_J)); - weaponsGlobalsGroup->AddItem(std::make_shared("aimbot"_J)); weaponsGlobalsGroup->AddItem(std::make_shared("infiniteparachutes"_J)); weaponsGlobalsGroup->AddItem(std::make_shared("ExplosiveAmmo"_J)); weaponsGlobalsGroup->AddItem(std::make_shared("giveallweapons"_J)); + weaponsAimbotGroup->AddItem(std::make_shared("aimbot"_J)); + weaponsAimbotGroup->AddItem(std::make_shared("aimbot"_J, std::make_shared("aimbotaimforhead"_J))); + weaponsAimbotGroup->AddItem(std::make_shared("aimbot"_J, std::make_shared("aimbottargetdrivers"_J))); + weapons->AddItem(weaponsGlobalsGroup); + weapons->AddItem(weaponsAimbotGroup); AddCategory(std::move(weapons)); auto vehicle = std::make_shared("Vehicle"); diff --git a/src/game/pointers/Pointers.cpp b/src/game/pointers/Pointers.cpp index c84c9be..3eb2fc0 100644 --- a/src/game/pointers/Pointers.cpp +++ b/src/game/pointers/Pointers.cpp @@ -184,7 +184,7 @@ namespace YimMenu constexpr auto worldModelSpawnBypassPtrn = Pattern<"4C 8B 2C 01 4D 85 ED 0F 84 ? ? ? ?">("WorldModelSpawnBypass"); scanner.Add(worldModelSpawnBypassPtrn, [this](PointerCalculator ptr) { - WorldModelSpawnBypass = BytePatches::Add(ptr.Add(4).As(), std::vector{0xEB, 0x12, 0x90}); + WorldModelSpawnBypass = BytePatches::Add(ptr.Add(4).As(), std::to_array({0xEB, 0x12, 0x90})); }); constexpr auto receiveNetMessagePtrn = Pattern<"48 81 C1 00 03 00 00 4C 89 E2">("ReceiveNetMessage"); @@ -239,7 +239,7 @@ namespace YimMenu constexpr auto netArrayCachedDataPatchPtrn = Pattern<"0F 84 64 FE FF FF FF">("NetArrayCachedDataPatch"); scanner.Add(netArrayCachedDataPatchPtrn, [this](PointerCalculator ptr) { - NetArrayCachedDataPatch = BytePatches::Add(ptr.As(), std::vector{0xE9, 0x65, 0xFE, 0xFF, 0xFF, 0x90}); + NetArrayCachedDataPatch = BytePatches::Add(ptr.As(), std::to_array({0xE9, 0x65, 0xFE, 0xFF, 0xFF, 0x90})); }); constexpr auto statsMgrPtrn = Pattern<"89 6C 24 28 48 8D 0D ? ? ? ? 48 8D">("CStatsMgr"); @@ -325,13 +325,22 @@ namespace YimMenu constexpr auto shouldTargetEntityPatchPtrn = Pattern<"F6 80 A9 14 00 00 01">("ShouldNotTargetEntityPatch"); scanner.Add(shouldTargetEntityPatchPtrn, [this](PointerCalculator ptr) { - ShouldNotTargetEntityPatch = BytePatches::Add(ptr.Sub(0x53).As(), std::vector{0xB0, 0x00, 0xC3}); + ShouldNotTargetEntityPatch = BytePatches::Add(ptr.Sub(0x53).As(), std::to_array({0xB0, 0x00, 0xC3})); }); - // TODO: this has been inlined a lot in Enhanced - constexpr auto getAssistedAimTypePatchPtrn = Pattern<"48 85 C0 74 15 8B 80 ? ? ? ? BE 03">("GetAssistedAimTypePatch"); + constexpr auto getAssistedAimTypePatchPtrn = Pattern<"FF E0 48 8D 86">("GetAssistedAimTypePatch"); scanner.Add(getAssistedAimTypePatchPtrn, [this](PointerCalculator ptr) { - GetAssistedAimTypePatch = BytePatches::Add(ptr.Sub(0xE).As(), std::vector{0xB0, 0x01, 0xC3}); + GetAssistedAimTypePatch = BytePatches::Add(ptr.Sub(0x15).As(), std::to_array({0xBD, 0x01, 0x00, 0x00, 0x00})); + }); + + constexpr auto getLockOnPosPatchPtrn = Pattern<"0F 29 74 24 ? 48 89 D6 48 89 CF 48 8B 05">("GetLockOnPosPatch"); + scanner.Add(getLockOnPosPatchPtrn, [this](PointerCalculator ptr) { + GetLockOnPosPatch = BytePatches::Add(ptr.Add(0x22).As(), 0xEB); + }); + + constexpr auto shouldAllowDriverLockOnPatchPtrn = Pattern<"75 ? 45 89 C7 49 89 CE">("ShouldAllowDriverLockOnPatch"); + scanner.Add(shouldAllowDriverLockOnPatchPtrn, [this](PointerCalculator ptr) { + ShouldAllowDriverLockOnPatch = BytePatches::Add(ptr.Sub(0x2C).As(), std::to_array({0xB0, 0x01, 0xC3})); }); constexpr auto allowPausingInSessionPatchPtrn = Pattern<"80 88 ? ? ? ? ? EB ? E8">("AllowPausingInSessionPatch"); @@ -385,12 +394,12 @@ namespace YimMenu constexpr auto readAttributePatchPtrn = Pattern<"75 70 EB 23">("ReadAttributesPatch"); scanner.Add(readAttributePatchPtrn, [this](PointerCalculator ptr) { - BytePatches::Add(ptr.As(), std::vector{0x90, 0x90})->Apply(); + BytePatches::Add(ptr.As(), std::to_array({0x90, 0x90}))->Apply(); }); constexpr auto readAttributePatch2Ptrn = Pattern<"32 C0 EB ? C7 83">("ReadAttributesPatch2"); scanner.Add(readAttributePatch2Ptrn, [this](PointerCalculator ptr) { - BytePatches::Add(ptr.As(), std::vector{0xB0, 0x01})->Apply(); + BytePatches::Add(ptr.As(), std::to_array({0xB0, 0x01}))->Apply(); }); constexpr auto getAvatarsPtrn = Pattern<"89 4E 7C 48 8B CE E8 ? ? ? ? 84 C0">("GetAvatars"); diff --git a/src/game/pointers/Pointers.hpp b/src/game/pointers/Pointers.hpp index 958392f..34e632f 100644 --- a/src/game/pointers/Pointers.hpp +++ b/src/game/pointers/Pointers.hpp @@ -140,6 +140,8 @@ namespace YimMenu PVOID FormatIntCaller2; BytePatch ShouldNotTargetEntityPatch; BytePatch GetAssistedAimTypePatch; + BytePatch GetLockOnPosPatch; + BytePatch ShouldAllowDriverLockOnPatch; BytePatch AllowPausingInSessionPatch; PVOID OpenPauseMenu; }; diff --git a/src/types/rage/tlsContext.hpp b/src/types/rage/tlsContext.hpp index f2ffbc5..e389d8c 100644 --- a/src/types/rage/tlsContext.hpp +++ b/src/types/rage/tlsContext.hpp @@ -8,7 +8,7 @@ namespace rage class tlsContext { public: - char m_Pad1[0x7A0]; + char m_Pad1[0x7A8]; rage::scrThread* m_CurrentScriptThread; bool m_ScriptThreadActive; @@ -18,5 +18,5 @@ namespace rage return *reinterpret_cast(__readgsqword(0x58) + TlsIndex); } }; - static_assert(sizeof(tlsContext) == 0x7B0); + static_assert(sizeof(tlsContext) == 0x7B8); } \ No newline at end of file From a08503160cb73d12d907a519dca6fee367a8386f Mon Sep 17 00:00:00 2001 From: Bega <139539636+BegaMetaZone@users.noreply.github.com> Date: Sat, 10 May 2025 16:17:01 +0330 Subject: [PATCH 7/9] Feature/outfit editor (#140) * Cleaned up logic and UI placement as per feedback. Reorganized into a dedicated category under the Self menu (not a separate submenu). Some Error handling and more fixes . * feat(OutfitEditor): Fixed Ui And Added Randomize Outfit Button * feat: fixed outfit editor * fixed include path * Fix(Outift Editor) Removed int GetMaxDrawable(int slot); int GetMaxTexture(int slot, int drawable); int GetMaxPropDrawable(int slot); int GetMaxPropTexture(int slot, int drawable); void GetOutfitSlot(int slot, int& drawable, int& texture); void GetPropSlot(int slot, int& drawable, int& texture); void SetOutfitSlot(int slot, int drawable, int texture); void SetPropSlot(int slot, int drawable, int texture); Since They are already in the .cpp file of outfit editor thx maybegreat48 * Fix(Outift Editor): ui --------- Co-authored-by: L7NEG --- src/game/frontend/submenus/OutfitEditor.cpp | 232 ++++++++++++++++++++ src/game/frontend/submenus/OutfitEditor.hpp | 7 + src/game/frontend/submenus/Self.cpp | 4 + 3 files changed, 243 insertions(+) create mode 100644 src/game/frontend/submenus/OutfitEditor.cpp create mode 100644 src/game/frontend/submenus/OutfitEditor.hpp diff --git a/src/game/frontend/submenus/OutfitEditor.cpp b/src/game/frontend/submenus/OutfitEditor.cpp new file mode 100644 index 0000000..029cd91 --- /dev/null +++ b/src/game/frontend/submenus/OutfitEditor.cpp @@ -0,0 +1,232 @@ +#include "OutfitEditor.hpp" + +#include "core/frontend/manager/UIManager.hpp" +#include "game/backend/Self.hpp" +#include "game/frontend/items/Items.hpp" +#include "game/gta/Natives.hpp" +#include "imgui.h" + +#include +#include + +namespace YimMenu +{ + int GetMaxDrawable(int slot) + { + auto ped = Self::GetPed(); + return PED::GET_NUMBER_OF_PED_DRAWABLE_VARIATIONS(static_cast(ped.GetHandle()), slot); + } + + int GetMaxTexture(int slot, int drawable) + { + auto ped = Self::GetPed(); + return PED::GET_NUMBER_OF_PED_TEXTURE_VARIATIONS(static_cast(ped.GetHandle()), slot, drawable); + } + + int GetMaxPropDrawable(int slot) + { + auto ped = Self::GetPed(); + return PED::GET_NUMBER_OF_PED_PROP_DRAWABLE_VARIATIONS(static_cast(ped.GetHandle()), slot); + } + + int GetMaxPropTexture(int slot, int drawable) + { + auto ped = Self::GetPed(); + return PED::GET_NUMBER_OF_PED_PROP_TEXTURE_VARIATIONS(static_cast(ped.GetHandle()), slot, drawable); + } + + void GetOutfitSlot(int slot, int& drawable, int& texture) + { + auto ped = Self::GetPed(); + drawable = PED::GET_PED_DRAWABLE_VARIATION(static_cast(ped.GetHandle()), slot); + texture = PED::GET_PED_TEXTURE_VARIATION(static_cast(ped.GetHandle()), slot); + } + + void GetPropSlot(int slot, int& drawable, int& texture) + { + auto ped = Self::GetPed(); + drawable = PED::GET_PED_PROP_INDEX(static_cast(ped.GetHandle()), slot, 0); + if (drawable == -1) + { + drawable = 0; + texture = 0; + return; + } + texture = PED::GET_PED_PROP_TEXTURE_INDEX(static_cast(ped.GetHandle()), slot); + } + + void SetOutfitSlot(int slot, int drawable, int texture) + { + auto ped = Self::GetPed(); + if (!ENTITY::DOES_ENTITY_EXIST(static_cast(ped.GetHandle()))) + return; + + int maxDrawable = GetMaxDrawable(slot); + int maxTexture = GetMaxTexture(slot, drawable); + + if (drawable < 0 || drawable >= maxDrawable || texture < 0 || texture >= maxTexture) + return; + + PED::SET_PED_COMPONENT_VARIATION(static_cast(ped.GetHandle()), slot, drawable, texture, 0); + } + + void SetPropSlot(int slot, int drawable, int texture) + { + auto ped = Self::GetPed(); + if (!ENTITY::DOES_ENTITY_EXIST(static_cast(ped.GetHandle()))) + return; + + int maxDrawable = GetMaxPropDrawable(slot); + int maxTexture = GetMaxPropTexture(slot, drawable); + + if (drawable < 0 || drawable >= maxDrawable || texture < 0 || texture >= maxTexture) + return; + + PED::SET_PED_PROP_INDEX(static_cast(ped.GetHandle()), slot, drawable, texture, true, 0); + } + + // Helper function for underlined text + static void TextUnderlined(const char* text) + { + ImGui::Text("%s", text); + ImVec2 min = ImGui::GetItemRectMin(); + ImVec2 max = ImGui::GetItemRectMax(); + min.y = max.y; + ImGui::GetWindowDrawList()->AddLine(min, max, ImGui::GetColorU32(ImGui::GetStyle().Colors[ImGuiCol_Text])); + } + + std::shared_ptr CreateOutfitsMenu() + { + auto category = std::make_shared("Outfit Editor"); + + category->AddItem(std::make_shared([] { + auto ped = Self::GetPed(); + if (!ENTITY::DOES_ENTITY_EXIST(static_cast(ped.GetHandle()))) + { + ImGui::TextDisabled("Error: Player not found"); + return; + } + + if (ImGui::Button("Randomize Outfit")) + { + std::random_device rd; + std::mt19937 gen(rd()); + + // Randomize components + for (int i = 0; i < 12; ++i) + { + int maxDrawable = GetMaxDrawable(i); + if (maxDrawable > 0) + { + int drawable = std::uniform_int_distribution<>(0, maxDrawable - 1)(gen); + int maxTexture = GetMaxTexture(i, drawable); + int texture = maxTexture > 0 ? std::uniform_int_distribution<>(0, maxTexture - 1)(gen) : 0; + SetOutfitSlot(i, drawable, texture); + } + } + + // Randomize props + for (int i : {0, 1, 2, 6, 7}) + { + int maxDrawable = GetMaxPropDrawable(i); + if (maxDrawable > 0) + { + int drawable = std::uniform_int_distribution<>(0, maxDrawable - 1)(gen); + int maxTexture = GetMaxPropTexture(i, drawable); + int texture = maxTexture > 0 ? std::uniform_int_distribution<>(0, maxTexture - 1)(gen) : 0; + SetPropSlot(i, drawable, texture); + } + } + } + + // Create two columns layout + const float windowWidth = ImGui::GetContentRegionAvail().x; + const float columnWidth = windowWidth * 0.5f; + const float inputWidth = 80.0f; // Minimal width for number input + + ImGui::Columns(2, "OutfitColumns", false); + ImGui::SetColumnWidth(0, columnWidth); + + // Components section (Left column) + TextUnderlined("Components"); + ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 1.0f, 1.0f, 1.0f)); // White text color + + const struct + { + const char* name; + int slot; + } componentSlots[] = {{"Top", 11}, {"Undershirt", 8}, {"Legs", 4}, {"Feet", 6}, {"Accessories", 7}, {"Bags", 5}, {"Mask", 1}, {"Gloves", 3}, {"Decals", 10}, {"Armor", 9}}; + + for (const auto& component : componentSlots) + { + int drawable, texture; + GetOutfitSlot(component.slot, drawable, texture); + + ImGui::Text("%s", component.name); + ImGui::SameLine(); + + ImGui::SetCursorPosX(columnWidth - inputWidth * 2 - 10); + + ImGui::PushItemWidth(inputWidth); + if (ImGui::InputInt(std::format("##{}Drawable", component.name).c_str(), &drawable, 0, 0)) + { + drawable = std::clamp(drawable, 0, GetMaxDrawable(component.slot) - 1); + SetOutfitSlot(component.slot, drawable, texture); + } + ImGui::SameLine(); + + ImGui::PushItemWidth(inputWidth); + if (ImGui::InputInt(std::format("##{}Texture", component.name).c_str(), &texture, 0, 0)) + { + texture = std::clamp(texture, 0, GetMaxTexture(component.slot, drawable) - 1); + SetOutfitSlot(component.slot, drawable, texture); + } + ImGui::PopItemWidth(); + ImGui::PopItemWidth(); + } + + // Props section (Right column) + ImGui::NextColumn(); + TextUnderlined("Props"); + + const struct + { + const char* name; + int slot; + } propSlots[] = {{"Hats", 0}, {"Glasses", 1}, {"Ears", 2}, {"Watches", 6}}; + + for (const auto& prop : propSlots) + { + int drawable, texture; + GetPropSlot(prop.slot, drawable, texture); + + ImGui::Text("%s", prop.name); + ImGui::SameLine(); + + ImGui::SetCursorPosX(columnWidth + (columnWidth - inputWidth * 2 - 10)); + + ImGui::PushItemWidth(inputWidth); + if (ImGui::InputInt(std::format("##{}Drawable", prop.name).c_str(), &drawable, 0, 0)) + { + drawable = std::clamp(drawable, 0, GetMaxPropDrawable(prop.slot) - 1); + SetPropSlot(prop.slot, drawable, texture); + } + ImGui::SameLine(); + + ImGui::PushItemWidth(inputWidth); + if (ImGui::InputInt(std::format("##{}Texture", prop.name).c_str(), &texture, 0, 0)) + { + texture = std::clamp(texture, 0, GetMaxPropTexture(prop.slot, drawable) - 1); + SetPropSlot(prop.slot, drawable, texture); + } + ImGui::PopItemWidth(); + ImGui::PopItemWidth(); + } + + ImGui::PopStyleColor(); + ImGui::Columns(1); + })); + + return category; + } +} diff --git a/src/game/frontend/submenus/OutfitEditor.hpp b/src/game/frontend/submenus/OutfitEditor.hpp new file mode 100644 index 0000000..6315b7e --- /dev/null +++ b/src/game/frontend/submenus/OutfitEditor.hpp @@ -0,0 +1,7 @@ +#pragma once +#include "core/frontend/manager/Category.hpp" + +namespace YimMenu +{ + std::shared_ptr CreateOutfitsMenu(); +} diff --git a/src/game/frontend/submenus/Self.cpp b/src/game/frontend/submenus/Self.cpp index c01c7b8..062a691 100644 --- a/src/game/frontend/submenus/Self.cpp +++ b/src/game/frontend/submenus/Self.cpp @@ -2,6 +2,7 @@ #include "core/util/Joaat.hpp" #include "game/frontend/items/Items.hpp" +#include "OutfitEditor.hpp" namespace YimMenu::Submenus { @@ -96,5 +97,8 @@ namespace YimMenu::Submenus vehicle->AddItem(vehicleGlobalsGroup); vehicle->AddItem(vehicleMiscGroup); AddCategory(std::move(vehicle)); + + auto outfitEditorCategory = YimMenu::CreateOutfitsMenu(); + AddCategory(std::move(outfitEditorCategory)); } } From ff5d776c472939041d170c6e06cd310e854db789 Mon Sep 17 00:00:00 2001 From: Peter Witgs <75880431+SourceModzZ@users.noreply.github.com> Date: Sat, 17 May 2025 04:20:23 +0200 Subject: [PATCH 8/9] feat: add FSL API Support (#314) Co-authored-by: ThePosiDong --- src/game/backend/AnticheatBypass.cpp | 31 ++++++++++++++++++++++++++++ src/game/backend/AnticheatBypass.hpp | 18 ++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/src/game/backend/AnticheatBypass.cpp b/src/game/backend/AnticheatBypass.cpp index 950a75a..d5b6b45 100644 --- a/src/game/backend/AnticheatBypass.cpp +++ b/src/game/backend/AnticheatBypass.cpp @@ -6,6 +6,11 @@ #include "game/backend/NativeHooks.hpp" #include "game/gta/Natives.hpp" + +using FnGetVersion = int(*)(); +using FnLocalSaves = bool(*)(); +using FnBattlEyeBypass = bool(*)(); + namespace YimMenu { static bool CheckForFSL() @@ -43,6 +48,32 @@ namespace YimMenu LOGF(VERBOSE, "Anticheat bypass mode: {}", mode); + if (m_IsFSLLoaded) + { + HMODULE hFSL = GetModuleHandleA("WINMM.dll"); + if (hFSL) + { + auto LawnchairGetVersion = reinterpret_cast(GetProcAddress(hFSL, "LawnchairGetVersion")); + auto LawnchairIsProvidingLocalSaves = reinterpret_cast(GetProcAddress(hFSL, "LawnchairIsProvidingLocalSaves")); + auto LawnchairIsProvidingBattlEyeBypass = reinterpret_cast(GetProcAddress(hFSL, "LawnchairIsProvidingBattlEyeBypass")); + + if (LawnchairGetVersion && LawnchairIsProvidingLocalSaves && LawnchairIsProvidingBattlEyeBypass) + { + m_FSLVersion = LawnchairGetVersion(); + m_ProvidesLocalSaves = LawnchairIsProvidingLocalSaves(); + m_ProvidesBEBYPASS = LawnchairIsProvidingBattlEyeBypass(); + + LOGF(VERBOSE, "FSL Version: {}", m_FSLVersion); + LOGF(VERBOSE, "FSL Local Saves: {}", m_ProvidesLocalSaves ? "Enabled" : "Disabled"); + LOGF(VERBOSE, "FSL BE Bypass: {}", m_ProvidesBEBYPASS ? "Enabled" : "Disabled"); + } + else + { + LOGF(WARNING, "FSL detected but required exports were missing."); + } + } + } + if (m_BattlEyeRunning) LOGF(WARNING, "If you are not running an actual BattlEye bypass, exit the game immediately and ensure that BE is properly disabled"); diff --git a/src/game/backend/AnticheatBypass.hpp b/src/game/backend/AnticheatBypass.hpp index 22c5685..931f055 100644 --- a/src/game/backend/AnticheatBypass.hpp +++ b/src/game/backend/AnticheatBypass.hpp @@ -15,6 +15,9 @@ namespace YimMenu bool m_IsFSLLoaded = false; bool m_BattlEyeRunning = false; + int m_FSLVersion = -1; + bool m_ProvidesLocalSaves = false; + bool m_ProvidesBEBYPASS = false; public: static void RunScript() @@ -32,5 +35,20 @@ namespace YimMenu { return GetInstance().m_BattlEyeRunning; } + + static int GetFSLVersion() + { + return GetInstance().m_FSLVersion; + } + + static bool ProvidesLocalSaves() + { + return GetInstance().m_ProvidesLocalSaves; + } + + static bool ProvidesBattlEyeBypass() + { + return GetInstance().m_ProvidesBEBYPASS; + } }; } \ No newline at end of file From 61c2eab432628cfc4c4075a3341b76628fcdbbf6 Mon Sep 17 00:00:00 2001 From: tupoy-ya <72797377+tupoy-ya@users.noreply.github.com> Date: Sat, 17 May 2025 07:30:20 +0500 Subject: [PATCH 9/9] fix(Clang&MinGW): Fix Clang and MinGW builds on linux. (#303) * fix(Clang&MinGW): Fix Clang and MinGW builds on linux. This may break building with clang for windows-gnu target, but it probably doesn't work anyway. * chore(FormatMoney): Cast like the other hooks. --------- Co-authored-by: tupoy-ya --- .gitignore | 1 + CMakeLists.txt | 5 ++--- cmake/cross-compile.cmake | 11 ++++++----- cmake/json.cmake | 2 +- cmake/minhook.cmake | 2 +- src/core/frontend/widgets/imgui_bitfield.hpp | 2 +- src/core/hooking/CallHook.hpp | 2 +- src/game/features/self/FormatMoney.cpp | 4 ++-- src/game/frontend/submenus/Debug/Scripts.cpp | 4 ++-- src/game/frontend/submenus/Network.cpp | 2 +- src/game/gta/Ped.cpp | 2 +- src/game/gta/ScriptLocal.hpp | 2 +- src/game/gta/data/ScriptNames.hpp | 2 +- src/game/hooks/Anticheat/QueueDependency.cpp | 1 - src/types/network/netEvent.hpp | 1 + src/types/network/netGameEvent.hpp | 4 ++++ src/types/rage/RTTI.hpp | 2 +- src/types/rage/datBitBuffer.hpp | 2 +- 18 files changed, 28 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index cd636ad..ce11a1d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ build/ +.cache .vs \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 48a1869..8ebed46 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,9 +33,8 @@ message(STATUS "Setting up include directories.") target_include_directories(${PROJECT_NAME} PRIVATE "${SRC_DIR}" "${imgui_SOURCE_DIR}" - "${minhook_SOURCE_DIR}/include" - "${minhook_SOURCE_DIR}/src/hde" - "${gtav_classes_SOURCE_DIR}" + "${minhook_SOURCE_DIR}/include" + "${minhook_SOURCE_DIR}/src/hde" ) message(STATUS "Setting up linked libraries") diff --git a/cmake/cross-compile.cmake b/cmake/cross-compile.cmake index 7062530..1cee051 100644 --- a/cmake/cross-compile.cmake +++ b/cmake/cross-compile.cmake @@ -8,11 +8,8 @@ if(USE_GCC OR USE_CLANG) set(TOOLCHAIN_PREFIX "x86_64-w64-mingw32" CACHE STRING "Set toolchain. Default: x86_64-w64-mingw32") message(STATUS "Using ${TOOLCHAIN_PREFIX} toolchain") set(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32) - set(CMAKE_SYSTEM_NAME "Windows") set(CMAKE_ASM_MASM_COMPILER "uasm") - set(CMAKE_C_COMPILER_TARGET x86_64-windows-gnu) - set(CMAKE_CXX_COMPILER_TARGET x86_64-windows-gnu) set(CMAKE_Fortran_COMPILER ${TOOLCHAIN_PREFIX}-gfortran) set(CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres) @@ -30,16 +27,20 @@ if(USE_GCC OR USE_CLANG) add_compile_options("$<$:-fpermissive;-fno-rtti${CXX_FLAGS}>") set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc) set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++) + set(CMAKE_C_COMPILER_TARGET x86_64-windows-gnu) + set(CMAKE_CXX_COMPILER_TARGET x86_64-windows-gnu) endif() if(USE_CLANG) message(STATUS "Using clang compiler.") set(CMAKE_C_COMPILER clang) set(CMAKE_CXX_COMPILER clang++) + set(CMAKE_C_COMPILER_TARGET x86_64-windows-msvc) + set(CMAKE_CXX_COMPILER_TARGET x86_64-windows-msvc) # Disable RTTI to work around libstdc++ issue https://stackoverflow.com/a/77025827 - add_compile_options("$<$:-fuse-ld=lld;-femulated-tls;-fno-rtti${CXX_FLAGS}>") - add_link_options(-fuse-ld=lld -femulated-tls -fno-rtti) + add_compile_options("$<$:-fuse-ld=lld;-fno-rtti${CXX_FLAGS}>") + add_link_options(-fuse-ld=lld -fno-rtti) endif() endif() \ No newline at end of file diff --git a/cmake/json.cmake b/cmake/json.cmake index 2e50b53..5e04abd 100644 --- a/cmake/json.cmake +++ b/cmake/json.cmake @@ -1,6 +1,6 @@ include(FetchContent) message(STATUS "Setting up nlohmann::json") -FetchContent_Declare(json GIT_REPOSITORY "https://github.com/nlohmann/json/" GIT_TAG v3.11.2 GIT_SHALLOW TRUE) +FetchContent_Declare(json GIT_REPOSITORY "https://github.com/nlohmann/json/" GIT_TAG v3.12.0 GIT_SHALLOW TRUE) option(JSON_MultipleHeaders "Disable nlohmann JSON multi header default." OFF) FetchContent_MakeAvailable(json) \ No newline at end of file diff --git a/cmake/minhook.cmake b/cmake/minhook.cmake index 905fb8d..6132595 100644 --- a/cmake/minhook.cmake +++ b/cmake/minhook.cmake @@ -6,7 +6,7 @@ message(STATUS "Setting up ${LIB_NAME}") FetchContent_Declare( ${LIB_NAME} GIT_REPOSITORY https://github.com/TsudaKageyu/minhook.git - GIT_TAG 98b74f1fc12d00313d91f10450e5b3e0036175e3 + GIT_TAG 2b003bb063d66f016cc1aef7d63951350ce60f35 GIT_PROGRESS TRUE ) FetchContent_MakeAvailable(${LIB_NAME}) \ No newline at end of file diff --git a/src/core/frontend/widgets/imgui_bitfield.hpp b/src/core/frontend/widgets/imgui_bitfield.hpp index ce5ef3b..0d2b4c8 100644 --- a/src/core/frontend/widgets/imgui_bitfield.hpp +++ b/src/core/frontend/widgets/imgui_bitfield.hpp @@ -60,7 +60,7 @@ namespace ImGui } if (i % 4 == 0) { - ImGui::Text("%i", i); + ImGui::Text("%zu", i); ImGui::EndGroup(); } if (i % 16 != 0) diff --git a/src/core/hooking/CallHook.hpp b/src/core/hooking/CallHook.hpp index e7c6a32..496546b 100644 --- a/src/core/hooking/CallHook.hpp +++ b/src/core/hooking/CallHook.hpp @@ -57,7 +57,7 @@ namespace YimMenu template T GetOriginal() { - return static_cast(m_OriginalFunction); + return reinterpret_cast(m_OriginalFunction); } }; diff --git a/src/game/features/self/FormatMoney.cpp b/src/game/features/self/FormatMoney.cpp index f816be4..95d989c 100644 --- a/src/game/features/self/FormatMoney.cpp +++ b/src/game/features/self/FormatMoney.cpp @@ -19,12 +19,12 @@ namespace YimMenu::Features { if (!formatIntCaller1Hook) { - formatIntCaller1Hook = CallSiteHook::AddHook(Pointers.FormatIntCaller1, FormatIntHook); + formatIntCaller1Hook = CallSiteHook::AddHook(Pointers.FormatIntCaller1, reinterpret_cast(FormatIntHook)); } formatIntCaller1Hook->Enable(); if (!formatIntCaller2Hook) { - formatIntCaller2Hook = CallSiteHook::AddHook(Pointers.FormatIntCaller2, FormatIntHook); + formatIntCaller2Hook = CallSiteHook::AddHook(Pointers.FormatIntCaller2, reinterpret_cast(FormatIntHook)); } formatIntCaller2Hook->Enable(); NativeHooks::AddHook("shop_controller"_J, NativeIndex::SCALEFORM_MOVIE_METHOD_ADD_PARAM_INT, &ScaleformAddIntHook); diff --git a/src/game/frontend/submenus/Debug/Scripts.cpp b/src/game/frontend/submenus/Debug/Scripts.cpp index 933978a..a1db216 100644 --- a/src/game/frontend/submenus/Debug/Scripts.cpp +++ b/src/game/frontend/submenus/Debug/Scripts.cpp @@ -85,8 +85,8 @@ namespace YimMenu::Submenus ImGui::Text("Thread ID: %d", curThread->m_Context.m_ThreadId); ImGui::Text("Stack Size: %d", curThread->m_Context.m_StackSize); - ImGui::Text("Stack Pointer: 0x%X", &curThread->m_Context.m_StackPointer); - ImGui::Text("Program Counter: 0x%X", &curThread->m_Context.m_ProgramCounter); // This is not really accurate (always points to the WAIT) + ImGui::Text("Stack Pointer: 0x%X", curThread->m_Context.m_StackPointer); + ImGui::Text("Program Counter: 0x%X", curThread->m_Context.m_ProgramCounter); // This is not really accurate (always points to the WAIT) if (curThread->m_Context.m_State == rage::scrThread::State::KILLED) ImGui::Text("Exit Reason: %s", curThread->m_ErrorMessage); })); diff --git a/src/game/frontend/submenus/Network.cpp b/src/game/frontend/submenus/Network.cpp index 0e3d22b..f8d8623 100644 --- a/src/game/frontend/submenus/Network.cpp +++ b/src/game/frontend/submenus/Network.cpp @@ -4,7 +4,7 @@ #include "game/frontend/items/Items.hpp" #include "game/frontend/submenus/Network/SavedPlayers.hpp" #include "game/gta/Network.hpp" -#include "game/frontend/submenus/Network/RandomEvents.hpp" +#include "game/frontend/submenus/network/RandomEvents.hpp" namespace YimMenu::Submenus { diff --git a/src/game/gta/Ped.cpp b/src/game/gta/Ped.cpp index ab4bc9f..062617e 100644 --- a/src/game/gta/Ped.cpp +++ b/src/game/gta/Ped.cpp @@ -159,7 +159,7 @@ namespace YimMenu ENTITY_ASSERT_VALID(); ENTITY_ASSERT_CONTROL(); - WEAPON::SET_PED_INFINITE_AMMO(GetHandle(), infinite, NULL); + WEAPON::SET_PED_INFINITE_AMMO(GetHandle(), infinite, 0); } void Ped::SetInfiniteClip(bool infinite) diff --git a/src/game/gta/ScriptLocal.hpp b/src/game/gta/ScriptLocal.hpp index 470b864..64a276d 100644 --- a/src/game/gta/ScriptLocal.hpp +++ b/src/game/gta/ScriptLocal.hpp @@ -3,7 +3,7 @@ #include #include #include -#include +#include namespace YimMenu { diff --git a/src/game/gta/data/ScriptNames.hpp b/src/game/gta/data/ScriptNames.hpp index b663985..6dbdb2e 100644 --- a/src/game/gta/data/ScriptNames.hpp +++ b/src/game/gta/data/ScriptNames.hpp @@ -2,7 +2,7 @@ namespace YimMenu { - static constexpr std::array scriptNames = { + static constexpr const char* scriptNames[] = { "abigail1", "abigail2", "achievement_controller", diff --git a/src/game/hooks/Anticheat/QueueDependency.cpp b/src/game/hooks/Anticheat/QueueDependency.cpp index 84bca13..ec00cee 100644 --- a/src/game/hooks/Anticheat/QueueDependency.cpp +++ b/src/game/hooks/Anticheat/QueueDependency.cpp @@ -54,7 +54,6 @@ namespace YimMenu::Hooks if (arx_score >= 2) { - auto from_offset = *reinterpret_cast(_AddressOfReturnAddress()) - ModuleMgr.Get("GTA5_Enhanced.exe"_J)->Base(); return; } diff --git a/src/types/network/netEvent.hpp b/src/types/network/netEvent.hpp index ed5647e..2fd5832 100644 --- a/src/types/network/netEvent.hpp +++ b/src/types/network/netEvent.hpp @@ -28,6 +28,7 @@ namespace rage std::uint32_t m_CxnId; // 0x0044 rage::netEvent* m_This; // 0x0048 uint32_t m_PeerId; // 0x0050 + char pad_0084[4]; // 0x0054 }; static_assert(sizeof(rage::netEvent) == 0x58); diff --git a/src/types/network/netGameEvent.hpp b/src/types/network/netGameEvent.hpp index 7241d33..14c860d 100644 --- a/src/types/network/netGameEvent.hpp +++ b/src/types/network/netGameEvent.hpp @@ -248,8 +248,10 @@ class CExplosionEvent : public rage::netGameEvent public: void Deserialize(rage::datBitBuffer& buffer); +#if !__GNUC__ struct { +#endif ExplosionType m_ExplosionType; // 0x30 rage::fvector3 m_Position; // 0x40 uint64_t m_0x50; // 0x50 @@ -282,7 +284,9 @@ public: bool m_Expected; // 0xC2 -- for telemetry uint32_t m_ScriptHash; // 0xC4 -- for telemetry uint32_t m_ProgramCounter; // 0xC8 -- for telemetry +#if !__GNUC__ }; +#endif uint16_t m_TargetEntity; // 0xD0 uint16_t m_TargetEnt2; // 0xD2 uint16_t m_OwnerNetId; // 0xD4 diff --git a/src/types/rage/RTTI.hpp b/src/types/rage/RTTI.hpp index bdff937..06b292e 100644 --- a/src/types/rage/RTTI.hpp +++ b/src/types/rage/RTTI.hpp @@ -10,4 +10,4 @@ private: \ virtual bool _0x28(void**) = 0; \ virtual void destructor() = 0; \ \ -public: \ No newline at end of file +public: diff --git a/src/types/rage/datBitBuffer.hpp b/src/types/rage/datBitBuffer.hpp index 85f6aa6..ff5eea3 100644 --- a/src/types/rage/datBitBuffer.hpp +++ b/src/types/rage/datBitBuffer.hpp @@ -42,7 +42,7 @@ namespace rage v11 = 8; if (size > 8) { - v12 = 1i64; + v12 = 1; do { if (v12 > v9)