From b25a00aab35f16008b6f2fa53296b13e97144ad2 Mon Sep 17 00:00:00 2001 From: AmazingPP <1289531673@qq.com> Date: Tue, 1 Sep 2020 19:53:12 +0800 Subject: [PATCH] Add many features --- subVersion/WeaponPreview.h | 156 +++++++++++++++++----------------- subVersion/hack.cpp | 88 +++++++++++++++---- subVersion/hack.h | 5 +- subVersion/main.cpp | 15 +++- subVersion/ptrHandler.h | 22 ++++- subVersion/scriptGlobal.h | 2 +- subVersion/settings.ini | 2 +- subVersion/stdafx.h | 3 + subVersion/subVersion.vcxproj | 6 ++ 9 files changed, 195 insertions(+), 104 deletions(-) diff --git a/subVersion/WeaponPreview.h b/subVersion/WeaponPreview.h index fdf961a..a95da11 100644 --- a/subVersion/WeaponPreview.h +++ b/subVersion/WeaponPreview.h @@ -8,83 +8,83 @@ struct WeaponPreview { char* Model; }; -static const std::vector Weapons{ - {L"Advancedrifle", "weapon_advancedrifle", "pickup_weapon_advancedrifle", "w_ar_advancedrifle" }, - {L"Appistol","weapon_appistol","pickup_weapon_appistol","w_pi_appistol" }, - {L"Assaultrifle","weapon_assaultrifle","pickup_weapon_assaultrifle","w_ar_assaultrifle" }, - {L"Assaultshotgun","weapon_assaultshotgun","pickup_weapon_assaultshotgun","w_sg_assaultshotgun" }, - {L"Assaultsmg","weapon_assaultsmg","pickup_weapon_assaultsmg","w_sb_assaultsmg" }, - {L"Autoshotgun","weapon_autoshotgun","pickup_weapon_autoshotgun","w_sg_autoshotgun" }, - {L"Ball","weapon_ball","pickup_weapon_ball","w_am_baseball" }, - {L"Bat","weapon_bat","pickup_weapon_bat","w_me_bat" }, - {L"Battleaxe","weapon_battleaxe","pickup_weapon_battleaxe","w_me_battleaxe" }, - {L"Bottle","weapon_bottle","pickup_weapon_bottle","w_me_bottle" }, - {L"Bullpuprifle","weapon_bullpuprifle","pickup_weapon_bullpuprifle","w_ar_bullpuprifle" }, - {L"Bullpupshotgun","weapon_bullpupshotgun","pickup_weapon_bullpupshotgun","w_sg_bullpupshotgun" }, - {L"Bzgas","weapon_bzgas","pickup_weapon_bzgas","w_ex_grenadesmoke" }, - {L"Carbinerifle","weapon_carbinerifle","pickup_weapon_carbinerifle","w_ar_carbinerifle" }, - {L"Combatmg","weapon_combatmg","pickup_weapon_combatmg","w_mg_combatmg" }, - {L"Combat PDW","weapon_combatpdw","pickup_weapon_combatpdw","w_sb_pdw" }, - {L"Combatpistol","weapon_combatpistol","pickup_weapon_combatpistol","w_pi_combatpistol" }, - {L"Compactlauncher","weapon_compactlauncher","pickup_weapon_compactlauncher","w_lr_compactlauncher" }, - {L"Compactrifle","weapon_compactrifle","pickup_weapon_compactrifle","w_ar_compactrifle" }, - {L"Crowbar","weapon_crowbar","pickup_weapon_crowbar","w_me_crowbar" }, - {L"Dagger","weapon_dagger","pickup_weapon_dagger","w_me_dagger" }, - {L"Dbshotgun","weapon_dbshotgun","pickup_weapon_dbshotgun","w_sg_dbshotgun" }, - {L"Doubleaction","weapon_doubleaction","pickup_weapon_doubleaction","w_pi_doubleaction" }, - {L"Fireextinguisher","weapon_fireextinguisher","pickup_weapon_fireextinguisher","w_am_fire_exting" }, - {L"Firework","weapon_firework","pickup_weapon_firework","w_lr_firework" }, - {L"Flare","weapon_flare","pickup_weapon_flare","w_am_flare" }, - {L"Flaregun","weapon_flaregun","pickup_weapon_flaregun","w_pi_flaregun" }, - {L"Flashlight","weapon_flashlight","pickup_weapon_flashlight","w_me_flashlight" }, - {L"Golfclub","weapon_golfclub","pickup_weapon_golfclub","w_me_gclub" }, - {L"Grenade","weapon_grenade","pickup_weapon_grenade","w_ex_grenadefrag" }, - {L"Grenadelauncher","weapon_grenadelauncher","pickup_weapon_grenadelauncher","w_lr_grenadelauncher" }, - {L"Gusenberg","weapon_gusenberg","pickup_weapon_gusenberg","w_sb_gusenberg" }, - {L"Hammer","weapon_hammer","pickup_weapon_hammer","w_me_hammer" }, - {L"Hatchet","weapon_hatchet","pickup_weapon_hatchet","w_me_hatchet" }, - {L"Heavypistol","weapon_heavypistol","pickup_weapon_heavypistol","w_pi_heavypistol" }, - {L"Heavyshotgun","weapon_heavyshotgun","pickup_weapon_heavyshotgun","w_sg_heavyshotgun" }, - {L"Heavysniper","weapon_heavysniper","pickup_weapon_heavysniper","w_sr_heavysniper" }, - {L"Hominglauncher","weapon_hominglauncher","pickup_weapon_hominglauncher","w_lr_homing" }, - {L"Knife","weapon_knife","pickup_weapon_knife","w_me_knife_01" }, - {L"Knuckle","weapon_knuckle","pickup_weapon_knuckle","w_me_knuckle" }, - {L"Machete","weapon_machete","pickup_weapon_machete","w_me_machete" }, - {L"Machinepistol","weapon_machinepistol","pickup_weapon_machinepistol","w_pi_machinepistol" }, - {L"Marksmanpistol","weapon_marksmanpistol","pickup_weapon_marksmanpistol","w_pi_marksmanpistol" }, - {L"Marksmanrifle","weapon_marksmanrifle","pickup_weapon_marksmanrifle","w_sr_marksmanrifle" }, - {L"MG","weapon_mg","pickup_weapon_mg","w_mg_mg" }, - {L"Microsmg","weapon_microsmg","pickup_weapon_microsmg","w_sb_microsmg" }, - {L"Minigun","weapon_minigun","pickup_weapon_minigun","w_mg_minigun" }, - {L"Minismg","weapon_minismg","pickup_weapon_minismg","w_sb_minismg" }, - {L"Molotov","weapon_molotov","pickup_weapon_molotov","w_ex_molotov" }, - {L"Musket","weapon_musket","pickup_weapon_musket","w_ar_musket" }, - {L"Nightstick","weapon_nightstick","pickup_weapon_nightstick","w_me_nightstick" }, - {L"Petrolcan","weapon_petrolcan","pickup_weapon_petrolcan","w_am_jerrycan" }, - {L"Pipebomb","weapon_pipebomb","pickup_weapon_pipebomb","w_ex_pipebomb" }, - {L"Pistol","weapon_pistol","pickup_weapon_pistol","w_pi_pistol" }, - {L"Pistol50","weapon_pistol50","pickup_weapon_pistol50","w_pi_pistol50" }, - {L"Poolcue","weapon_poolcue","pickup_weapon_poolcue","w_me_poolcue" }, - {L"Proxmine","weapon_proxmine","pickup_weapon_proxmine","w_ex_proxmine" }, - {L"Pumpshotgun","weapon_pumpshotgun","pickup_weapon_pumpshotgun","w_sg_pumpshotgun" }, - {L"Railgun","weapon_railgun","pickup_weapon_railgun","w_ar_railgun" }, - {L"Raycarbine","weapon_raycarbine","pickup_weapon_raycarbine","w_ar_raycarbine" }, - {L"Rayminigun","weapon_rayminigun","pickup_weapon_rayminigun","w_mg_rayminigun" }, - {L"Raypistol","weapon_raypistol","pickup_weapon_raypistol","w_pi_raygun" }, - {L"Revolver","weapon_revolver","pickup_weapon_revolver","w_pi_revolver" }, +static const std::vector Pistol{ + {L"穿甲手枪","weapon_appistol","pickup_weapon_appistol","w_pi_appistol" }, + {L"战斗手枪","weapon_combatpistol","pickup_weapon_combatpistol","w_pi_combatpistol" }, + {L"信号枪","weapon_flaregun","pickup_weapon_flaregun","w_pi_flaregun"}, + {L"重型手枪","weapon_heavypistol","pickup_weapon_heavypistol","w_pi_heavypistol" }, + {L"射手手枪","weapon_marksmanpistol","pickup_weapon_marksmanpistol","w_pi_marksmanpistol"}, + {L"手枪","weapon_pistol","pickup_weapon_pistol","w_pi_pistol" }, + {L"手枪 MK2","weapon_pistol_mk2","pickup_weapon_pistol_mk2","w_pi_pistol_mk2"}, + {L".5口径手枪","weapon_pistol50","pickup_weapon_pistol50","w_pi_pistol50" }, + {L"冲锋手枪","weapon_raypistol","pickup_weapon_raypistol","w_pi_raygun" }, + {L"重型左轮手枪","weapon_revolver","pickup_weapon_revolver","w_pi_revolver"}, + {L"重型左轮手枪 MK2","weapon_revolver_mk2","pickup_weapon_revolver_mk2","w_pi_revolver_mk2"}, + {L"劣质手枪","weapon_snspistol","pickup_weapon_snspistol","w_pi_sns_pistol "}, + {L"劣质手枪 MK2","weapon_snspistol_mk2","pickup_weapon_snspistol_mk2","w_pi_sns_pistol_mk2"}, + {L"电击枪","weapon_stungun","pickup_weapon_stungun","w_pi_stungun" }, + {L"老式手枪","weapon_vintagepistol","pickup_weapon_vintagepistol","w_pi_vintage_pistol" }, +}; +static const std::vector Rifle{ + {L"高级步枪", "weapon_advancedrifle", "pickup_weapon_advancedrifle", "w_ar_advancedrifle" }, + {L"突击步枪AK47","weapon_assaultrifle","pickup_weapon_assaultrifle","w_ar_assaultrifle" }, + {L"突击步枪AK47 MK2","weapon_assaultrifle_mk2","pickup_weapon_assaultrifle_mk2","w_ar_assaultrifle_mk2"}, + {L"无托式步枪QBZ95","weapon_bullpuprifle","pickup_weapon_bullpuprifle","w_ar_bullpuprifle" }, + {L"无托式步枪QBZ95 MK2","weapon_bullpuprifle_mk2","pickup_weapon_bullpuprifle_mk2","w_ar_bullpuprifle_mk2"}, + {L"卡宾步枪M4","weapon_carbinerifle","pickup_weapon_carbinerifle","w_ar_carbinerifle" }, + {L"卡宾步枪M4 MK2","weapon_carbinerifle_mk2","pickup_weapon_carbinerifle_mk2","w_ar_carbinerifle_mk2"}, + {L"紧凑型步枪","weapon_compactrifle","pickup_weapon_compactrifle","w_ar_compactrifle"}, + {L"老式火枪","weapon_musket","pickup_weapon_musket","w_ar_musket"}, + {L"特制卡宾步枪","weapon_specialcarbine","pickup_weapon_specialcarbine","w_ar_specialcarbine"}, + {L"特制卡宾步枪 MK2","weapon_specialcarbine_mk2","pickup_weapon_specialcarbine_mk2","w_ar_specialcarbine_mk2"}, +}; +static const std::vector SMG{ + {L"突击冲锋枪","weapon_assaultsmg","pickup_weapon_assaultsmg","w_sb_assaultsmg" }, + {L"作战自卫冲锋枪","weapon_combatpdw","pickup_weapon_combatpdw","w_sb_pdw"}, + {L"UZI","weapon_microsmg","pickup_weapon_microsmg","w_sb_microsmg" }, + {L"汤姆逊冲锋枪","weapon_gusenberg","pickup_weapon_gusenberg","w_sb_gusenberg" }, + {L"冲锋枪","weapon_smg","pickup_weapon_smg","w_sb_smg" }, + {L"冲锋枪 MK2","weapon_smg_mk2","pickup_weapon_smg_mk2","w_sb_smg_mk2"}, + {L"微型冲锋枪","weapon_minismg","pickup_weapon_minismg","w_sb_minismg" }, +}; +static const std::vector MG{ + {L"战斗机枪","weapon_combatmg","pickup_weapon_combatmg","w_mg_combatmg" }, + {L"战斗机枪 MK2","weapon_combatmg_mk2","pickup_weapon_combatmg_mk2","w_mg_combatmgmk2"}, + {L"机枪","weapon_mg","pickup_weapon_mg","w_mg_mg" }, +}; +static const std::vector Shotgun{ + {L"突击霰弹枪","weapon_assaultshotgun","pickup_weapon_assaultshotgun","w_sg_assaultshotgun" }, + {L"冲锋霰弹枪","weapon_autoshotgun","pickup_weapon_autoshotgun","w_sg_autoshotgun"}, + {L"无托式霰弹枪","weapon_bullpupshotgun","pickup_weapon_bullpupshotgun","w_sg_bullpupshotgun" }, + {L"双管霰弹枪","weapon_dbshotgun","pickup_weapon_dbshotgun","w_sg_dbshotgun"}, + {L"重型霰弹枪","weapon_heavyshotgun","pickup_weapon_heavyshotgun","w_sg_heavyshotgun" }, + {L"泵动式霰弹枪","weapon_pumpshotgun","pickup_weapon_pumpshotgun","w_sg_pumpshotgun" }, + {L"泵动式霰弹枪 MK2","weapon_pumpshotgun_mk2","pickup_weapon_pumpshotgun_mk2","w_sg_pumpshotgun_mk2"}, + {L"短管霰弹枪","weapon_sawnoffshotgun","pickup_weapon_sawnoffshotgun","w_sg_sawnoff" }, +}; +static const std::vector Sniper{ + {L"重型狙击步枪","weapon_heavysniper","pickup_weapon_heavysniper","w_sr_heavysniper" }, + {L"重型狙击步枪 MK2","weapon_heavysniper_mk2","pickup_weapon_heavysniper_mk2","w_sr_heavysniper_mk2"}, + {L"射手步枪","weapon_marksmanrifle","pickup_weapon_marksmanrifle","w_sr_marksmanrifle" }, + {L"射手步枪 MK2","weapon_marksmanrifle_mk2","pickup_weapon_marksmanrifle_mk2","w_sr_marksmanrifle_mk2"}, + {L"狙击步枪","weapon_sniperrifle","pickup_weapon_sniperrifle","w_sr_sniperrifle" }, +}; +static const std::vector Heavy{ + {L"电磁步枪","weapon_railgun","pickup_weapon_railgun","w_ar_railgun"}, + {L"加特林","weapon_minigun","pickup_weapon_minigun","w_mg_minigun" }, + {L"紧凑型榴弹发射器","weapon_compactlauncher","pickup_weapon_compactlauncher","w_lr_compactlauncher"}, + {L"烟花发射器","weapon_firework","pickup_weapon_firework","w_lr_firework" }, + {L"榴弹发射器","weapon_grenadelauncher","pickup_weapon_grenadelauncher","w_lr_grenadelauncher" }, + {L"制导火箭发射器","weapon_hominglauncher","pickup_weapon_hominglauncher","w_lr_homing"}, {L"RPG","weapon_rpg","pickup_weapon_rpg","w_lr_rpg" }, - {L"Sawnoffshotgun","weapon_sawnoffshotgun","pickup_weapon_sawnoffshotgun","w_sg_sawnoff" }, - {L"SMG","weapon_smg","pickup_weapon_smg","w_sb_smg" }, - {L"Smokegrenade","weapon_smokegrenade","pickup_weapon_smokegrenade","w_ex_grenadesmoke" }, - {L"Sniperrifle","weapon_sniperrifle","pickup_weapon_sniperrifle","w_sr_sniperrifle" }, - {L"Snowball","weapon_snowball","pickup_weapon_snowball","w_ex_snowball" }, - {L"SNS Pistol","weapon_snspistol","pickup_weapon_snspistol","w_pi_sns_pistol " }, - {L"Specialcarbine","weapon_specialcarbine","pickup_weapon_specialcarbine","w_ar_specialcarbine" }, - {L"Stickybomb","weapon_stickybomb","pickup_weapon_stickybomb","w_ex_pe" }, - {L"Stone Hatchet","weapon_stone_hatchet","pickup_weapon_stone_hatchet","w_me_stonehatchet" }, - {L"Stungun","weapon_stungun","pickup_weapon_stungun","w_pi_stungun" }, - {L"Switchblade","weapon_switchblade","pickup_weapon_switchblade","w_me_switchblade" }, - {L"Vintagepistol","weapon_vintagepistol","pickup_weapon_vintagepistol","w_pi_vintage_pistol" }, - {L"Wrench","weapon_wrench","pickup_weapon_wrench","w_me_wrench" }, - {L"Unarmed","weapon_unarmed","pickup_weapon_unarmed","w_me_unarmed" } +}; + +static const std::vector>> weaponPreview{ + {L"手枪 >>",Pistol}, + {L"步枪 >>",Rifle}, + {L"冲锋枪 >>",SMG}, + {L"轻机枪 >>",MG}, + {L"霰弹枪 >>",Shotgun}, + {L"狙击枪 >>",Sniper}, + {L"重武器 >>",Heavy}, }; \ No newline at end of file diff --git a/subVersion/hack.cpp b/subVersion/hack.cpp index ec68f5a..3cc2f71 100644 --- a/subVersion/hack.cpp +++ b/subVersion/hack.cpp @@ -950,7 +950,7 @@ void hack::unlockClothes(float* arg) void hack::intoPV(float* arg) { - if (scriptGlobal(2537071).at(296).as().value() != -1) + if (scriptGlobal(2537071).at(296).as() != -1) scriptGlobal(2409287).at(8).as() = 1; } @@ -1021,6 +1021,10 @@ void hack::spawnVehicle(float* arg) { scriptGlobal(GLOBAL_CREATE_VEHICLE).at(27).at(10 + i).as() = pTemp[i]; } + else if (pTemp[42] > 0 && i == 42) + { + scriptGlobal(GLOBAL_CREATE_VEHICLE).at(27).at(10 + 6 + i).as() = rand() % pTemp[i] + 1; + } else if (i > 22) { scriptGlobal(GLOBAL_CREATE_VEHICLE).at(27).at(10 + 6 + i).as() = pTemp[i]; @@ -1044,9 +1048,11 @@ void hack::spawnVehicle(float* arg) void hack::selfDropWeapon(float* arg) { - int index = (int)*arg; + int weaponTypeIndex = (int)*arg / 1000; + int weaponIndex = (int)*arg % 1000; + auto weapon = weaponPreview[weaponTypeIndex].second[weaponIndex]; m_player.getPos(); - createAmbientPickup(joaat(Weapons[index].Pickup), m_player.m_v3Pos.x, m_player.m_v3Pos.y, m_player.m_v3Pos.z + 2, 9999, joaat(Weapons[index].Model)); + createAmbientPickup(joaat(weapon.Pickup), m_player.m_v3Pos.x, m_player.m_v3Pos.y, m_player.m_v3Pos.z + 2, 9999, joaat("prop_cash_pile_01")); } void hack::selfDropMoney(feat* feature) @@ -1059,7 +1065,7 @@ void hack::selfDropMoney(feat* feature) { if (feature->m_bOn) { - if (scriptGlobal(GLOBAL_TUNEABLES).at(167).as().value() != 10000) + if (scriptGlobal(GLOBAL_TUNEABLES).at(167).as() != 10000) scriptGlobal(GLOBAL_TUNEABLES).at(167).as() = 10000; m_player.getPos(); @@ -1088,6 +1094,11 @@ int hack::getPlayerId() return scriptGlobal(2439138).as().value(); } +int hack::getNetworkTime() +{ + return scriptGlobal(1312585).at(11).as().value(); +} + void hack::setCasinoHeistCut(int playerIndex, int cut) { scriptGlobal(1700796).at(getPlayerId(), 68).at(12).at(1).at(playerIndex).as() = cut; @@ -1141,7 +1152,7 @@ void hack::blockScriptEvents(feat* feature, std::ptrdiff_t index) } return; } - if (scriptGlobal(GLOBAL_BLOCK_SCRIPT_EVENTS).at(index).as().value() != 1) + if (scriptGlobal(GLOBAL_BLOCK_SCRIPT_EVENTS).at(index).as() != 1) scriptGlobal(GLOBAL_BLOCK_SCRIPT_EVENTS).at(index).as() = 1; return; @@ -2198,9 +2209,9 @@ void hack::removePassiveModeCooldown(feat* feature) } return; } - if (scriptGlobal(2537071).at(4393).as().value() != 0) + if (scriptGlobal(2537071).at(4393).as() != 0) scriptGlobal(2537071).at(4393).as() = 0; - if (scriptGlobal(1696236).as().value() != 0) + if (scriptGlobal(1696236).as() != 0) scriptGlobal(1696236).as() = 0; return; @@ -2216,15 +2227,27 @@ void hack::allowSellOnNonPublic(feat* feature) } return; } - if (scriptGlobal(2450632).at(644).as().value() != 0) + if (scriptGlobal(2450632).at(644).as() != 0) scriptGlobal(2450632).at(644).as() = 0; return; } -void hack::instantBullShark(float* arg) +void hack::instantBullShark(feat* feature) { - scriptGlobal(2439138).at(3895).as() = 5; + if (!feature->m_bOn) + { + if (!feature->m_bRestored) + { + scriptGlobal(2439138).at(3895).as() = 5; + feature->m_bRestored = true; + } + return; + } + if (scriptGlobal(2439138).at(3895).as() == 0) + scriptGlobal(2439138).at(3895).as() = 5; + + return; } void hack::bullSharkDrop(float* arg) @@ -2262,23 +2285,54 @@ void hack::airstrike(float* arg) callMerryweather(4390); } +void hack::offRadar(feat* feature) +{ + if (!feature->m_bOn) + { + if (!feature->m_bRestored) + { + scriptGlobal(2425662).at(getPlayerId(), 421).at(200).as() = 0; + feature->m_bRestored = true; + } + return; + } + if (scriptGlobal(2425662).at(getPlayerId(), 421).at(200).as() == 0) + { + // Ghost organization + //scriptGlobal(2537071).at(4561).as() = 22; + //scriptGlobal(262145).at(12674).as() = 6000000; + scriptGlobal(2425662).at(getPlayerId(), 421).at(200).as() = 1; + scriptGlobal(2439138).at(70).as() = getNetworkTime(); + } + + return; +} + void hack::disableThePhone(feat* feature) { if (!feature->m_bOn) { if (!feature->m_bRestored) { - scriptGlobal(19486).at(1).as() = 3; feature->m_bRestored = true; } return; } - if (scriptGlobal(19486).at(1).as().value() > 1) - scriptGlobal(19486).at(1).as() = 1; + if (scriptGlobal(6671).as() > 0) + { + scriptGlobal(2543673).at(37).as() = 1; + scriptGlobal(6671).as() = 0; + } return; } +void hack::antiCEOKick(feat* feature) +{ + blockScriptEvents(feature, 570); + return; +} + void hack::antiKickToSP(feat* feature) { static const ptrdiff_t offests[] = { 6,16,20,21,22,23,24,52,327,369,479,483,489,491,529,533,566,578,591,609,610,611,616,618,633,634,637,643,644,645,647,693,722,733,739,749,771 }; @@ -2294,7 +2348,7 @@ void hack::antiKickToSP(feat* feature) return; } for (auto index : offests) { - if (scriptGlobal(GLOBAL_BLOCK_SCRIPT_EVENTS).at(index).as().value() != 1) + if (scriptGlobal(GLOBAL_BLOCK_SCRIPT_EVENTS).at(index).as() != 1) scriptGlobal(GLOBAL_BLOCK_SCRIPT_EVENTS).at(index).as() = 1; } @@ -2336,13 +2390,13 @@ void hack::about(float* arg) switch ((int)*arg) { case 0: - WinExec("explorer.exe https://github.com/AmazingPP/subVerison_GTAV_Hack", SW_NORMAL); + WinExec("explorer.exe https://github.com/AmazingPP/subVerison_GTAV_Hack", SW_SHOW); break; case 1: - WinExec("explorer.exe https://github.com/AmazingPP/subVerison_GTAV_Hack/releases", SW_NORMAL); + WinExec("explorer.exe https://github.com/AmazingPP/subVerison_GTAV_Hack/releases", SW_SHOW); break; case 2: - WinExec("explorer.exe https://github.com/AmazingPP/subVerison_GTAV_Hack/blob/master/README.md#%E6%8D%90%E8%B5%A0", SW_NORMAL); + WinExec("explorer.exe https://github.com/AmazingPP/subVerison_GTAV_Hack/blob/master/README.md#%E6%8D%90%E8%B5%A0", SW_SHOW); break; default: break; diff --git a/subVersion/hack.h b/subVersion/hack.h index d72e1d3..4fa8412 100644 --- a/subVersion/hack.h +++ b/subVersion/hack.h @@ -152,7 +152,7 @@ class hack : public trainer void tunableAntiIdleKick(feat* feature); void removePassiveModeCooldown(feat* feature); void allowSellOnNonPublic(feat* feature); - void instantBullShark(float* arg); + void instantBullShark(feat* feature); void bullSharkDrop(float* arg); void ammoDrop(float* arg); void miniGunDrop(float* arg); @@ -160,7 +160,9 @@ class hack : public trainer void heliTaxi(float* arg); void backupHeli(float* arg); void airstrike(float* arg); + void offRadar(feat* feature); void disableThePhone(feat* feature); + void antiCEOKick(feat* feature); void antiKickToSP(feat* feature); void antiApartmentTp(feat* feature); void antiRemoteBounty(feat* feature); @@ -190,6 +192,7 @@ class hack : public trainer void dStatPushBack(unsigned int hash, int value); void callMerryweather(std::ptrdiff_t index); int getPlayerId(); + int getNetworkTime(); void setCasinoHeistCut(int playerIndex, int cut); int getCasinoHeistCut(int playerIndex); void createAmbientPickup(unsigned int pickupHash, float posX, float posY, float posZ, int value, unsigned int modelHash); diff --git a/subVersion/main.cpp b/subVersion/main.cpp index 087484b..2f1ca4a 100644 --- a/subVersion/main.cpp +++ b/subVersion/main.cpp @@ -292,8 +292,12 @@ int __stdcall WinMain( HINSTANCE hInstance, g_iFeature[FEATURE_T_BUNKER_RESEARCH] = g_pSettings->addFeature(-1, unlock, L"解锁所有地堡研究(临时)", feat_toggle, "BunkerResearch"); int merryweather = g_pSettings->addFeature(-1, olService, L"梅利威瑟 >>", feat_parent); int dropWeapon = g_pSettings->addFeature(-1, olService, L"获得武器 >>", feat_parent); - for (size_t i = 0; i < Weapons.size(); i++) - addFeature(-1, dropWeapon, Weapons[i].Name, feat_btn, &hack::selfDropWeapon, i); + for (size_t i = 0; i < weaponPreview.size(); i++) + { + int temp = g_pSettings->addFeature(-1, dropWeapon, weaponPreview[i].first, feat_parent); + for (size_t j = 0; j < weaponPreview[i].second.size(); j++) + addFeature(-1, temp, weaponPreview[i].second[j].Name, feat_btn, &hack::selfDropWeapon, i * 1000 + j); + } addFeature(-1, merryweather, L"牛鲨睾酮空投", feat_btn, &hack::bullSharkDrop, -1.f); addFeature(-1, merryweather, L"弹药空投", feat_btn, &hack::ammoDrop, -1.f); addFeature(-1, merryweather, L"无畏战士空投", feat_btn, &hack::miniGunDrop, -1.f); @@ -301,11 +305,13 @@ int __stdcall WinMain( HINSTANCE hInstance, addFeature(-1, merryweather, L"直升机接送", feat_btn, &hack::heliTaxi, -1.f); addFeature(-1, merryweather, L"支援直升机", feat_btn, &hack::backupHeli, -1.f); addFeature(-1, merryweather, L"空袭", feat_btn, &hack::airstrike, -1.f); - addFeature(-1, olService, L"使用牛鲨睾酮", feat_btn, &hack::instantBullShark, -1.f); + g_iFeature[FEATURE_G_BULL_SHARK] = g_pSettings->addFeature(-1, olService, L"牛鲨睾酮", feat_toggle, "bullShark"); + g_iFeature[FEATURE_G_OFF_RADAR] = g_pSettings->addFeature(-1, olService, L"雷达隐匿", feat_toggle, "offRadar"); g_iFeature[FEATURE_G_DISABLE_THE_PHONE] = g_pSettings->addFeature(-1, olService, L"屏蔽来电", feat_toggle, "disableThePhone"); g_iFeature[FEATURE_G_PASSIVE_CD] = g_pSettings->addFeature(-1, olService, L"杀人后被动无冷却", feat_toggle, "removePassiveModeCD"); g_iFeature[FEATURE_G_SEEL_NON_PUB] = g_pSettings->addFeature(-1, olService, L"非公开战局运货", feat_toggle, "allowSellOnNonPublic"); int protection = g_pSettings->addFeature(4, -1, L"防护 >>", feat_parent); + g_iFeature[FEATURE_G_ANTI_CEO_KICK] = g_pSettings->addFeature(-1, protection, L"CEO踢出防护", feat_toggle, "antiCEOKick"); g_iFeature[FEATURE_G_ANTI_KICK] = g_pSettings->addFeature(-1, protection, L"踢出防护", feat_toggle, "antiKickToSP"); g_iFeature[FEATURE_G_ANTI_TP] = g_pSettings->addFeature(-1, protection, L"公寓传送防护", feat_toggle, "antiApartmentTp"); g_iFeature[FEATURE_G_ANTI_BOUNTY] = g_pSettings->addFeature(-1, protection, L"悬赏防护", feat_toggle, "antiRemoteBounty"); @@ -588,12 +594,15 @@ DWORD __stdcall threadHack(LPVOID lpParam) g_pHack->disableThePhone(g_pSettings->getFeature(g_iFeature[FEATURE_G_DISABLE_THE_PHONE])); g_pHack->removePassiveModeCooldown(g_pSettings->getFeature(g_iFeature[FEATURE_G_PASSIVE_CD])); g_pHack->allowSellOnNonPublic(g_pSettings->getFeature(g_iFeature[FEATURE_G_SEEL_NON_PUB])); + g_pHack->antiCEOKick(g_pSettings->getFeature(g_iFeature[FEATURE_G_ANTI_CEO_KICK])); g_pHack->antiKickToSP(g_pSettings->getFeature(g_iFeature[FEATURE_G_ANTI_KICK])); g_pHack->antiApartmentTp(g_pSettings->getFeature(g_iFeature[FEATURE_G_ANTI_TP])); g_pHack->antiRemoteBounty(g_pSettings->getFeature(g_iFeature[FEATURE_G_ANTI_BOUNTY])); g_pHack->antiWeatherControl(g_pSettings->getFeature(g_iFeature[FEATURE_G_ANTI_WEATHER])); g_pHack->antiRemoteVehicleKick(g_pSettings->getFeature(g_iFeature[FEATURE_G_ANTI_VEH_KICK])); g_pHack->antiRemoteForceMission(g_pSettings->getFeature(g_iFeature[FEATURE_G_ANTI_SEND_MISSION])); + g_pHack->offRadar(g_pSettings->getFeature(g_iFeature[FEATURE_G_OFF_RADAR])); + g_pHack->instantBullShark(g_pSettings->getFeature(g_iFeature[FEATURE_G_BULL_SHARK])); g_pHack->consumeStatQueue(); } diff --git a/subVersion/ptrHandler.h b/subVersion/ptrHandler.h index 19264c7..962a837 100644 --- a/subVersion/ptrHandler.h +++ b/subVersion/ptrHandler.h @@ -5,13 +5,29 @@ template class prtHandler { public: - prtHandler(DWORD_PTR ptr); + prtHandler(DWORD_PTR ptr); T value(); - template - void operator=(const T value) { + T operator=(const T value) { g_pMemMan->writeMem(m_ptr, value); + return value; + } + + constexpr bool operator==(const T other) noexcept { + return other == this->value(); + } + + constexpr bool operator!=(const T other) noexcept { + return other != this->value(); + } + + constexpr bool operator>(const T other) noexcept { + return other > this->value(); + } + + constexpr bool operator<(const T other) noexcept { + return other < this->value(); } private: diff --git a/subVersion/scriptGlobal.h b/subVersion/scriptGlobal.h index 195de93..6ac475c 100644 --- a/subVersion/scriptGlobal.h +++ b/subVersion/scriptGlobal.h @@ -11,7 +11,7 @@ class scriptGlobal scriptGlobal at(std::ptrdiff_t index, std::size_t size); template - auto as() + prtHandler as() { return prtHandler(get()); } diff --git a/subVersion/settings.ini b/subVersion/settings.ini index 3280d64..e8758a8 100644 --- a/subVersion/settings.ini +++ b/subVersion/settings.ini @@ -103,7 +103,7 @@ vehSuspensionForce=0 vehDownShift=0 superPunch=0 npcIgnore=0 -bulletEdit=0 +bulletEdit=1 undeadOffradar=0 vehSuspensionHeigh=0 RP=0 diff --git a/subVersion/stdafx.h b/subVersion/stdafx.h index b117515..09d6633 100644 --- a/subVersion/stdafx.h +++ b/subVersion/stdafx.h @@ -276,6 +276,9 @@ #define FEATURE_G_ANTI_WEATHER 0x4D #define FEATURE_G_ANTI_VEH_KICK 0x4E #define FEATURE_G_ANTI_SEND_MISSION 0x4F +#define FEATURE_G_OFF_RADAR 0x50 +#define FEATURE_G_BULL_SHARK 0x51 +#define FEATURE_G_ANTI_CEO_KICK 0x52 static std::wstring StringToWString(const std::string& str) { int num = MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, NULL, 0); diff --git a/subVersion/subVersion.vcxproj b/subVersion/subVersion.vcxproj index 34192c9..905a5af 100644 --- a/subVersion/subVersion.vcxproj +++ b/subVersion/subVersion.vcxproj @@ -155,6 +155,9 @@ _DEBUG;_WINDOWS;%(PreprocessorDefinitions) false Use + true + + Windows @@ -171,6 +174,9 @@ NDEBUG;_WINDOWS;%(PreprocessorDefinitions) false Use + true + + Windows