diff --git a/README.md b/README.md index 82471606..40a6eb8f 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,19 @@ A trainer for the popular horse riding game from Rockstar Games. +## How to use +Use a popular injector (FateInjector/Xenos/Etc.) and inject into rdr2.exe + +(INSERT) Open/Close the menu + ## Structure - `core/` : Essential general features for the base - `game/` : Game specific implemented things - `util/` : Loose functions that aren't game specific -**Current Look (Outdated)** +## Screenshots / UI Design + +![image](https://github.com/YimMenu/HorseMenu/assets/24372625/e1395e75-7feb-4c4a-9286-bd774e2aaeca) + -![image](https://github.com/YimMenu/HorseMenu/assets/79384354/f4c0dbd8-9d89-417d-b1c1-b45c70a5f91a) -![image](https://github.com/YimMenu/HorseMenu/assets/79384354/610f28bd-fe28-4a25-987f-520d75460d67) -![image](https://github.com/YimMenu/HorseMenu/assets/79384354/ce5fbff0-6553-4998-a5dd-ef1747af53b2) diff --git a/src/core/frontend/manager/UIManager.cpp b/src/core/frontend/manager/UIManager.cpp index a14ee60b..aaef3aab 100644 --- a/src/core/frontend/manager/UIManager.cpp +++ b/src/core/frontend/manager/UIManager.cpp @@ -79,4 +79,4 @@ namespace YimMenu return nullptr; } -} \ No newline at end of file +} diff --git a/src/game/features/mount/HorseGodmode.cpp b/src/game/features/mount/HorseGodmode.cpp index a73b405a..1066e9f0 100644 --- a/src/game/features/mount/HorseGodmode.cpp +++ b/src/game/features/mount/HorseGodmode.cpp @@ -22,4 +22,4 @@ namespace YimMenu::Features }; static HorseGodmode _HorseGodmode{"horsegodmode", "Godmode", "Blocks all incoming damage for your horse"}; -} \ No newline at end of file +} diff --git a/src/game/features/players/toxic/LightningStrike.cpp b/src/game/features/players/toxic/LightningStrike.cpp new file mode 100644 index 00000000..19aaeeaa --- /dev/null +++ b/src/game/features/players/toxic/LightningStrike.cpp @@ -0,0 +1,22 @@ +#include "game/commands/PlayerCommand.hpp" +#include "game/features/Features.hpp" +#include "game/pointers/Pointers.hpp" +#include "game/rdr/Enums.hpp" +#include "game/rdr/Natives.hpp" + + +namespace YimMenu::Features +{ + class LightningStrike : public PlayerCommand + { + using PlayerCommand::PlayerCommand; + + virtual void OnCall(Player player) override + { + auto playerCoords = player.GetPed().GetPosition(); + FIRE::ADD_EXPLOSION(playerCoords.x, playerCoords.y, playerCoords.z, 33, 5.0f, true, false, 5.0f); + } + }; + + static LightningStrike _LightningStrike{"lightning", "Lightning", "Strikes the player with lightning"}; +} diff --git a/src/game/features/self/EagleEye.cpp b/src/game/features/self/EagleEye.cpp new file mode 100644 index 00000000..24dafbf6 --- /dev/null +++ b/src/game/features/self/EagleEye.cpp @@ -0,0 +1,32 @@ +#include "core/commands/LoopedCommand.hpp" +#include "core/frontend/Notifications.hpp" +#include "game/features/Features.hpp" +#include "game/rdr/Enums.hpp" +#include "game/rdr/Natives.hpp" + +namespace YimMenu::Features +{ + class EagleEye : public LoopedCommand + { + using LoopedCommand::LoopedCommand; + + virtual void OnTick() override + { + if (!PLAYER::_IS_SECONDARY_SPECIAL_ABILITY_ACTIVE(YimMenu::Self::Id)) // Checks if Eagle Eye is active before toggling it on + { + PLAYER::_SECONDARY_SPECIAL_ABILITY_SET_ACTIVE(YimMenu::Self::Id); // Toggles Eagle Eye on + PLAYER::_EAGLE_EYE_SET_PLUS_FLAG_DISABLED(YimMenu::Self::Id, false); // Allows running while eagle eye is active + } + PLAYER::_MODIFY_INFINITE_TRAIL_VISION(YimMenu::Self::Id, 1); // Sets Eagle Eye to Infinite + } + + virtual void OnDisable() override + { + PLAYER::_SECONDARY_SPECIAL_ABILITY_SET_DISABLED(YimMenu::Self::Id, 1); // Disables Eagle Eye + PLAYER::_MODIFY_INFINITE_TRAIL_VISION(YimMenu::Self::Id, 0); // Turns off Infinite Eagle Eye + PLAYER::_EAGLE_EYE_SET_PLUS_FLAG_DISABLED(YimMenu::Self::Id, NULL); //Setting to truee breaks it, leave it at NULL + } + }; + + static EagleEye _EagleEye{"eagleeye", "Eagle Eye", "Enables Infinite/Always Active Eagle Eye."}; +} diff --git a/src/game/features/self/InfiniteClip.cpp b/src/game/features/self/InfiniteClip.cpp index 11de9339..b6e2c59f 100644 --- a/src/game/features/self/InfiniteClip.cpp +++ b/src/game/features/self/InfiniteClip.cpp @@ -15,14 +15,17 @@ namespace YimMenu::Features Hash current_weapon = WEAPON::_GET_PED_CURRENT_HELD_WEAPON(Self::PlayerPed); int current_clip_ammo{}; - WEAPON::GET_AMMO_IN_CLIP(Self::PlayerPed, ¤t_clip_ammo, current_weapon); + if (current_weapon != "WEAPON_FISHINGROD"_J) + { + WEAPON::GET_AMMO_IN_CLIP(Self::PlayerPed, ¤t_clip_ammo, current_weapon); - auto clip_size = WEAPON::GET_WEAPON_CLIP_SIZE(current_weapon); - - if (current_clip_ammo < clip_size) - WEAPON::_REFILL_AMMO_IN_CURRENT_PED_WEAPON(Self::PlayerPed); + auto clip_size = WEAPON::GET_WEAPON_CLIP_SIZE(current_weapon); + + if (current_clip_ammo < clip_size) + WEAPON::_REFILL_AMMO_IN_CURRENT_PED_WEAPON(Self::PlayerPed); + } } }; static InfiniteClip _InfiniteClip{"infiniteclip", "Infinite Clip", "Have an endless clip in your gun"}; -} \ No newline at end of file +} diff --git a/src/game/features/self/NoSpread.cpp b/src/game/features/self/NoSpread.cpp new file mode 100644 index 00000000..5cf1c408 --- /dev/null +++ b/src/game/features/self/NoSpread.cpp @@ -0,0 +1,24 @@ +#include "core/commands/LoopedCommand.hpp" +#include "game/features/Features.hpp" +#include "game/rdr/Enums.hpp" +#include "game/rdr/Natives.hpp" + +namespace YimMenu::Features +{ + class NoSpread : public LoopedCommand + { + using LoopedCommand::LoopedCommand; + + virtual void OnTick() override + { + PED::SET_PED_ACCURACY(Self::PlayerPed, 100); + } + + virtual void OnDisable() override + { + PED::SET_PED_ACCURACY(Self::PlayerPed, 0); // Does not set it to miss every time, accuracy is weird. + } + }; + + static NoSpread _NoSpread{"nospread", "No Spread", "Always perfect accuracy on shots"}; +} diff --git a/src/game/features/self/SuperDamage.cpp b/src/game/features/self/SuperDamage.cpp new file mode 100644 index 00000000..55c3f1ec --- /dev/null +++ b/src/game/features/self/SuperDamage.cpp @@ -0,0 +1,29 @@ +#include "core/commands/LoopedCommand.hpp" +#include "game/features/Features.hpp" +#include "game/rdr/Enums.hpp" +#include "game/rdr/Natives.hpp" + +namespace YimMenu::Features +{ + class SuperDamage : public LoopedCommand + { + using LoopedCommand::LoopedCommand; + + virtual void OnTick() override + { + PLAYER::SET_PLAYER_WEAPON_DAMAGE_MODIFIER(Self::PlayerPed, 1000000.0); + PLAYER::_SET_PLAYER_EXPLOSIVE_WEAPON_DAMAGE_MODIFIER(Self::PlayerPed, 1000000.0); + NETWORK::_SET_LOCAL_PLAYER_DAMAGE_MULTIPLIER_FOR_PLAYER(Self::PlayerPed, 1000000.0); + } + + virtual void OnDisable() override + { + // Set all player weapon damage modifiers to their defaults + PLAYER::SET_PLAYER_WEAPON_DAMAGE_MODIFIER(Self::PlayerPed, 1.0); + PLAYER::_SET_PLAYER_EXPLOSIVE_WEAPON_DAMAGE_MODIFIER(Self::PlayerPed, 1.0); + NETWORK::_SET_LOCAL_PLAYER_DAMAGE_MULTIPLIER_FOR_PLAYER(Self::PlayerPed, 1.0); + } + }; + + static SuperDamage _SuperDamage{"superdamage", "Super Damage", "Multiplies your damage output for All weapons (includes melee)"}; +} diff --git a/src/game/frontend/Menu.cpp b/src/game/frontend/Menu.cpp index a05ec1ee..012c5fbb 100644 --- a/src/game/frontend/Menu.cpp +++ b/src/game/frontend/Menu.cpp @@ -36,9 +36,11 @@ namespace YimMenu ImGui::PushFont(Menu::Font::g_DefaultFont); ImGui::PushStyleColor(ImGuiCol_WindowBg, ImU32(ImColor(15, 15, 15))); - // Think this add HTML&PHP with no CSS. Lol just for testing. - ImGui::SetNextWindowSize(ImVec2(610, 610 /*add auto resize*/), ImGuiCond_Once); - if (ImGui::Begin("HorseMenu", nullptr, ImGuiWindowFlags_NoDecoration)) + // Think this add HTML&PHP with no CSS. Lol just for testing. + ImGui::SetNextWindowSize(ImVec2(780, 620 /*add auto resize*/), ImGuiCond_Once); + // Window default positioning, adjust as needed. + ImGui::SetNextWindowPos(ImVec2(0.5f, 0.5f), ImGuiCond_Once); + if (ImGui::Begin("Welcome to HorseMenu!", nullptr, ImGuiWindowFlags_NoResize)) { //ImGui::BeginDisabled(*Pointers.IsSessionStarted); if (ImGui::Button("Unload", ImVec2(120, 0))) diff --git a/src/game/frontend/Menu.hpp b/src/game/frontend/Menu.hpp index 816bea27..e8e9f7cb 100644 --- a/src/game/frontend/Menu.hpp +++ b/src/game/frontend/Menu.hpp @@ -10,7 +10,7 @@ namespace YimMenu::Menu namespace Font { inline ImFont* g_DefaultFont = nullptr; - inline float g_DefaultFontSize = 18.0f; + inline float g_DefaultFontSize = 16.0f; inline ImFont* g_OptionsFont = nullptr; inline float g_OptionsFontSize = 15.0f; @@ -18,4 +18,4 @@ namespace YimMenu::Menu inline ImFont* g_ChildTitleFont = nullptr; inline float g_ChildTitleFontSize = 14.5f; } -} \ No newline at end of file +} diff --git a/src/game/frontend/submenus/Network.cpp b/src/game/frontend/submenus/Network.cpp index 84915f9c..3f2c3953 100644 --- a/src/game/frontend/submenus/Network.cpp +++ b/src/game/frontend/submenus/Network.cpp @@ -211,4 +211,4 @@ namespace YimMenu::Submenus AddCategory(std::move(spoofing)); AddCategory(std::move(database)); } -} \ No newline at end of file +} diff --git a/src/game/frontend/submenus/Players.cpp b/src/game/frontend/submenus/Players.cpp index 24ac6ce0..4bdcfc92 100644 --- a/src/game/frontend/submenus/Players.cpp +++ b/src/game/frontend/submenus/Players.cpp @@ -280,6 +280,7 @@ namespace YimMenu::Submenus })); toxic->AddItem(std::make_shared("explode"_J)); + toxic->AddItem(std::make_shared("lightning"_J)); toxic->AddItem(std::make_shared("defensive"_J)); toxic->AddItem(std::make_shared("offensive"_J)); toxic->AddItem(std::make_shared("maxhonor"_J)); @@ -305,4 +306,4 @@ namespace YimMenu::Submenus AddCategory(std::move(kick)); } } -} \ No newline at end of file +} diff --git a/src/game/frontend/submenus/Self.cpp b/src/game/frontend/submenus/Self.cpp index 5414ba15..62f3e261 100644 --- a/src/game/frontend/submenus/Self.cpp +++ b/src/game/frontend/submenus/Self.cpp @@ -142,6 +142,7 @@ namespace YimMenu::Submenus globalsGroup->AddItem(std::make_shared("keepcoresfilled"_J)); globalsGroup->AddItem(std::make_shared("infiniteammo"_J)); globalsGroup->AddItem(std::make_shared("infiniteclip"_J)); + globalsGroup->AddItem(std::make_shared("nospread"_J)); globalsGroup->AddItem(std::make_shared("autocock"_J)); globalsGroup->AddItem(std::make_shared("keepclean"_J)); globalsGroup->AddItem(std::make_shared("antilasso"_J)); @@ -149,6 +150,9 @@ namespace YimMenu::Submenus globalsGroup->AddItem(std::make_shared("antimelee"_J)); globalsGroup->AddItem(std::make_shared("drunk"_J)); + globalsGroup->AddItem(std::make_shared("autotp"_J)); + globalsGroup->AddItem(std::make_shared("superjump"_J)); + globalsGroup->AddItem(std::make_shared("superdamage"_J)); globalsGroup->AddItem(std::make_shared("superpunch"_J)); @@ -162,6 +166,7 @@ namespace YimMenu::Submenus })); toolsGroup->AddItem(std::make_shared("npcignore"_J)); + toolsGroup->AddItem(std::make_shared("eagleeye"_J)); toolsGroup->AddItem(std::make_shared("spawnbountywagon"_J)); toolsGroup->AddItem(std::make_shared("spawnhuntingwagon"_J)); diff --git a/src/util/Rewards.cpp b/src/util/Rewards.cpp index ad6d0eea..0bed370e 100644 --- a/src/util/Rewards.cpp +++ b/src/util/Rewards.cpp @@ -102,28 +102,30 @@ namespace YimMenu::Rewards STREAMING::REQUEST_MODEL(hash, false); ScriptMgr::Yield(); } - Vector3 coords = ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), true, false); - Object obj = OBJECT::CREATE_OBJECT(hash, coords.x, coords.y, coords.z, true, NETWORK::NETWORK_IS_HOST_OF_THIS_SCRIPT(), 1, 0, 1); + + Vector3 coords = ENTITY::GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(PLAYER::PLAYER_PED_ID(), 0, 2, 0); + + Object obj = OBJECT::CREATE_OBJECT(hash, coords.x, coords.y, coords.z, 1, 1, 1, 0, 0); + OBJECT::PLACE_OBJECT_ON_GROUND_PROPERLY(obj, 1); ScriptMgr::Yield(); - + + // Set up object properties ENTITY::SET_ENTITY_VISIBLE(obj, true); ScriptMgr::Yield(); - + OBJECT::_MAKE_ITEM_CARRIABLE(obj); - + NETWORK::NETWORK_REGISTER_ENTITY_AS_NETWORKED(obj); if (NETWORK::NETWORK_DOES_NETWORK_ID_EXIST(NETWORK::OBJ_TO_NET(obj))) { - OBJECT::PLACE_OBJECT_ON_GROUND_PROPERLY(obj, true); - ENTITY::SET_ENTITY_SHOULD_FREEZE_WAITING_ON_COLLISION(obj, true); NETWORK::SET_NETWORK_ID_EXISTS_ON_ALL_MACHINES(NETWORK::OBJ_TO_NET(obj), true); NETWORK::NETWORK_REQUEST_CONTROL_OF_ENTITY(obj); } ScriptMgr::Yield(); - + STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(hash); ENTITY::SET_OBJECT_AS_NO_LONGER_NEEDED(&obj); } }); - }; + } };