diff --git a/src/core/byte_patch_manager/byte_patch_manager.cpp b/src/core/byte_patch_manager/byte_patch_manager.cpp index 80a258eb..646ede6a 100644 --- a/src/core/byte_patch_manager/byte_patch_manager.cpp +++ b/src/core/byte_patch_manager/byte_patch_manager.cpp @@ -7,7 +7,7 @@ namespace YimMenu // put patches here // example usage: // - //BytePatch::Make(Pointers.GetLocalPed,0).get() + //BytePatch::Make(Pointers.GetLocalPed,0)->apply(); LOG(INFO) << "Byte patch manager initialized"; } diff --git a/src/core/byte_patch_manager/byte_patch_manager.hpp b/src/core/byte_patch_manager/byte_patch_manager.hpp index 488f6167..94635736 100644 --- a/src/core/byte_patch_manager/byte_patch_manager.hpp +++ b/src/core/byte_patch_manager/byte_patch_manager.hpp @@ -10,6 +10,11 @@ namespace YimMenu static void Init(); + //store created patches here for dynamic enabling/disabling + struct Patches + { + }; + private: static Byte_Patch_Manager& GetInstance() { diff --git a/src/game/features/self/AutoTP.cpp b/src/game/features/self/AutoTP.cpp new file mode 100644 index 00000000..53228c36 --- /dev/null +++ b/src/game/features/self/AutoTP.cpp @@ -0,0 +1,25 @@ +#include "core/commands/LoopedCommand.hpp" +#include "game/features/Features.hpp" +#include "util/teleport.hpp" + +namespace YimMenu::Features +{ + class AutoTP : public LoopedCommand + { + using LoopedCommand::LoopedCommand; + + virtual void OnTick() override + { + if (MAP::IS_WAYPOINT_ACTIVE()) + { + Vector3 coords = Teleport::GetWaypointCoords(); + if (coords != Vector3{0, 0, 0}) + { + Teleport::TeleportEntity(YimMenu::Self::PlayerPed, rage::fvector3{coords.x, coords.y, coords.z}, true); + } + } + } + }; + + static AutoTP _AutoTP{"autotp", "Auto TP to Waypoint", "Automatically teleports you when you place a waypoint"}; +} \ No newline at end of file diff --git a/src/game/features/self/Superjump.cpp b/src/game/features/self/Superjump.cpp new file mode 100644 index 00000000..96e88131 --- /dev/null +++ b/src/game/features/self/Superjump.cpp @@ -0,0 +1,18 @@ +#include "core/commands/LoopedCommand.hpp" +#include "game/features/Features.hpp" +#include "game/rdr/Natives.hpp" + +namespace YimMenu::Features +{ + class Superjump : public LoopedCommand + { + using LoopedCommand::LoopedCommand; + + virtual void OnTick() override + { + MISC::SET_SUPER_JUMP_THIS_FRAME(Self::Id); + } + }; + + static Superjump _Superjump{"superjump", "Superjump", "Jump higher than normal"}; +} \ No newline at end of file diff --git a/src/game/frontend/submenus/Network.cpp b/src/game/frontend/submenus/Network.cpp index fb812e11..ba2d3192 100644 --- a/src/game/frontend/submenus/Network.cpp +++ b/src/game/frontend/submenus/Network.cpp @@ -1,21 +1,27 @@ #include "Network.hpp" + #include "core/commands/Commands.hpp" #include "core/commands/HotkeySystem.hpp" #include "core/commands/LoopedCommand.hpp" +#include "core/frontend/Notifications.hpp" +#include "game/backend/FiberPool.hpp" #include "game/features/Features.hpp" #include "game/frontend/items/Items.hpp" +#include "game/pointers/Pointers.hpp" + namespace YimMenu::Submenus { Network::Network() : Submenu::Submenu("Network") { - auto session = std::make_shared("Session"); - auto spoofing = std::make_shared("Spoofing"); + auto session = std::make_shared("Session"); + auto spoofing = std::make_shared("Spoofing"); session->AddItem(std::make_shared("explodeall"_J)); session->AddItem(std::make_shared("maxhonorall"_J)); session->AddItem(std::make_shared("minhonorall"_J)); spoofing->AddItem(std::make_shared("hidegod"_J)); + spoofing->AddItem(std::make_shared("voicechatoverride"_J)); AddCategory(std::move(session)); AddCategory(std::move(spoofing)); } diff --git a/src/game/frontend/submenus/Self.cpp b/src/game/frontend/submenus/Self.cpp index b756c7fb..6cbd2ca5 100644 --- a/src/game/frontend/submenus/Self.cpp +++ b/src/game/frontend/submenus/Self.cpp @@ -63,7 +63,8 @@ namespace YimMenu::Submenus globalsGroup->AddItem(std::make_shared("keepclean"_J)); globalsGroup->AddItem(std::make_shared("antilasso"_J)); globalsGroup->AddItem(std::make_shared("antihogtie"_J)); - globalsGroup->AddItem(std::make_shared("voicechatoverride"_J)); // TODO: move this to spoofing or network + globalsGroup->AddItem(std::make_shared("autotp"_J)); + globalsGroup->AddItem(std::make_shared("superjump"_J)); toolsGroup->AddItem(std::make_shared("suicide"_J)); toolsGroup->AddItem(std::make_shared("clearcrimes"_J)); diff --git a/src/util/teleport.hpp b/src/util/teleport.hpp index 1e7b6f42..b454292c 100644 --- a/src/util/teleport.hpp +++ b/src/util/teleport.hpp @@ -2,8 +2,9 @@ #include "common.hpp" #include "core/frontend/Notifications.hpp" #include "game/backend/ScriptMgr.hpp" -#include "game/rdr/Natives.hpp" #include "game/rdr/Entity.hpp" +#include "game/rdr/Natives.hpp" + // TODO: remove this file @@ -88,8 +89,6 @@ namespace YimMenu::Teleport if (MAP::IS_WAYPOINT_ACTIVE()) return MAP::_GET_WAYPOINT_COORDS(); - Notifications::Show("Waypoint", "You don't have a waypoint set", NotificationType::Error); - return Vector3{0, 0, 0}; }