Added infinite charge rifle hack

pull/27/head
MisterY52 3 years ago
parent 05b40dd6e9
commit 3eb23ff31d

@ -39,6 +39,25 @@ void get_class_name(uint64_t entity_ptr, char* out_str)
apex_mem.ReadArray<char>(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<float>(g_Base + OFFSET_TIMESCALE + 0x68, std::numeric_limits<float>::min());
}
else
{
apex_mem.Write<float>(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<float>(wep_entity + OFFSET_BULLET_SCALE, projectile_scale);
zoom_fov = 0;
apex_mem.Read<float>(wep_entity + OFFSET_ZOOM_FOV, zoom_fov);
ammo = 0;
apex_mem.Read<int>(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;
}

@ -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 {
@ -91,3 +93,4 @@ bool WorldToScreen(Vector from, float* m_vMatrix, int targetWidth, int targetHei
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);
void charge_rifle_hack(uint64_t entity_ptr);

@ -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<float>(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<uint64_t>(add_addr + sizeof(uint64_t)*16, spectators_addr);
uint64_t allied_spectators_addr = 0;
client_mem.Read<uint64_t>(add_addr + sizeof(uint64_t)*17, allied_spectators_addr);
uint64_t chargerifle_addr = 0;
client_mem.Read<uint64_t>(add_addr + sizeof(uint64_t)*18, chargerifle_addr);
uint64_t shooting_addr = 0;
client_mem.Read<uint64_t>(add_addr + sizeof(uint64_t)*19, shooting_addr);
uint32_t check = 0;
client_mem.Read<uint32_t>(check_addr, check);
@ -602,6 +624,8 @@ static void set_vars(uint64_t add_addr)
client_mem.Read<float>(max_fov_addr, max_fov);
client_mem.Read<int>(bone_addr, bone);
client_mem.Read<bool>(thirdperson_addr, thirdperson);
client_mem.Read<bool>(shooting_addr, shooting);
client_mem.Read<bool>(chargerifle_addr, chargerifle);
if(esp && next)
{

@ -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();

@ -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")))

Loading…
Cancel
Save