diff --git a/src/game/features/mount/HorseClimbSteepSlopes.cpp b/src/game/features/mount/HorseClimbSteepSlopes.cpp new file mode 100644 index 00000000..f2b7cb38 --- /dev/null +++ b/src/game/features/mount/HorseClimbSteepSlopes.cpp @@ -0,0 +1,23 @@ +#include "core/commands/LoopedCommand.hpp" +#include "game/rdr/Natives.hpp" +#include "game/features/Features.hpp" + +namespace YimMenu::Features +{ + class HorseClimbSteepSlopes : public LoopedCommand + { + using LoopedCommand::LoopedCommand; + + virtual void OnTick() override + { + PED::SET_PED_RESET_FLAG(Self::Mount, 204, TRUE); + } + + virtual void OnDisable() override + { + PED::SET_PED_RESET_FLAG(Self::Mount, 204, FALSE); // probably not neccesary. dont know, dont care. + } + }; + + static HorseClimbSteepSlopes _HorseClimbSteepSlopes{"horseclimbsteepslopes", "Can Climb Steep Slopes", "Your horse can climb up/down sleep slopes without sliding"}; +} \ No newline at end of file diff --git a/src/game/features/mount/KeepHorseClean.cpp b/src/game/features/mount/KeepHorseClean.cpp new file mode 100644 index 00000000..a69fc02e --- /dev/null +++ b/src/game/features/mount/KeepHorseClean.cpp @@ -0,0 +1,23 @@ +#include "core/commands/LoopedCommand.hpp" +#include "game/features/Features.hpp" +#include "game/rdr/Enums.hpp" +#include "game/rdr/Natives.hpp" + +namespace YimMenu::Features +{ + class KeepHorseClean : public LoopedCommand + { + using LoopedCommand::LoopedCommand; + + virtual void OnTick() override + { + PED::_SET_PED_DAMAGE_CLEANLINESS(Self::Mount, (int)ePedDamageCleanliness::PED_DAMAGE_CLEANLINESS_PERFECT); + PED::CLEAR_PED_WETNESS(Self::Mount); + PED::CLEAR_PED_ENV_DIRT(Self::Mount); + PED::CLEAR_PED_BLOOD_DAMAGE(Self::Mount); + PED::CLEAR_PED_DAMAGE_DECAL_BY_ZONE(Self::Mount, 10, "ALL"); + } + }; + + static KeepHorseClean _KeepHorseClean{"keephorseclean", "Keep Horse Clean", "Keeps your horse from being dirty"}; +} \ No newline at end of file diff --git a/src/game/features/self/AutoCockWeapon.cpp b/src/game/features/self/AutoCockWeapon.cpp new file mode 100644 index 00000000..7b6d0524 --- /dev/null +++ b/src/game/features/self/AutoCockWeapon.cpp @@ -0,0 +1,18 @@ +#include "core/commands/LoopedCommand.hpp" +#include "game/features/Features.hpp" +#include "game/rdr/Natives.hpp" + +namespace YimMenu::Features +{ + class AutoCock : public LoopedCommand + { + using LoopedCommand::LoopedCommand; + + virtual void OnTick() override + { + WEAPON::_SET_FORCE_CURRENT_WEAPON_INTO_COCKED_STATE(Self::PlayerPed, 0); + } + }; + + static AutoCock _AutoCock{"autocock", "Auto Cock", "Automatically cock your weapon"}; +} \ No newline at end of file diff --git a/src/game/features/self/Drunk.cpp b/src/game/features/self/Drunk.cpp index deeb0e8c..abd12645 100644 --- a/src/game/features/self/Drunk.cpp +++ b/src/game/features/self/Drunk.cpp @@ -12,16 +12,16 @@ namespace YimMenu::Features virtual void OnTick() override { - AUDIO::SET_PED_IS_DRUNK(Self::PlayerPed, true); - PED::_SET_PED_DRUNKNESS(Self::PlayerPed, true, 1.0f); + AUDIO::SET_PED_IS_DRUNK(Self::PlayerPed, TRUE); + PED::_SET_PED_DRUNKNESS(Self::PlayerPed, TRUE, 1.0f); } virtual void OnDisable() override { if (PED::_GET_PED_DRUNKNESS(Self::PlayerPed)) { - AUDIO::SET_PED_IS_DRUNK(Self::PlayerPed, false); - PED::_SET_PED_DRUNKNESS(Self::PlayerPed, false, 0.0f); + AUDIO::SET_PED_IS_DRUNK(Self::PlayerPed, TRUE); + PED::_SET_PED_DRUNKNESS(Self::PlayerPed, TRUE, 0.0f); } } }; diff --git a/src/game/features/self/NoRagdoll.cpp b/src/game/features/self/NoRagdoll.cpp index c642767c..fc53875c 100644 --- a/src/game/features/self/NoRagdoll.cpp +++ b/src/game/features/self/NoRagdoll.cpp @@ -11,15 +11,19 @@ namespace YimMenu::Features virtual void OnTick() override { - if (PED::CAN_PED_RAGDOLL(Self::PlayerPed)) - PED::SET_PED_CAN_RAGDOLL(Self::PlayerPed, false); + if (PED::CAN_PED_RAGDOLL(Self::PlayerPed)) + { + PED::SET_PED_CAN_RAGDOLL(Self::PlayerPed, FALSE); + PED::SET_PED_CAN_RAGDOLL_FROM_PLAYER_IMPACT(Self::PlayerPed, FALSE); + } } virtual void OnDisable() override { - PED::SET_PED_CAN_RAGDOLL(Self::PlayerPed, true); + PED::SET_PED_CAN_RAGDOLL(Self::PlayerPed, TRUE); + PED::SET_PED_CAN_RAGDOLL_FROM_PLAYER_IMPACT(Self::PlayerPed, TRUE); } }; static NoRagdoll _NoRagdoll{"noragdoll", "No Ragdoll", "You will never ragdoll"}; -} \ No newline at end of file +} diff --git a/src/game/features/self/SuperRun.cpp b/src/game/features/self/SuperRun.cpp new file mode 100644 index 00000000..73517683 --- /dev/null +++ b/src/game/features/self/SuperRun.cpp @@ -0,0 +1,22 @@ +#include "core/commands/LoopedCommand.hpp" +#include "game/features/Features.hpp" +#include "game/rdr/Natives.hpp" + +namespace YimMenu::Features +{ + class SuperRun : public LoopedCommand + { + using LoopedCommand::LoopedCommand; + + virtual void OnTick() override + { + if (PED::IS_PED_RAGDOLL(Self::PlayerPed)) + return; + + if (TASK::IS_PED_RUNNING(Self::PlayerPed) || TASK::IS_PED_SPRINTING(Self::PlayerPed)) + ENTITY::APPLY_FORCE_TO_ENTITY(Self::PlayerPed, 1, 0.0f, 20.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1, true, true, true, false, true); + } + }; + + static SuperRun _Superrun{"superrun", "Super Run", "Run faster than normal"}; +} \ No newline at end of file diff --git a/src/game/frontend/submenus/Self.cpp b/src/game/frontend/submenus/Self.cpp index 62d45245..733d3d26 100644 --- a/src/game/frontend/submenus/Self.cpp +++ b/src/game/frontend/submenus/Self.cpp @@ -66,7 +66,7 @@ namespace YimMenu::Submenus globalsGroup->AddItem(std::make_shared("godmode"_J)); - globalsGroup->AddItem(std::make_shared("neverwanted"_J)); + globalsGroup->AddItem(std::make_shared("neverwanted"_J)); globalsGroup->AddItem(std::make_shared("invis"_J)); globalsGroup->AddItem(std::make_shared("offtheradar"_J)); globalsGroup->AddItem(std::make_shared("noragdoll"_J)); @@ -75,6 +75,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("autocock"_J)); globalsGroup->AddItem(std::make_shared("keepclean"_J)); globalsGroup->AddItem(std::make_shared("antilasso"_J)); globalsGroup->AddItem(std::make_shared("antihogtie"_J)); @@ -99,6 +100,7 @@ namespace YimMenu::Submenus movementGroup->AddItem(std::make_shared("noclip"_J)); movementGroup->AddItem(std::make_shared("superjump"_J)); + movementGroup->AddItem(std::make_shared("superrun"_J)); columns->AddItem(globalsGroup); columns->AddItem(toolsGroup); @@ -112,6 +114,8 @@ namespace YimMenu::Submenus auto horseGlobalsGroup = std::make_shared("Globals", GetListBoxDimensions()); horseGlobalsGroup->AddItem(std::make_shared("horsegodmode"_J)); horseGlobalsGroup->AddItem(std::make_shared("horsenoragdoll"_J)); + horseGlobalsGroup->AddItem(std::make_shared("keephorseclean"_J)); + horseGlobalsGroup->AddItem(std::make_shared("horseclimbsteepslopes"_J)); horseGlobalsGroup->AddItem(std::make_shared("keephorsebarsfilled"_J)); horseGlobalsGroup->AddItem(std::make_shared("keephorsecoresfilled"_J)); horseGlobalsGroup->AddItem(std::make_shared("keephorseagitationlow"_J)); diff --git a/src/game/hooks/Protections/ShouldBlockSync.cpp b/src/game/hooks/Protections/ShouldBlockSync.cpp index 321c0746..71eb0605 100644 --- a/src/game/hooks/Protections/ShouldBlockSync.cpp +++ b/src/game/hooks/Protections/ShouldBlockSync.cpp @@ -122,20 +122,17 @@ namespace break; case "CVehicleGadgetDataNode"_J: LOG_FIELD_B(CVehicleGadgetNodeData, m_has_position); - const auto& position = node->GetData().m_position; - LOG(INFO) << "\tm_position: X: " << position[0] << " Y: " << position[1] << " Z: " << position[2] << " W: " << position[3]; + LOG_FIELD(CVehicleGadgetNodeData, m_position[0]); + LOG_FIELD(CVehicleGadgetNodeData, m_position[1]); + LOG_FIELD(CVehicleGadgetNodeData, m_position[2]); + LOG_FIELD(CVehicleGadgetNodeData, m_position[3]); LOG_FIELD(CVehicleGadgetNodeData, m_num_gadgets); - - for (int i = 0; i < node->GetData().m_num_gadgets; i++) + if (node->GetData().m_num_gadgets <= 2) { - LOG(INFO) << "m_gadgets[" << i << "].m_type: " << node->GetData().m_gadgets[i].m_type; - uint32_t sum = 0; - for (int j = 0; j < sizeof(node->GetData().m_gadgets[i].m_data); j++) + for (int i = 0; i < node->GetData().m_num_gadgets; i++) { - sum += node->GetData().m_gadgets[i].m_data[j]; + LOG_FIELD(CVehicleGadgetNodeData, m_gadgets[i].m_type); } - - LOG(INFO) << "\tm_data: " << HEX(sum); } break; } @@ -325,6 +322,9 @@ namespace if (data.m_ModelHash && !STREAMING::IS_MODEL_A_VEHICLE(data.m_ModelHash)) { LOG(WARNING) << "Blocked mismatched vehicle model crash from " << Protections::GetSyncingPlayer().GetName(); + Notifications::Show("Protections", + std::string("Blocked mismatched vehicle model crash from ").append(Protections::GetSyncingPlayer().GetName()), + NotificationType::Warning); g_PlayerDatabase->AddInfraction( g_PlayerDatabase->GetOrCreatePlayer(Protections::GetSyncingPlayer().GetGamerInfo()->m_GamerHandle.m_rockstar_id, Protections::GetSyncingPlayer().GetName()), @@ -382,6 +382,10 @@ namespace { // TODO: add more checks LOG(WARNING) << "Blocked remote teleport from " << Protections::GetSyncingPlayer().GetName(); + Notifications::Show("Protections", + std::string("Blocked remote teleport from ") + .append(Protections::GetSyncingPlayer().GetName()), + NotificationType::Warning); g_PlayerDatabase->AddInfraction( g_PlayerDatabase->GetOrCreatePlayer( Protections::GetSyncingPlayer().GetGamerInfo()->m_GamerHandle.m_rockstar_id, diff --git a/src/game/pointers/Pointers.cpp b/src/game/pointers/Pointers.cpp index 16d7e1c7..a4940ed8 100644 --- a/src/game/pointers/Pointers.cpp +++ b/src/game/pointers/Pointers.cpp @@ -265,7 +265,7 @@ namespace YimMenu constexpr auto sendPacketPtrn = Pattern<"8B 44 24 60 48 8B D6 48 8B CD">("SendPacket"); scanner.Add(sendPacketPtrn, [this](PointerCalculator ptr) { - SendPacket = ptr.Add(10).Rip().As(); + SendPacket = ptr.Add(15).Rip().As(); }); constexpr auto queuePacketPtrn = Pattern<"48 89 5C 24 08 48 89 6C 24 10 48 89 74 24 18 57 41 54 41 55 41 56 41 57 48 83 EC 30 4C 8B F1 4D">("QueuePacket"); diff --git a/src/game/pointers/Pointers.hpp b/src/game/pointers/Pointers.hpp index b28a9419..cd2af86e 100644 --- a/src/game/pointers/Pointers.hpp +++ b/src/game/pointers/Pointers.hpp @@ -35,18 +35,18 @@ namespace YimMenu { using GetRendererInfo = RenderingInfo* (*)(); using GetNativeHandler = rage::scrNativeHandler (*)(rage::scrNativeHash hash); - using FixVectors = void (*)(rage::scrNativeCallContext* call_ctx); + using FixVectors = void (*)(rage::scrNativeCallContext* callCtx); using SendEventAck = void (*)(rage::netEventMgr* eventMgr, void* event, CNetGamePlayer* sourcePlayer, CNetGamePlayer* targetPlayer, int eventIndex, int handledBitset); using HandleToPtr = void* (*)(int handle); using PtrToHandle = int (*)(void* pointer); using GetLocalPed = CPed* (*)(); using GetSyncTreeForType = rage::netSyncTree* (*)(void* netObjMgr, uint16_t type); using GetNetworkPlayerFromPid = CNetGamePlayer* (*)(uint8_t player); - using WorldToScreen = bool (*)(float* world_coords, float* out_x, float* out_y); + using WorldToScreen = bool (*)(float* worldCoords, float* outX, float* outY); using GetNetObjectById = rage::netObject* (*)(uint16_t id); using RequestControlOfNetObject = bool (*)(rage::netObject** netId, bool unk); - using SendPacket = bool (*)(rage::netConnectionManager* mgr, rage::netPeerAddress* adde, int connection_id, void* data, int size, int flags); - using QueuePacket = bool (*)(rage::netConnectionManager* mgr, int msg_id, void* data, int size, int flags, void* unk); + using SendPacket = bool (*)(rage::netConnectionManager* mgr, rage::netPeerAddress* addr, int connectionId, void* data, int size, int flags); + using QueuePacket = bool (*)(rage::netConnectionManager* mgr, int msgId, void* data, int size, int flags, void* unk); using PostPresenceMessage = bool (*)(int localGamerIndex, rage::rlGamerInfo* recipients, int numRecipients, const char* msg, unsigned int ttlSeconds); using SendNetInfoToLobby = bool (*)(rage::rlGamerInfo* player, int64_t a2, int64_t a3, DWORD* a4); };