Advertisement
allen343434

Untitled

Mar 29th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.68 KB | None | 0 0
  1. if (opt.teleport.telekill)
  2. {
  3. if (GetAsyncKeyState(VK_END))
  4. opt.teleport.telekill_lock = 0;
  5.  
  6. if (opt.teleport.telekill_fov)
  7. opt.teleport.telekill_aimfov = (opt.teleport.telekill_fov * 5);
  8.  
  9. UINT BestTarget = -1;
  10. DOUBLE fClosestPos = 99999;
  11.  
  12. float radiusx = opt.teleport.telekill_aimfov * (ScreenCenterX / 100);
  13. float radiusy = opt.teleport.telekill_aimfov * (ScreenCenterY / 100);
  14.  
  15. if (GetAsyncKeyState('Y'))
  16. {
  17. int point = (radiusx + radiusy) / 2;
  18. Tools.DrawCircle(pDevice, ScreenCenterX - opt.teleport.telekill_aimfov, ScreenCenterY - opt.teleport.telekill_aimfov, point, 60, Menu.GreenOpacity);
  19. }
  20.  
  21. D3DXVECTOR3 MyPos(pBase->GetLocation().x, pBase->GetLocation().y, pBase->GetLocation().z);
  22. D3DXVECTOR3 EnemyPos(pEntity->GetLocation().x - 1, pEntity->GetLocation().y, pEntity->GetLocation().z - 1);
  23.  
  24. if (opt.teleport.telekill_lock)
  25. {
  26. pBase->SetLocation(EnemyPos);
  27. opt.teleport.telekill_lockkey = 1;
  28. }
  29.  
  30. if (!opt.teleport.telekill_lock)
  31. opt.teleport.telekill_lockkey = 0;
  32.  
  33. if (isMale)
  34. TeleDetermine = MLikod;
  35. if (isFemale)
  36. TeleDetermine = FLikod;
  37.  
  38. float CrosshairDistance = Tools.GetDistance(TeleDetermine.x, TeleDetermine.y, ScreenCenterX, ScreenCenterY);
  39.  
  40. if (TeleDetermine.x >= ScreenCenterX - radiusx && TeleDetermine.x <= ScreenCenterX + radiusx && TeleDetermine.y >= ScreenCenterY - radiusy && TeleDetermine.y <= ScreenCenterY + radiusy)
  41. {
  42. if (CrosshairDistance < fClosestPos)
  43. {
  44. fClosestPos = CrosshairDistance;
  45.  
  46. if (isMale)
  47. TeleTarget = MLikod;
  48. if (isFemale)
  49. TeleTarget = FLikod;
  50.  
  51. double DistX = TeleTarget.x - ScreenCenterX;
  52. double DistY = TeleTarget.y - ScreenCenterY;
  53.  
  54. Tools.DrawCircle(pDevice, TeleTarget.x, TeleTarget.y, 5, 60, Menu.ORANGE);
  55. Tools.DrawCircle(pDevice, TeleTarget.x, TeleTarget.y, 4, 60, Menu.ORANGE);
  56. Tools.DrawCircle(pDevice, TeleTarget.x, TeleTarget.y, 3, 60, Menu.ORANGE);
  57. Tools.DrawCircle(pDevice, TeleTarget.x, TeleTarget.y, 2, 60, Menu.ORANGE);
  58.  
  59. DistX /= 1;
  60. DistY /= 1;
  61.  
  62. if (opt.teleport.telekill_key == 1 && (GetAsyncKeyState('T') & 0x8000))
  63. {
  64. if (timeGetTime() >= (frametime + CLOCKS_PER_SEC / 100))
  65. {
  66. mouse_event(MOUSEEVENTF_MOVE, (int)DistX, (int)DistY, 0, NULL);
  67.  
  68. if (opt.teleport.telekill_passive)
  69. pEntity->SetLocation(MyPos);
  70. else
  71. pBase->SetLocation(EnemyPos);
  72.  
  73. opt.teleport.telekill_lock = 1;
  74.  
  75. frametime = timeGetTime();
  76. }
  77. }
  78. }
  79. }
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement