Advertisement
Guest User

Untitled

a guest
Jun 21st, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.94 KB | None | 0 0
  1. hooks.cpp
  2. if (SETTINGS::settings.autozeus_bool) aimbot->autozeus(cmd);
  3.  
  4. so it looks like
  5. if (SETTINGS::settings.autozeus_bool) aimbot->autozeus(cmd);
  6. if (SETTINGS::settings.bhop_bool) movement->bunnyhop(cmd);
  7. if (SETTINGS::settings.duck_bool) movement->duckinair(cmd);
  8.  
  9. aimbot.cpp
  10.  
  11.  
  12. void CAimbot::autozeus(SDK::CUserCmd *cmd) {
  13. for (int i = 1; i < 65; i++)
  14. {
  15. auto entity = INTERFACES::ClientEntityList->GetClientEntity(i);
  16. auto local_player = INTERFACES::ClientEntityList->GetClientEntity(INTERFACES::Engine->GetLocalPlayer());
  17.  
  18. if (!entity)
  19. continue;
  20.  
  21. if (!local_player)
  22. continue;
  23.  
  24. bool is_local_player = entity == local_player;
  25. bool is_teammate = local_player->GetTeam() == entity->GetTeam() && !is_local_player;
  26.  
  27. if (is_local_player)
  28. continue;
  29.  
  30. if (!entity->IsAlive())
  31. continue;
  32.  
  33. if (is_teammate)
  34. continue;
  35.  
  36. if (!local_player->IsAlive())
  37. continue;
  38.  
  39. auto weapon = reinterpret_cast<SDK::CBaseWeapon*>(INTERFACES::ClientEntityList->GetClientEntity(local_player->GetActiveWeaponIndex()));
  40.  
  41. if (!weapon)
  42. continue;
  43.  
  44. if (weapon->GetItemDefenitionIndex() == SDK::WEAPON_TASER) //if we have a taser men!1!!1
  45. {
  46. if (can_shoot(cmd))
  47. {
  48. int bone = zeus_hitbox(entity); //you can change this but keep in mind this has range stuff. it only has pelvis as a bone but why do other stuff really it will make it inaccurate shooting at arms and legs if they arent resolved right
  49.  
  50. if (bone != 1)
  51. {
  52. Vector fucknigga = get_hitbox_pos(entity, bone);
  53. Vector local_position = local_player->GetVecOrigin() + local_player->GetViewOffset();
  54.  
  55. if (fucknigga != Vector(0, 0, 0))
  56. {
  57. SDK::trace_t trace;
  58.  
  59. autowall->UTIL_TraceLine(local_position, fucknigga, MASK_SOLID, local_player, 0, &trace);
  60.  
  61. SDK::player_info_t info;
  62.  
  63. if (!(INTERFACES::Engine->GetPlayerInfo(trace.m_pEnt->GetIndex(), &info)))
  64. continue;
  65.  
  66. if (fucknigga != Vector(0, 0, 0))
  67. {
  68. cmd->viewangles = MATH::NormalizeAngle(UTILS::CalcAngle(local_position, fucknigga));
  69. GLOBAL::should_send_packet = true;
  70. cmd->buttons |= IN_ATTACK;
  71. }
  72. }
  73. }
  74. }
  75. continue;
  76. }
  77.  
  78. }
  79. }
  80.  
  81. int CAimbot::zeus_hitbox(SDK::CBaseEntity* entity)
  82. {
  83. auto local_player = INTERFACES::ClientEntityList->GetClientEntity(INTERFACES::Engine->GetLocalPlayer());
  84.  
  85. if (!local_player)
  86. return -1;
  87.  
  88. Vector local_position = local_player->GetVecOrigin() + local_player->GetViewOffset();
  89.  
  90. float closest = 180.f;
  91.  
  92. bestHitbox = -1;
  93.  
  94. Vector point = get_hitbox_pos(entity, SDK::HitboxList::HITBOX_PELVIS);
  95.  
  96. if (point != Vector(0, 0, 0))
  97. {
  98. float distance = fabs((point - local_position).Length());
  99.  
  100. if (distance <= closest)
  101. {
  102. bestHitbox = SDK::HitboxList::HITBOX_PELVIS;
  103. closest = distance;
  104. }
  105. }
  106.  
  107. return bestHitbox;
  108. }
  109.  
  110. aimbot.h
  111.  
  112. void autozeus(SDK::CUserCmd *cmd);
  113. int zeus_hitbox(SDK::CBaseEntity *entity);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement