Advertisement
Guest User

Untitled

a guest
Jun 24th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. void CAimbot::autozeus(SDK::CUserCmd *cmd) {
  2. for (int i = 1; i < 65; i++)
  3. {
  4. auto entity = Interfaces::ClientEntityList->GetClientEntity(i);
  5. auto local_player = Interfaces::ClientEntityList->GetClientEntity(Interfaces::Engine->GetLocalPlayer());
  6.  
  7. if (!entity)
  8. continue;
  9.  
  10. if (!local_player)
  11. continue;
  12.  
  13.  
  14. bool is_local_player = entity == local_player;
  15. bool is_teammate = local_player->GetTeam() == entity->GetTeam() && !is_local_player;
  16.  
  17. if (is_teammate)
  18. continue;
  19.  
  20. if (is_local_player)
  21. continue;
  22.  
  23. if (entity->GetHealth() <= 0)
  24. continue;
  25.  
  26. if (local_player->GetHealth() <= 0)
  27. continue;
  28.  
  29. // if (local_player->GetTeam() == is_teammate)
  30. // continue;
  31.  
  32.  
  33. auto weapon = reinterpret_cast<SDK::CBaseWeapon*>(Interfaces::ClientEntityList->GetClientEntity(local_player->GetActiveWeaponIndex()));
  34.  
  35. if (!weapon)
  36. continue;
  37.  
  38. if (weapon->GetItemDefenitionIndex() == SDK::WEAPON_TASER) //
  39. {
  40. if (can_shoot(cmd))
  41. {
  42. 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
  43.  
  44. if (bone != 1)
  45. {
  46. Vector fucknigga = get_hitbox_pos(entity, bone);
  47. Vector local_position = local_player->GetVecOrigin() + local_player->GetViewOffset();
  48.  
  49. if (fucknigga != Vector(0, 0, 0))
  50. {
  51. SDK::trace_t trace;
  52.  
  53. autowall->UTIL_TraceLine1(local_position, fucknigga, MASK_SOLID, local_player, 0, &trace);
  54.  
  55. SDK::player_info_t info;
  56.  
  57. if (!(Interfaces::Engine->GetPlayerInfo(trace.m_pEnt->GetIndex(), &info)))
  58. continue;
  59.  
  60. if (fucknigga != Vector(0, 0, 0))
  61. {
  62. cmd->viewangles = MATH::NormalizeAngle(UTILS::CalcAngle(local_position, fucknigga));
  63. GLOBAL::should_send_packet = true;
  64. cmd->buttons |= IN_ATTACK;
  65. }
  66. }
  67. }
  68. }
  69. continue;
  70. }
  71.  
  72. }
  73.  
  74.  
  75. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement