Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2020
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. if (g_Menu.Config.doubletap)
  2. {
  3. static int lastDoubleTapInTickcount = 0;
  4.  
  5. if (GetAsyncKeyState(g_Menu.Config.doubletapkey) )
  6. {
  7. int doubletapTickcountDelta = g_pGlobalVars->tickcount - lastDoubleTapInTickcount;
  8.  
  9. if (doubletapTickcountDelta >= TIME_TO_TICKS(0.2f) && g::pCmd->buttons & IN_ATTACK) {
  10.  
  11. lastDoubleTapInTickcount = g_pGlobalVars->tickcount;
  12. g::bSendPacket = true;
  13. g::m_nTickbaseShift = 14;
  14. }
  15. }
  16. }
  17. }
  18.  
  19.  
  20. void AntiAim::doubletap(CUserCmd*cmd)
  21. {
  22. auto local_player = g_pEntityList->GetClientEntity(g_pEngine->GetLocalPlayer());
  23.  
  24. if (GetAsyncKeyState('I'))
  25. {
  26. static bool counter = false;
  27. static int counters = 0;
  28. //local_player->CL_SendMove();
  29. if (counters == 2)
  30. {
  31. counters = 0;
  32. counter = !counter;
  33.  
  34. }
  35. counters++;
  36. if (counter)
  37. {
  38. cmd->buttons &= ~IN_ATTACK;
  39. g::m_nTickbaseShift = 100;
  40. }
  41. else
  42. {
  43. if (!g_pClientState->chokedcommands)
  44. {
  45. cmd->buttons |= IN_ATTACK;
  46. g::m_nTickbaseShift = 0;
  47. }
  48. }
  49.  
  50. }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement