From eede6857bc2d873e846a85c35e1bcf7e654d1b16 Mon Sep 17 00:00:00 2001 From: AmazingPP <1620535041@qq.com> Date: Mon, 29 Mar 2021 16:49:43 +0800 Subject: [PATCH] update to GTAV-1.54 --- subVersion/hack.cpp | 78 +++++++++++++++++++-------------------- subVersion/main.cpp | 4 +- subVersion/memManager.cpp | 4 +- subVersion/settings.ini | 3 ++ subVersion/stdafx.h | 22 +++++------ 5 files changed, 56 insertions(+), 55 deletions(-) diff --git a/subVersion/hack.cpp b/subVersion/hack.cpp index 19b24d5..7a35279 100644 --- a/subVersion/hack.cpp +++ b/subVersion/hack.cpp @@ -232,13 +232,13 @@ void hack::getWaypoint() void hack::getObjective() { - static int ColorYellowMission = 66; - static int ColorYellow = 5; - static int ColorWhite = 0; - static int ColorGreen = 2; - static int SpriteCrateDrop = 306; - static int SpriteStandard = 1; - static int SpriteRaceFinish = 38; + constexpr static int ColorYellowMission = 66; + constexpr static int ColorYellow = 5; + constexpr static int ColorWhite = 0; + constexpr static int ColorGreen = 2; + constexpr static int SpriteCrateDrop = 306; + constexpr static int SpriteStandard = 1; + constexpr static int SpriteRaceFinish = 38; DWORD_PTR a = (DWORD_PTR)m_hModule + ADDRESS_BLIP; for (size_t i = 2000; i > 1; i--) @@ -1041,7 +1041,7 @@ void hack::unlockClothes() void hack::intoPV() { - if (scriptGlobal(2540384).at(298).as() != -1) + if (scriptGlobal(GLOBAL_MERRYWEATHER).at(298).as() != -1) scriptGlobal(2409291).at(8).as() = 1; } @@ -1181,7 +1181,7 @@ void hack::callMerryweather(std::ptrdiff_t index) int hack::getPlayerId() { - return scriptGlobal(2440049).as().value(); + return scriptGlobal(2440277).as().value(); } int hack::getNetworkTime() @@ -1191,22 +1191,22 @@ int hack::getNetworkTime() void hack::setCasinoHeistCut(int playerIndex, int cut) { - scriptGlobal(1701666).at(getPlayerId(), 68).at(12).at(1).at(playerIndex).as() = cut; + scriptGlobal(1701669).at(getPlayerId(), 68).at(12).at(1).at(playerIndex).as() = cut; } int hack::getCasinoHeistCut(int playerIndex) { - return scriptGlobal(1701666).at(getPlayerId(), 68).at(12).at(1).at(playerIndex).as().value(); + return scriptGlobal(1701669).at(getPlayerId(), 68).at(12).at(1).at(playerIndex).as().value(); } void hack::createAmbientPickup(unsigned int pickupHash, float posX, float posY, float posZ, int value, unsigned int modelHash) { - scriptGlobal(2515202).at(1).as() = value; - scriptGlobal(2515202).at(3).as() = posX; - scriptGlobal(2515202).at(4).as() = posY; - scriptGlobal(2515202).at(5).as() = posZ; - scriptGlobal(4264051).at(scriptGlobal(2515202).as().value(), 85).at(66).at(2).as() = 2; - scriptGlobal(2515208).as() = 1; + scriptGlobal(2515430).at(1).as() = value; + scriptGlobal(2515430).at(3).as() = posX; + scriptGlobal(2515430).at(4).as() = posY; + scriptGlobal(2515430).at(5).as() = posZ; + scriptGlobal(4264051).at(scriptGlobal(2515430).as().value(), 85).at(66).at(2).as() = 2; + scriptGlobal(2515436).as() = 1; m_unkModel.getModelHash(); if (m_unkModel.m_dwModelHash != modelHash) @@ -1282,7 +1282,7 @@ void hack::consumeStatQueue() { g_pD3D9Render->m_bMBShowing = false; } - Sleep(1); + Sleep(500); } }); tConsumeStatQueue.detach(); @@ -1709,15 +1709,15 @@ void hack::godMode(feat* feature) void hack::frameFlags(feat* featSuperJump, feat* featExplosiveMelee, feat* featFireAmmo, feat* featExplosiveAmmo) { - BYTE cur[2] = {}; + BYTE cur[5] = {}; if (!featSuperJump->m_bOn && !featExplosiveMelee->m_bOn && !featFireAmmo->m_bOn && !featExplosiveAmmo->m_bOn) { if (!featSuperJump->m_bRestored || !featExplosiveMelee->m_bRestored || !featFireAmmo->m_bRestored || !featExplosiveAmmo->m_bRestored) { - g_pMemMan->readMem((DWORD_PTR)m_hModule + ADDRESS_FRAME_FLAGS, cur, sizeof(BYTE) * 2, PAGE_EXECUTE_READWRITE); - BYTE value[2] = { 0x89, 0x0B }; + g_pMemMan->readMem((DWORD_PTR)m_hModule + ADDRESS_FRAME_FLAGS, cur, sizeof(cur), PAGE_EXECUTE_READWRITE); + BYTE value[5] = { 0xE8, 0x90, 0x7B, 0xF3, 0xFF }; if (cur[0] != value[0]) - g_pMemMan->writeMem((DWORD_PTR)m_hModule + ADDRESS_FRAME_FLAGS, value, sizeof(BYTE) * 2, PAGE_EXECUTE_READWRITE); + g_pMemMan->writeMem((DWORD_PTR)m_hModule + ADDRESS_FRAME_FLAGS, value, sizeof(value), PAGE_EXECUTE_READWRITE); featSuperJump->m_bRestored = true; featExplosiveMelee->m_bRestored = true; @@ -1736,10 +1736,10 @@ void hack::frameFlags(feat* featSuperJump, feat* featExplosiveMelee, feat* featF if (featExplosiveAmmo->m_bOn) dwValue += 8; - g_pMemMan->readMem((DWORD_PTR)m_hModule + ADDRESS_FRAME_FLAGS, cur, sizeof(BYTE) * 2, PAGE_EXECUTE_READWRITE); - BYTE value[2] = { 0x90, 0x90 }; + g_pMemMan->readMem((DWORD_PTR)m_hModule + ADDRESS_FRAME_FLAGS, cur, sizeof(cur), PAGE_EXECUTE_READWRITE); + BYTE value[5] = { 0x90, 0x90, 0x90, 0x90, 0x90 }; if (cur[0] != value[0]) - g_pMemMan->writeMem((DWORD_PTR)m_hModule + ADDRESS_FRAME_FLAGS, value, sizeof(BYTE) * 2, PAGE_EXECUTE_READWRITE); + g_pMemMan->writeMem((DWORD_PTR)m_hModule + ADDRESS_FRAME_FLAGS, value, sizeof(value), PAGE_EXECUTE_READWRITE); m_player.getFrameFlags(); if (m_player.m_dwFrameFlags != dwValue) m_player.setFrameFlags(dwValue); @@ -2352,8 +2352,8 @@ void hack::removeSuicideCooldown(feat* feature) } return; } - if (scriptGlobal(2540384).at(6672).as() != -1) - scriptGlobal(2540384).at(6672).as() = -1; + if (scriptGlobal(GLOBAL_MERRYWEATHER).at(6672).as() != -1) + scriptGlobal(GLOBAL_MERRYWEATHER).at(6672).as() = -1; return; } @@ -2368,8 +2368,8 @@ void hack::removePassiveModeCooldown(feat* feature) } return; } - if (scriptGlobal(2540384).at(4456).as() != 0) - scriptGlobal(2540384).at(4456).as() = 0; + if (scriptGlobal(GLOBAL_MERRYWEATHER).at(4456).as() != 0) + scriptGlobal(GLOBAL_MERRYWEATHER).at(4456).as() = 0; if (scriptGlobal(1697106).as() != 0) scriptGlobal(1697106).as() = 0; @@ -2382,13 +2382,13 @@ void hack::allowSellOnNonPublic(feat* feature) { if (!feature->m_bRestored) { - scriptGlobal(2451787).at(742).as() = 1; + scriptGlobal(2452015).at(742).as() = 1; feature->m_bRestored = true; } return; } - if (scriptGlobal(2451787).at(742).as() != 0) - scriptGlobal(2451787).at(742).as() = 0; + if (scriptGlobal(2452015).at(742).as() != 0) + scriptGlobal(2452015).at(742).as() = 0; return; } @@ -2399,13 +2399,13 @@ void hack::instantBullShark(feat* feature) { if (!feature->m_bRestored) { - scriptGlobal(2440049).at(4006).as() = 5; + scriptGlobal(2440277).at(4006).as() = 5; feature->m_bRestored = true; } return; } - if (scriptGlobal(2440049).at(4006).as() == 0) - scriptGlobal(2440049).at(4006).as() = 5; + if (scriptGlobal(2440277).at(4006).as() == 0) + scriptGlobal(2440277).at(4006).as() = 5; return; } @@ -2451,15 +2451,15 @@ void hack::offRadar(feat* feature) { if (!feature->m_bRestored) { - scriptGlobal(2425869).at(getPlayerId(), 443).at(204).as() = 0; + scriptGlobal(2426097).at(getPlayerId(), 443).at(204).as() = 0; feature->m_bRestored = true; } return; } - if (scriptGlobal(2425869).at(getPlayerId(), 443).at(204).as() == 0) + if (scriptGlobal(2426097).at(getPlayerId(), 443).at(204).as() == 0) { - scriptGlobal(2425869).at(getPlayerId(), 443).at(204).as() = 1; - scriptGlobal(2440049).at(70).as() = getNetworkTime(); + scriptGlobal(2426097).at(getPlayerId(), 443).at(204).as() = 1; + scriptGlobal(2440277).at(70).as() = getNetworkTime(); } return; diff --git a/subVersion/main.cpp b/subVersion/main.cpp index 4a68a01..145c240 100644 --- a/subVersion/main.cpp +++ b/subVersion/main.cpp @@ -78,7 +78,7 @@ int __stdcall WinMain( HINSTANCE hInstance, g_pHack = new hack; LPCSTR szWindowTitleTarget = "Grand Theft Auto V"; - LPCWSTR szWindowTitle = L"subVersion mAsk¡ãÖØÖÆ°æ v1.3.5.2"; + LPCWSTR szWindowTitle = L"subVersion mAsk¡ãÖØÖÆ°æ v1.3.6"; g_pMemMan->setWindowName(szWindowTitleTarget); g_pD3D9Render->m_szWindowTitle = szWindowTitle; @@ -643,7 +643,7 @@ DWORD __stdcall threadHack(LPVOID lpParam) g_pHack->consumeStatQueue(); } } - Sleep(10); + Sleep(100); } g_bKillHack = true; return 0; diff --git a/subVersion/memManager.cpp b/subVersion/memManager.cpp index 1e1bcbf..24ea9ae 100644 --- a/subVersion/memManager.cpp +++ b/subVersion/memManager.cpp @@ -154,9 +154,9 @@ void memManager::initPtr() ADDRESS_UNK_MODEL = rip(offset); }); - patternMain.add("Frame flags zero writer dec code", "89 0B 48 8B 7B 10 32 D2 EB 19 39 0F 74 11 84 D2 75 09 8B 17 E8 47 C8 FF FF", [](uintptr_t offset) + patternMain.add("Frame flags zero writer dec code", "48 81 C1 ? ? ? ? E8 ? ? ? ? 48 8B 5C 24 ? 0F 28 74 24 ?", [](uintptr_t offset) { - ADDRESS_FRAME_FLAGS = offset; + ADDRESS_FRAME_FLAGS = offset + 0x7; }); patternMain.run(); diff --git a/subVersion/settings.ini b/subVersion/settings.ini index 276eb48..303d2c6 100644 --- a/subVersion/settings.ini +++ b/subVersion/settings.ini @@ -115,3 +115,6 @@ disableThePhone=0 SuicideCD=0 triggerBot=0 waterProof=0 +forceOnPed=0 +forceOnVeh=0 +forceOnHeli=0 diff --git a/subVersion/stdafx.h b/subVersion/stdafx.h index 3732026..5835eaf 100644 --- a/subVersion/stdafx.h +++ b/subVersion/stdafx.h @@ -79,20 +79,20 @@ #define OFFSET_PLAYER_VEHICLE 0xD30 //ptr to last used vehicle #define OFFSET_NET_PLAYER_INFO 0xB0 #define OFFSET_PLAYER_INFO 0x10C8 //playerInfo struct -#define OFFSET_PLAYER_INFO_NAME 0x84 -#define OFFSET_PLAYER_INFO_SWIM_SPD 0x150 //swim speed; def 1; float -#define OFFSET_PLAYER_INFO_RUN_SPD 0xCD0 //run speed; def 1; float -#define OFFSET_PLAYER_INFO_FRAMEFLAGS 0x1F9 //frame flags; DWORD -#define OFFSET_PLAYER_INFO_WANTED_CAN_CHANGE 0x71C //fWantedCanChange +#define OFFSET_PLAYER_INFO_NAME 0xA4 +#define OFFSET_PLAYER_INFO_SWIM_SPD 0x170 //swim speed; def 1; float +#define OFFSET_PLAYER_INFO_RUN_SPD 0xCF0 //run speed; def 1; float +#define OFFSET_PLAYER_INFO_FRAMEFLAGS 0x219 //frame flags; DWORD +#define OFFSET_PLAYER_INFO_WANTED_CAN_CHANGE 0x73C //fWantedCanChange #define OFFSET_PLAYER_INFO_NPC_IGNORE 0x850 //npc ignore; DWORD; everyone = 0x450000; -#define OFFSET_PLAYER_INFO_WANTED 0x868 //wanted level; DWORD +#define OFFSET_PLAYER_INFO_WANTED 0x888 //wanted level; DWORD #define OFFSET_PLAYER_INFO_STAMINA 0xCD4 //fStamina, fStaminaMax #define OFFSET_PLAYER_RAGDOLL 0x10B8 //byte; CPed.noRagdoll: 0x20 = off; 0x00/0x01 = on #define OFFSET_PLAYER_SEATBELT 0x140C //byte; CPed.seatBelt: 0xC8 = off; 0xC9 = on #define OFFSET_PLAYER_INVEHICLE 0x1477 #define OFFSET_PLAYER_ARMOR 0x14E0 //armour #define OFFSET_PLAYER_WATER_PROOF 0x188 //water proof; DWORD; +0x1000000 = on -#define OFFSET_PLAYER_VEHICLE_DAMAGE_MP 0xCFC //super punck/kick;float; +#define OFFSET_PLAYER_VEHICLE_DAMAGE_MP 0xD1C //super punck/kick;float; //vehicle offsets #define OFFSET_VEHICLE_HEALTH 0x908 //vehicle health; 0.f-1000.f @@ -186,11 +186,9 @@ //globals #define GLOBAL_TUNEABLES 0x40001 -#define GLOBAL_CREATE_VEHICLE 2462286 -#define GLOBAL_MERRYWEATHER 2540384 +#define GLOBAL_CREATE_VEHICLE 2462514 +#define GLOBAL_MERRYWEATHER 2540612 #define GLOBAL_BLOCK_SCRIPT_EVENTS 1391942 -#define GLOBAL_BUSINESS 1590535 -#define GLOBAL_SESSION 1312443 //feature indexing #define FEATURE_P_GOD 0x00 @@ -340,5 +338,5 @@ extern uintptr_t ADDRESS_GLOBAL; //4C 8D 05 ? ? ? ? 4D 8B 08 4D 85 C9 74 11 extern uintptr_t ADDRESS_PLAYER_LIST; //48 8B 0D ? ? ? ? E8 ? ? ? ? 48 8B C8 E8 ? ? ? ? 48 8B CF extern uintptr_t ADDRESS_REPLAY_INTERFACE; //48 8D 0D ? ? ? ? 48 8B D7 E8 ? ? ? ? 48 8D 0D ? ? ? ? 8A D8 E8 ? ? ? ? 84 DB 75 13 48 8D 0D ? ? ? ? extern uintptr_t ADDRESS_UNK_MODEL; //4C 8B 15 ? ? ? ? 49 8B 04 D2 44 39 40 08 -extern uintptr_t ADDRESS_FRAME_FLAGS; //Frame flags 0 writer dec code; 89 0B 48 8B 7B 10 32 D2 EB 19 39 0F 74 11 84 D2 75 09 8B 17 E8 47 C8 FF FF; 90 90 +extern uintptr_t ADDRESS_FRAME_FLAGS; //Frame flags 0 writer call; (+0x7) 48 81 C1 ? ? ? ? E8 ? ? ? ? 48 8B 5C 24 ? 0F 28 74 24 ?; 90 90 90 90 90 #endif \ No newline at end of file