Advertisement
Guest User

Untitled

a guest
Mar 22nd, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.13 KB | None | 0 0
  1. 1. Go to LegitBot.cpp and and paste this.
  2.  
  3. void legitbot::LegitAA(CInput::CUserCmd* pCmd, bool& bSendPacket)
  4. {
  5. C_BaseEntity* local = g_EntityList->GetClientEntity(g_Engine->GetLocalPlayer());
  6.  
  7. if ((pCmd->buttons & IN_USE) || local->GetMoveType() == MOVETYPE_LADDER || pCmd->buttons & IN_ATTACK || pCmd->buttons & IN_ATTACK2)
  8. return;
  9. CBaseCombatWeapon* pWeapon = (CBaseCombatWeapon*)g_EntityList->GetClientEntityFromHandle(local->GetActiveWeaponHandle());
  10.  
  11. if (pWeapon)
  12. {
  13. CSWeaponInfo* pWeaponInfo = pWeapon->GetCSWpnData();
  14. // Knives or grenades
  15. CCSGrenade* csGrenade = (CCSGrenade*)pWeapon;
  16.  
  17. if (MiscFunctions::IsGrenade(pWeapon))
  18. {
  19. if (csGrenade->GetThrowTime() > 0.f)
  20. return;
  21. }
  22. }
  23. //for the memes
  24. Vector oldAngle = pCmd->viewangles;
  25. float oldForward = pCmd->forwardmove;
  26. float oldSideMove = pCmd->sidemove;
  27. if (g_Options.Legitbot.LegitChoiceList>0)
  28. {
  29. switch (g_Options.Legitbot.LegitChoiceList)
  30. {
  31. case 1:
  32. {//you dont need brackets but for some shit you do like statics //wrapzii C++ class 101
  33. static bool kFlip = true;
  34. static int ChokedPackets = -1;
  35. static bool yFlip = true;
  36. if (1 > ChokedPackets)
  37. {
  38. bSendPacket = true;
  39. ChokedPackets++;
  40. }
  41. else
  42. {
  43. bSendPacket = false;
  44. //pCmd->viewangles.y += yFlip ? 90.f : -90.f;
  45. pCmd->viewangles.y += 180.f;
  46. ChokedPackets = -1;
  47. }
  48. }
  49. break;
  50. case 2:
  51. {
  52. static bool kFlip = true;
  53. static int ChokedPackets = -1;
  54. static bool yFlip = true;
  55. if (1 > ChokedPackets)
  56. {
  57. bSendPacket = true;
  58. ChokedPackets++;
  59. }
  60. else
  61. {
  62. bSendPacket = false;
  63. //pCmd->viewangles.y += yFlip ? 90.f : -90.f;
  64. pCmd->viewangles.y += 90.f;//to the right im pretty sure
  65. ChokedPackets = -1;
  66. }
  67. }
  68.  
  69. break;
  70. case 3:
  71.  
  72. //put my p ass vel check one
  73. //Sideways-switch
  74. {
  75. static int ChokedPackets = -1;//we choking 2 cuz 1 is too main stream
  76. if (1 > ChokedPackets) {
  77. bSendPacket = false;
  78. static bool dir = false;
  79. static bool dir2 = false;
  80. int i = 0; i < g_EntityList->GetHighestEntityIndex(); ++i;
  81. C_BaseEntity *entity = (C_BaseEntity*)g_EntityList->GetClientEntity(i);
  82. //if (pCmd->forwardmove > 1 || (IsVisible(pLocal, pEntity, 0) && pEntity->GetTeamNum() != pLocal->GetTeamNum()))// was trying to make a vis check to make it -180 if their visible //didnt seem to work
  83. //dir2 = true;
  84. //else {
  85. dir2 = false;
  86. if (pCmd->sidemove > 1) dir = true;
  87. else if (pCmd->sidemove < -1) dir = false;
  88. pCmd->viewangles.y = (dir) ? (pCmd->viewangles.y - 180) - 270.f : (pCmd->viewangles.y - 180) - 90.f;
  89. //}
  90. //if (dir2 = true)
  91. //pCmd->viewangles.y = pCmd->viewangles.y - 180;
  92. ChokedPackets++;
  93. }
  94. else
  95. {
  96. bSendPacket = true;
  97. ChokedPackets = -1;
  98.  
  99. }
  100. }
  101. break;
  102. }
  103.  
  104. }
  105. else
  106. pCmd->viewangles.y += 0;
  107. }
  108.  
  109.  
  110. 2. Ctrl+F and search for OnCreateMove and paste it.
  111.  
  112. if (local->GetLifeState() == LIFE_ALIVE)
  113. {
  114. LegitAA(pCmd, bSendPacket);
  115. }
  116.  
  117. if (!g_Options.Legitbot.MainSwitch) // if you have this, delete this paste. i cant remember this is by me or not.
  118. return;
  119.  
  120. 3. Go to legitbot.h and under public edit OnCreateMove if necessary.
  121.  
  122. void OnCreateMove(CInput::CUserCmd *pCmd, bool& bSendPacket, C_BaseEntity* local);
  123.  
  124. 3.1 add this under private. (legitbot.h)
  125. void legitbot::LegitAA(CInput::CUserCmd *pCmd, bool& bSendPacket);
  126. 3.2 add this if you don't have it. it is for better nade check in future. (legitbot.h)
  127. void weapon_settings(CBaseCombatWeapon* weapon);
  128.  
  129. 4. go to Variables.h and CTRL+f for autopistol. below this add these lines.
  130.  
  131. int LegitChoiceList;
  132. bool LegitAA;
  133. 5. go to tabs.h n look for RenderLegit (or whereever u want it) and add this lines. i added under mainswitch aimbot
  134.  
  135. ImGui::Checkbox(("LegitAA"), &g_Options.Legitbot.LegitAA);
  136. ImGui::Combo(("Legit AA Choice"), &g_Options.Legitbot.LegitChoiceList, LegitChoices, _ARRAYSIZE(LegitChoices));
  137.  
  138. 6. go to dropboxes.h and add this
  139.  
  140. const char* LegitChoices[] =
  141. {
  142. "None",
  143. "Backwards",
  144. "Sideaways",
  145. "AdaptiveSide"
  146. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement