diff --git a/apex_dma/Game.cpp b/apex_dma/Game.cpp index 2808d28..3742226 100644 --- a/apex_dma/Game.cpp +++ b/apex_dma/Game.cpp @@ -39,6 +39,25 @@ void get_class_name(uint64_t entity_ptr, char* out_str) apex_mem.ReadArray(client_class.pNetworkName, out_str, 32); } +void charge_rifle_hack(uint64_t entity_ptr) +{ + extern uint64_t g_Base; + extern bool shooting; + WeaponXEntity curweap = WeaponXEntity(); + curweap.update(entity_ptr); + float BulletSpeed = curweap.get_projectile_speed(); + int ammo = curweap.get_ammo(); + + if (ammo != 0 && BulletSpeed == 1 && shooting) + { + apex_mem.Write(g_Base + OFFSET_TIMESCALE + 0x68, std::numeric_limits::min()); + } + else + { + apex_mem.Write(g_Base + OFFSET_TIMESCALE + 0x68, 1.f); + } +} + int Entity::getTeamId() { return *(int*)(buffer + OFFSET_TEAM); @@ -366,6 +385,8 @@ void WeaponXEntity::update(uint64_t LocalPlayer) apex_mem.Read(wep_entity + OFFSET_BULLET_SCALE, projectile_scale); zoom_fov = 0; apex_mem.Read(wep_entity + OFFSET_ZOOM_FOV, zoom_fov); + ammo = 0; + apex_mem.Read(wep_entity + OFFSET_AMMO, ammo); } float WeaponXEntity::get_projectile_speed() @@ -382,3 +403,8 @@ float WeaponXEntity::get_zoom_fov() { return zoom_fov; } + +int WeaponXEntity::get_ammo() +{ + return ammo; +} diff --git a/apex_dma/Game.h b/apex_dma/Game.h index 3a7047a..a39c0cc 100644 --- a/apex_dma/Game.h +++ b/apex_dma/Game.h @@ -68,11 +68,13 @@ public: float get_projectile_speed(); float get_projectile_gravity(); float get_zoom_fov(); + int get_ammo(); private: float projectile_scale; float projectile_speed; float zoom_fov; + int ammo; }; struct ClientClass { @@ -90,4 +92,5 @@ Item getItem(uintptr_t ptr); bool WorldToScreen(Vector from, float* m_vMatrix, int targetWidth, int targetHeight, Vector& to); float CalculateFov(Entity& from, Entity& target); QAngle CalculateBestBoneAim(Entity& from, uintptr_t target, float max_fov); -void get_class_name(uint64_t entity_ptr, char* out_str); \ No newline at end of file +void get_class_name(uint64_t entity_ptr, char* out_str); +void charge_rifle_hack(uint64_t entity_ptr); \ No newline at end of file diff --git a/apex_dma/apex_dma.cpp b/apex_dma/apex_dma.cpp index bf5aae3..b147a65 100644 --- a/apex_dma/apex_dma.cpp +++ b/apex_dma/apex_dma.cpp @@ -31,6 +31,8 @@ bool aiming = false; extern float smooth; extern int bone; bool thirdperson = false; +bool chargerifle = false; +bool shooting = false; bool actions_t = false; bool esp_t = false; @@ -138,6 +140,7 @@ void DoActions() { std::this_thread::sleep_for(std::chrono::milliseconds(1)); bool tmp_thirdperson = false; + bool tmp_chargerifle = false; uint32_t counter = 0; while (g_Base!=0 && c_Base!=0) @@ -272,6 +275,20 @@ void DoActions() aimentity = tmp_aimentity; else aimentity = lastaimentity; + + if(chargerifle) + { + charge_rifle_hack(LocalPlayer); + tmp_chargerifle = true; + } + else + { + if(tmp_chargerifle) + { + apex_mem.Write(g_Base + OFFSET_TIMESCALE + 0x68, 1.f); + tmp_chargerifle = false; + } + } } } actions_t = false; @@ -564,6 +581,11 @@ static void set_vars(uint64_t add_addr) client_mem.Read(add_addr + sizeof(uint64_t)*16, spectators_addr); uint64_t allied_spectators_addr = 0; client_mem.Read(add_addr + sizeof(uint64_t)*17, allied_spectators_addr); + uint64_t chargerifle_addr = 0; + client_mem.Read(add_addr + sizeof(uint64_t)*18, chargerifle_addr); + uint64_t shooting_addr = 0; + client_mem.Read(add_addr + sizeof(uint64_t)*19, shooting_addr); + uint32_t check = 0; client_mem.Read(check_addr, check); @@ -602,6 +624,8 @@ static void set_vars(uint64_t add_addr) client_mem.Read(max_fov_addr, max_fov); client_mem.Read(bone_addr, bone); client_mem.Read(thirdperson_addr, thirdperson); + client_mem.Read(shooting_addr, shooting); + client_mem.Read(chargerifle_addr, chargerifle); if(esp && next) { diff --git a/apex_guest/Client/Client/main.cpp b/apex_guest/Client/Client/main.cpp index 01bcc37..f54d1f1 100644 --- a/apex_guest/Client/Client/main.cpp +++ b/apex_guest/Client/Client/main.cpp @@ -20,6 +20,7 @@ typedef struct player uint32_t check = 0xABCD; int aim_key = VK_RBUTTON; +int shoot_key = VK_LBUTTON; bool use_nvidia = true; bool active = true; bool ready = false; @@ -38,11 +39,13 @@ int bone = 2; bool thirdperson = false; int spectators = 0; //write int allied_spectators = 0; //write +bool chargerifle = false; +bool shooting = false; //read bool valid = false; //write bool next = false; //read write -uint64_t add[18]; +uint64_t add[20]; bool k_f5 = 0; bool k_f6 = 0; @@ -139,6 +142,9 @@ int main(int argc, char** argv) add[15] = (uintptr_t)&thirdperson; add[16] = (uintptr_t)&spectators; add[17] = (uintptr_t)&allied_spectators; + add[18] = (uintptr_t)&chargerifle; + add[19] = (uintptr_t)&shooting; + printf(XorStr("add offset: 0x%I64x\n"), (uint64_t)&add[0] - (uint64_t)GetModuleHandle(NULL)); @@ -229,6 +235,11 @@ int main(int argc, char** argv) aiming = true; else aiming = false; + + if (IsKeyDown(shoot_key)) + shooting = true; + else + shooting = false; } ready = false; ov1.Clear(); diff --git a/apex_guest/Client/Client/overlay.cpp b/apex_guest/Client/Client/overlay.cpp index 99895c1..a21f42f 100644 --- a/apex_guest/Client/Client/overlay.cpp +++ b/apex_guest/Client/Client/overlay.cpp @@ -14,6 +14,7 @@ extern int bone; extern bool thirdperson; extern int spectators; extern int allied_spectators; +extern bool chargerifle; int width; int height; @@ -137,6 +138,7 @@ void Overlay::RenderMenu() ImGui::Checkbox(XorStr("Glow items"), &item_glow); ImGui::Checkbox(XorStr("Glow players"), &player_glow); ImGui::Checkbox(XorStr("Thirdperson"), &thirdperson); + ImGui::Checkbox(XorStr("Charge rifle hack"), &chargerifle); ImGui::EndTabItem(); } if (ImGui::BeginTabItem(XorStr("Config")))