Advertisement
Guest User

Kamay aimb0t

a guest
Aug 29th, 2012
598
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 48.77 KB | None | 0 0
  1. #include "Aimbot.h"
  2.  
  3. cAimbot g_Aimbot;
  4.  
  5. void cAimbot::Reset()
  6. {
  7. nTarget = -1;
  8. m_vecPosition.Init(0.0f,0.0f,0.0f);
  9. }
  10.  
  11. cAimbot::cAimbot()
  12. {
  13. Reset();
  14. }
  15.  
  16. bool bIsDefaultHit( trace_t *pTrace, C_BaseEntity *pEnt )
  17. {
  18. if( !pEnt )
  19. return false;
  20.  
  21. if( pTrace->allsolid || pTrace->startsolid )
  22. return false;
  23.  
  24. if( pTrace->m_pEnt && ( pTrace->m_pEnt->index == pEnt->index ) )
  25. return true;
  26.  
  27. if( pTrace->fraction >= 0.94f )
  28. return true;
  29.  
  30. return false;
  31. }
  32. __forceinline void Trace( Vector vecStart, Vector vecEnd, unsigned int uiMask, ITraceFilter* pFilter, trace_t *trMain )
  33. {
  34. Ray_t ray;
  35.  
  36. ray.Init( vecStart, vecEnd );
  37.  
  38. g_pEnginetrace->TraceRay( ray, uiMask, pFilter, trMain );
  39. }
  40. bool bCheckVisible( Vector &vecAbs ,Vector &vecDest, C_BaseEntity *pEnt )
  41. {
  42. if( !pEnt )
  43. return false;
  44.  
  45. C_BaseEntity *pLocal = g_pEntList->GetClientEntity(g_pEngine->GetLocalPlayer())->GetBaseEntity();
  46.  
  47. if( !pLocal )
  48. return false;
  49.  
  50. trace_t trTrace;
  51.  
  52. Trace( vecAbs, vecDest, 0x46004003, NULL, &trTrace );
  53.  
  54. if( bIsDefaultHit( &trTrace , pEnt ) )
  55. return true;
  56.  
  57. return false;
  58. }
  59.  
  60. void cAimbot::CalculateAngle(Vector &vSource, Vector &vDestination, QAngle &qAngle)
  61. {
  62. Vector vDelta(vSource - vDestination);
  63. float flHyp = sqrt((vDelta.x * vDelta.x) + (vDelta.y * vDelta.y));
  64. qAngle.x = RAD2DEG(atan(vDelta.z / flHyp));
  65. qAngle.y = RAD2DEG(atan(vDelta.y / vDelta.x));
  66. if(vDelta.x >= 0.0f)
  67. qAngle.y += 180.0f;
  68. }
  69.  
  70. bool cAimbot::IsAlive(C_BaseEntity* pEnt)
  71. {
  72. char lifestate = *(PCHAR)((DWORD)pEnt + m_offsets.dw_m_lifestats());
  73. if(!(lifestate == LIFE_ALIVE))
  74. return false;
  75. return true;
  76. }
  77.  
  78. bool cAimbot::HasAmmo(C_BaseEntity *pEnt)
  79. {
  80. C_BaseCombatWeapon* m_pWeapon = gNospread.GetBaseCombatActiveWeapon ( pEnt );
  81. if ( !m_pWeapon )
  82. return true;
  83. int m_iClip1 = *(int*)((DWORD)m_pWeapon + (DWORD)m_offsets.dw_m_iClip1());
  84. if(m_iClip1 == 0)
  85. return false;
  86. return true;
  87. }
  88.  
  89. bool cAimbot::bHasMiscWeapon()
  90. {
  91. C_BaseEntity*pLocalPlayer = (C_BaseEntity*)g_pEntList->GetClientEntity( g_pEngine->GetLocalPlayer() );
  92. CBaseCombatWeapon* pWeapon = gNospread.GetBaseCombatActiveWeapon(pLocalPlayer);
  93. if(!pWeapon)
  94. return false;
  95. int iWeaponID = gNospread.getWeaponID(g_pModelinfo->GetModelName(pWeapon->GetModel()));
  96. bool MiscWpn = ((iWeaponID == 0 || iWeaponID == 25 || iWeaponID == 26 || iWeaponID == 27 || iWeaponID == 28 || iWeaponID == 29) ? true : false);
  97. if(MiscWpn)
  98. return true;
  99. return false;
  100. }
  101.  
  102. Vector cAimbot::GetVelocity(C_BaseEntity* pEnt)
  103. {
  104. return *(Vector*)((DWORD)pEnt + 0x0F0);
  105. }
  106. #define SET_BOUNDS_VALUE( _ARRAY, _INDEX, _X, _Y, _Z ) _ARRAY[_INDEX].x = _X; _ARRAY[_INDEX].y = _Y; _ARRAY[_INDEX].z = _Z; ++_INDEX;
  107. void GetBoxPoints( const Vector vMins, const Vector vMaxs, Vector *pOut, bool bShouldIncludeCenter )
  108. {
  109. /*
  110. 2-----3
  111. /| / |
  112. / | / |
  113. 6-----5 |
  114. | 1--|--4
  115. | / | /
  116. |/ |/
  117. 7-----8
  118. */
  119.  
  120. int cornerIndex = 0;
  121.  
  122. if ( bShouldIncludeCenter )
  123. {
  124. pOut[0] = ( ( vMins + vMaxs ) * .5f );
  125. ++cornerIndex;
  126. }
  127.  
  128. SET_BOUNDS_VALUE( pOut, cornerIndex, vMins.x, vMins.y, vMins.z );//Min
  129. SET_BOUNDS_VALUE( pOut, cornerIndex, vMins.x, vMaxs.y, vMins.z );
  130. SET_BOUNDS_VALUE( pOut, cornerIndex, vMaxs.x, vMaxs.y, vMins.z );
  131. SET_BOUNDS_VALUE( pOut, cornerIndex, vMaxs.x, vMins.y, vMins.z );
  132.  
  133. SET_BOUNDS_VALUE( pOut, cornerIndex, vMaxs.x, vMaxs.y, vMaxs.z );//Max
  134. SET_BOUNDS_VALUE( pOut, cornerIndex, vMins.x, vMaxs.y, vMaxs.z );
  135. SET_BOUNDS_VALUE( pOut, cornerIndex, vMins.x, vMins.y, vMaxs.z );
  136. SET_BOUNDS_VALUE( pOut, cornerIndex, vMaxs.x, vMins.y, vMaxs.z );
  137. }
  138. bool cAimbot::GetHitboxPosition(int nIndex,float SPOT,Vector &m_vPosition,QAngle qAngle)
  139. {
  140. matrix3x4_t pMatrix[MAXSTUDIOBONES];
  141. Vector vMin, vMax;
  142. mstudiohitboxset_t* pHitboxSet;
  143. mstudiobbox_t* pBox;
  144. IClientEntity* pEnemyClient = g_pEntList->GetClientEntity(nIndex);
  145. C_BaseEntity * pEnemy = pEnemyClient->GetBaseEntity();
  146. const model_t* pModel = pEnemyClient->GetModel();
  147. studiohdr_t* pStudioHdr = g_pModelinfo->GetStudiomodel(pModel);
  148. if(pEnemyClient->SetupBones(pMatrix, MAXSTUDIOBONES, BONE_USED_BY_HITBOX, g_pGlobals->interval_per_tick))
  149. {
  150. MatrixAngles( pMatrix[ nIndex ], qAngle, m_vPosition );
  151. pHitboxSet = pStudioHdr->pHitboxSet(*reinterpret_cast<int*>( reinterpret_cast<DWORD>( pEnemyClient ) + 0x4b8 ) );
  152. pBox = pHitboxSet->pHitbox(SPOT);
  153. VectorTransform(pBox->bbmin, pMatrix[pBox->bone], vMin);
  154. VectorTransform(pBox->bbmax, pMatrix[pBox->bone], vMax);
  155. m_vPosition = ( vMin + vMax ) * 0.5;
  156. Vector vScreen;
  157. return true;
  158. }
  159. return false;
  160. }
  161. bool cAimbot::GetHitboxPositiontehrealone ( int nIndex,float SPOT,Vector &m_vPosition,QAngle qAngle,C_BaseEntity* AA,Vector vMin,Vector vMax){
  162. matrix3x4_t pMatrix[MAXSTUDIOBONES];
  163. mstudiohitboxset_t* pHitboxSet;
  164. mstudiobbox_t* pBox;
  165. IClientEntity* pEnemyClient = g_pEntList->GetClientEntity(nIndex);
  166. C_BaseEntity * pEnemy = pEnemyClient->GetBaseEntity();
  167. float flSimulationTime = *reinterpret_cast<float*>( reinterpret_cast<DWORD>( pEnemyClient ) + 0x68 );
  168. const model_t* pModel = pEnemyClient->GetModel();
  169. studiohdr_t* pStudioHdr = g_pModelinfo->GetStudiomodel(pModel);
  170. if(pEnemyClient->SetupBones(pMatrix, MAXSTUDIOBONES, BONE_USED_BY_HITBOX, g_pGlobals->interval_per_tick))
  171. {
  172. MatrixAngles( pMatrix[ nIndex ], qAngle, m_vPosition );
  173. pHitboxSet = pStudioHdr->pHitboxSet(*reinterpret_cast<int*>( reinterpret_cast<DWORD>( AA ) + 0x4b8 ) );
  174. pBox = pHitboxSet->pHitbox(SPOT);
  175. VectorTransform(pBox->bbmin, pMatrix[pBox->bone], vMin);
  176. VectorTransform(pBox->bbmax, pMatrix[pBox->bone], vMax);
  177. QAngle AADETECT;
  178. AADETECT.x = *(float*) ( ( DWORD )AA + ( DWORD )0x1420);
  179. AADETECT.y = *(float*) ( ( DWORD )AA + ( DWORD )0x1424);
  180. AADETECT.z = 0.0f;
  181. if(( AADETECT.x > 89.f) && (AADETECT.x < 91.f))
  182. {
  183. m_vPosition.z = vMax.z;
  184. m_vPosition.y = ( vMin.y + vMax.y ) * 0.5;
  185. m_vPosition.x = ( vMin.x + vMax.x ) * 0.5;
  186. }
  187. else
  188. m_vPosition = ( vMin + vMax ) * 0.5;
  189. return true;
  190. }
  191. return false;
  192. }
  193.  
  194. bool testn00b( int index , int spot, Vector& vecPosition,CBaseEntity * AA){
  195. C_BaseEntity*pBaseEntity = gNeeded.GetEntityByIndex( index );
  196. if(!pBaseEntity ){ return false; }
  197. matrix3x4_t Matrix[MAXSTUDIOBONES];
  198. if( !pBaseEntity->SetupBones( Matrix, MAXSTUDIOBONES, BONE_USED_BY_HITBOX, 0 ) ) { return false; }
  199. studiohdr_t *pStudioHeader = g_pModelinfo->GetStudiomodel( pBaseEntity->GetModel() );
  200. if( !pStudioHeader ) { return false; }
  201. mstudiobbox_t *pBox;
  202. pBox = pStudioHeader->pHitbox( min( (int)spot, pStudioHeader->iHitboxCount( 0 ) ), 0 );
  203. Vector vMax, vMin;
  204. VectorTransform( pBox->bbmin, Matrix[pBox->bone], vMin );
  205. VectorTransform( pBox->bbmax, Matrix[pBox->bone], vMax );
  206. vecPosition = ( vMin + vMax ) / 2;
  207.  
  208. }
  209. /*void EstimateAbsVelocity( IClientEntity* p, Vector& vel )
  210. {
  211. typedef void (__thiscall* EstimateAbsVelocityFn)( IClientEntity* thisptr, Vector& vel );
  212. static EstimateAbsVelocityFn pfnEstimateAbsVelocity = NULL;
  213. if ( !pfnEstimateAbsVelocity )
  214. {
  215. pfnEstimateAbsVelocity = (EstimateAbsVelocityFn) dwFindPattern(
  216. (DWORD)GetModuleHandle("client.dll"), 0x690000,
  217. (PBYTE)"\x83\xEC\x0C\x56\x8B\xF1\xE8\x00\x00\x00\x00\x3B\xF0\x75\x2C\x00", "xxxxxxx????xxxx?");//+16
  218.  
  219. if(!pfnEstimateAbsVelocity)
  220. return;
  221. }
  222. pfnEstimateAbsVelocity( p, vel );
  223. }*/
  224.  
  225. bool cAimbot::AutoWall(Vector &vStart , Vector &vPos ,C_BaseEntity * pEnt)
  226. {
  227. trace_t tr;
  228. Ray_t ray;
  229. Vector vEnd, vEndPos[3];
  230. C_BaseEntity *pLocal = (C_BaseEntity*)g_pEntList->GetClientEntity( g_pEngine->GetLocalPlayer() );
  231. vEnd = vPos;
  232. if(bCheckVisible(vStart,vEnd,pEnt))
  233. return true;
  234. ray.Init( vStart, vEnd );
  235. g_pEnginetrace->TraceRay( ray, MASK_ALL, NULL, &tr );
  236. vEndPos[0] = tr.endpos;
  237. ray.Init( vEnd, vStart );
  238. g_pEnginetrace->TraceRay( ray, MASK_ALL, NULL, &tr );
  239. vEndPos[1] = tr.endpos;
  240. VectorSubtract( vEndPos[0], vEndPos[1], vEndPos[2] );
  241. float flLength = VectorLength( vEndPos[2] );
  242. if(tr.fraction != 0)
  243. if ( flLength < 14)
  244. return true;
  245.  
  246. return false;
  247. }
  248.  
  249. INetChannelInfo* GetNetChannel()
  250. {
  251. if ( !g_pNet )
  252. {
  253. DWORD* pdwEnginePhone = (DWORD*)*(DWORD*) g_pEngine;
  254.  
  255. GetNetChannelFn GetNetChannelFunc = (GetNetChannelFn)pdwEnginePhone[72];
  256. g_pNet = GetNetChannelFunc();
  257. }
  258.  
  259. return g_pNet;
  260. }
  261. void Prediction(C_BaseEntity * pMe,C_BaseEntity * pEnemy,Vector &m_vPosition,Vector &vMyEyesPosition,Vector &vEyePositionEnemey,CUserCmd * c)
  262. {
  263. CBaseCombatWeapon* pWeapon = gNospread.GetBaseCombatActiveWeapon(pMe);
  264. Vector weapVelXM = *(Vector*)((DWORD)pWeapon + 0x0F0);
  265. Vector weapVelYM = *(Vector*)((DWORD)pWeapon + 0x0F4);
  266. Vector weapVelZM = *(Vector*)((DWORD)pWeapon + 0x0F8);
  267. CBaseCombatWeapon* pWeapon2 = gNospread.GetBaseCombatActiveWeapon(pEnemy);
  268. Vector weapVelXE = *(Vector*)((DWORD)pWeapon2 + 0x0F0);
  269. Vector weapVelYE = *(Vector*)((DWORD)pWeapon2 + 0x0F4);
  270. Vector weapVelZE = *(Vector*)((DWORD)pWeapon2 + 0x0F8);
  271.  
  272. Vector m_vecweapBaseVelocityE = *(Vector*)((DWORD)pWeapon2 + 0x124);
  273. Vector m_vecweapBaseVelocityM = *(Vector*)((DWORD)pWeapon + 0x124);
  274. Vector m_vecweapBaseVelocityALL = m_vecweapBaseVelocityE + m_vecweapBaseVelocityM;
  275.  
  276. float bullet_time = 0.9f;
  277. Vector ALLweapVelocity =( weapVelXE + weapVelXM + weapVelYE + weapVelYM + weapVelZE + weapVelZM);
  278. //////////////////////////////////////////////////////////////////////////////////////////////////
  279. std::map<C_BaseEntity *,Vector> m_vecrofl;
  280. // get latency
  281. float latence =
  282. g_pNet->GetAvgLatency( MAX_FLOWS )
  283. *+ g_pNet->GetLatency(MAX_FLOWS)
  284. *+ g_pNet->GetAvgChoke(MAX_FLOWS)
  285. *+ g_pNet->GetAvgData(MAX_FLOWS)
  286. *+ g_pNet->GetAvgLoss(MAX_FLOWS)
  287. *+ g_pNet->GetAvgPackets(MAX_FLOWS)
  288. *+ g_pNet->GetSequenceNr(MAX_FLOWS)
  289. *+ g_pNet->GetTotalData(MAX_FLOWS)
  290. *+ g_pNet->GetTime()
  291. *+ g_pEngine->Time();
  292. float latence2 = g_pNet->ENTITIES *+ g_pNet->ENTMESSAGES *+ g_pNet->EVENTS *+ g_pNet->GENERIC *+ g_pNet->LOCALPLAYER *+ g_pNet->MOVE *+ g_pNet->OTHERPLAYERS
  293. *+ g_pNet->SIGNON *+ g_pNet->SOUNDS *+ g_pNet->STRINGCMD *+ g_pNet->STRINGTABLE *+ g_pNet->TOTAL *+ g_pNet->USERMESSAGES *+ g_pNet->VOICE;
  294. float fLatency = latence2 *+ latence;
  295. //ftw prediction
  296. int m_iSpeedM = *(int*)((DWORD)pMe + 0xD08 + 0x534);
  297. int m_iSpeedE = *(int*)((DWORD)pEnemy + 0xD08 + 0x534);
  298. int m_iSpeedall = m_iSpeedE *+ m_iSpeedM;
  299. float pingE = *(float*)((DWORD)pEnemy + 0x80);
  300. float pingeffectE = *(float*)((DWORD)pEnemy + 0x0CF8 + 0x0D58);
  301. float pingM = *(float*)((DWORD)pMe + 0x80);
  302. float pingeffectM = *(float*)((DWORD)pMe + 0x0CF8 + 0x0D58);
  303. float pingall = pingeffectE *+ pingM *+ pingeffectM *+ pingE;
  304. float globals = g_pGlobals->interval_per_tick;
  305. // m_flLaggedMovementValue : 51DC35AD 68 B4110000 PUSH 11B4
  306. float current_LaggedMovementValueE = *reinterpret_cast<float*>( (size_t)pEnemy + 0x119C + 0x11B4 );
  307. float current_LaggedMovementValueM = *reinterpret_cast<float*>( (size_t)pMe + 0x119C + 0x11B4 );
  308. float current_LaggedMovementValueEIDC = *(float*)((DWORD)pEnemy + 0x119C );
  309. float current_LaggedMovementValueMIDC = *(float*)((DWORD)pMe + 0x119C );
  310. float current_LaggedMovementValueALL = current_LaggedMovementValueE *+ current_LaggedMovementValueM *+ current_LaggedMovementValueEIDC *+ current_LaggedMovementValueMIDC;
  311.  
  312. Vector Last;
  313. IPredictionSystem *sys;
  314. sys->CanPredict();
  315. sys->GetNext();
  316. Vector v[64],v2[65];
  317. Vector oldoriginALL = pEnemy->m_vecOldOrigin + pMe->m_vecOldOrigin *+ Last[pEnemy->entindex()] *+ Last[pMe->entindex()] *+ Last[pEnemy->index] *+ Last[pMe->index] /* + v[pMe->index] + v[pMe->entindex()] + v2[pEnemy->index] + v2[pMe->index]*/;
  318. Vector m_vecRagdollOriginE = *(Vector*)((DWORD)pEnemy + 0x860);
  319. Vector m_vecRagdollVelocityE = *(Vector*)((DWORD)pEnemy + 0x854);
  320. Vector m_vecRagdollVelocityM = *(Vector*)((DWORD)pMe + 0x854);
  321. Vector m_vecRagdollOriginM = *(Vector*)((DWORD)pMe + 0x860);
  322. Vector m_vecEyeExitEndpointM = *(Vector*)((DWORD)pMe + 0x810);
  323. Vector m_vecEyeExitEndpointE = *(Vector*)((DWORD)pEnemy + 0x810);
  324. Vector m_vecEyeExitEndpointALL = m_vecEyeExitEndpointE + m_vecEyeExitEndpointM;
  325. Vector m_VecForceM = *(Vector*)((DWORD)pEnemy + 0x4e4);
  326. Vector m_VecForceE = *(Vector*)((DWORD)pMe+ 0x4e4);
  327. Vector m_vecForceALL = m_VecForceE + m_VecForceM;
  328. Vector m_vecDirectionM = *(Vector*)((DWORD)pEnemy + 0x1c);
  329. Vector m_vecDirectionE = *(Vector*)((DWORD)pMe + 0x1c);
  330. Vector m_vecDirectionALL = m_vecDirectionE + m_vecDirectionM;
  331. Vector m_vecCenterM = *(Vector*)((DWORD)pEnemy + 0x4c);
  332. Vector m_vecCenterE = *(Vector*)((DWORD)pMe + 0x4c);
  333. Vector m_vecCenterALL = m_vecCenterE + m_vecCenterM;
  334. Vector m_vecBaseVelocityE = *(Vector*)((DWORD)pEnemy + 0x124);
  335. Vector m_vecBaseVelocityM = *(Vector*)((DWORD)pMe + 0x124);
  336. Vector m_vecBaseVelocityALL = m_vecBaseVelocityE + m_vecBaseVelocityM;
  337. Vector vecEnemyVelocityX = *(Vector*)((DWORD)pEnemy + 0x0F0);
  338. Vector vecEnemyVelocityY = *(Vector*)((DWORD)pEnemy + 0x0F4);
  339. Vector vecEnemyVelocityZ = *(Vector*)((DWORD)pEnemy + 0x0F8);
  340. Vector vMyVelX = *(Vector*)((DWORD)pMe + 0x0F0);
  341. Vector vMyVelY = *(Vector*)((DWORD)pMe + 0x0F4);
  342. Vector vMyVelZ = *(Vector*)((DWORD)pMe + 0x0F8);
  343. Vector vMyVelALL = vMyVelX + vMyVelY + vMyVelZ;
  344. Vector vecEnemyVelocityALL = vecEnemyVelocityX + vecEnemyVelocityY + vecEnemyVelocityZ;
  345. Vector ALLVelocity = vecEnemyVelocityALL + vMyVelALL;
  346. Vector m_vecInitialVelE = *(Vector*)((DWORD)pEnemy + 0x810);
  347. Vector m_vecInitialVelM = *(Vector*)((DWORD)pMe + 0x810);
  348. Vector m_vecInitialVelALL = m_vecInitialVelE + m_vecInitialVelM;
  349. float staminaE = *(float*)((DWORD)pEnemy + 0x13B0);
  350. float staminaM = *(float*)((DWORD)pMe + 0x13B0);
  351. float staminaall = staminaM *+ staminaE;
  352. float m_flFallVelocityM = *(float*)((DWORD)pMe + 0x58);
  353. float m_flFallVelocityE = *(float*)((DWORD)pEnemy + 0x58);
  354. float m_flFallVelocityall = m_flFallVelocityM + m_flFallVelocityE;
  355. Vector m_vecViewOffsetXM = *(Vector*)((DWORD)pEnemy + 0x0E4);
  356. Vector m_vecViewOffsetYM = *(Vector*)((DWORD)pEnemy + 0x0E4);
  357. Vector m_vecViewOffsetZM = *(Vector*)((DWORD)pEnemy + 0x0EC);
  358. Vector m_vecViewOffsetXE = *(Vector*)((DWORD)pMe + 0x0E4);
  359. Vector m_vecViewOffsetYE = *(Vector*)((DWORD)pMe + 0x0E8);
  360. Vector m_vecViewOffsetZE = *(Vector*)((DWORD)pMe + 0x0EC);
  361. Vector m_vecViewOffsetALL = m_vecViewOffsetXE + m_vecViewOffsetXM + m_vecViewOffsetYE + m_vecViewOffsetYM + m_vecViewOffsetZE + m_vecViewOffsetZM;
  362. CPredictedViewModel *Pred = reinterpret_cast< CPredictedViewModel * >(pMe);
  363. CPredictedViewModel *Pred2 = reinterpret_cast< CPredictedViewModel * >(pEnemy);
  364. Vector lol = Pred->GetObserverCamOrigin() + Pred2->GetObserverCamOrigin() ;
  365. /*Pred->CalcViewModelLag(oldoriginALL,QAngle(Pred->GetAbsAngles()),QAngle(Pred->GetAbsAngles()));
  366. Pred2->CalcViewModelLag(oldoriginALL,QAngle(Pred2->GetAbsAngles()),QAngle(Pred2->GetAbsAngles()));*/
  367. Vector rofl = lol + ((Pred->m_vecPreRagdollMins + Pred->m_vecPreRagdollMaxs) + (Pred2->m_vecPreRagdollMins + Pred2->m_vecPreRagdollMaxs)) + (Pred->m_vecLastFacing + Pred2->m_vecLastFacing);
  368. Vector rv = m_vecRagdollVelocityE + m_vecRagdollVelocityM;
  369. Vector ro = m_vecRagdollOriginE + m_vecRagdollOriginM;
  370. Vector we = rv + ro;
  371. Vector ForceTehPoint = m_vecCenterALL + m_vecForceALL + m_vecEyeExitEndpointALL + m_vecDirectionALL + m_vecInitialVelALL + we + m_vecrofl[pEnemy] + m_vecrofl[pMe] + rofl + pEnemy->GetPrevLocalOrigin() + pMe->GetPrevLocalOrigin() + m_vecViewOffsetALL;
  372. ALLVelocity -= m_vecweapBaseVelocityALL + m_vecBaseVelocityALL *+ g_pCvar->FindVar("sv_gravity")->GetFloat() *+ pMe->GetGravity() *+ pEnemy->GetGravity() *+ staminaall *+ Pred->m_flGroundSpeed *+ Pred2->m_flGroundSpeed;
  373.  
  374. float interp = max(g_pCvar->FindVar("cl_interp")->GetFloat()
  375. , g_pCvar->FindVar("cl_interp_ratio")->GetFloat()
  376. / g_pCvar->FindVar("cl_updaterate")->GetFloat())
  377. *+ g_pCvar->FindVar("cl_smoothtime")->GetFloat()
  378. *+ current_LaggedMovementValueALL
  379. *+ bullet_time;
  380.  
  381. //fps test lol what the fuck im doing fps is do nothing ???
  382. float FPS = 0.f;
  383. float fLastCount = 0.f;
  384. float fCurCount;
  385. fCurCount = clock() * 0.01f;
  386. ++FPS;
  387. m_vPosition -= ( ALLVelocity + oldoriginALL + ForceTehPoint + ALLweapVelocity) *+ interp *+ FPS *+ globals *+ c->tick_count *+ fLatency *+ m_iSpeedall ;
  388. vEyePositionEnemey -= ( ALLVelocity + oldoriginALL + ForceTehPoint + ALLweapVelocity) *+ interp *+ FPS *+ globals *+ c->tick_count *+ fLatency *+ m_iSpeedall ;
  389. vMyEyesPosition -= ( ALLVelocity + oldoriginALL + ForceTehPoint + ALLweapVelocity) *+ interp *+ FPS *+ globals *+ c->tick_count *+ fLatency *+ m_iSpeedall ;
  390. Vector vForward, vRight, vUp;
  391. QAngle qAngles = QAngle(0,pEnemy->GetRenderAngles().y,0);
  392. AngleVectors( qAngles, &vForward, &vRight, &vUp );
  393. Vector vTmp = m_vPosition;
  394. Vector vTmp2 = vEyePositionEnemey;
  395. Vector vTmp3 = vMyEyesPosition;
  396. m_vPosition = vTmp - (vRight * ( ( ALLVelocity + oldoriginALL + ForceTehPoint + ALLweapVelocity) *+ interp *+ FPS *+ globals *+ c->tick_count *+ fLatency *+ m_iSpeedall ) - vForward * ( ( ALLVelocity + oldoriginALL + ForceTehPoint) *+ interp *+ FPS *+ globals *+ c->tick_count *+ fLatency *+ m_iSpeedall ) - vUp * ( ( ALLVelocity + oldoriginALL + ForceTehPoint) *+ interp *+ FPS *+ globals *+ c->tick_count *+ fLatency *+ m_iSpeedall ) );
  397. vEyePositionEnemey = vTmp2 - (vRight * ( ( ALLVelocity + oldoriginALL + ForceTehPoint + ALLweapVelocity ) *+ interp *+ FPS *+ globals *+ c->tick_count *+ fLatency *+ m_iSpeedall ) - vForward * ( ( ALLVelocity + oldoriginALL + ForceTehPoint) *+ interp *+ FPS *+ globals *+ c->tick_count *+ fLatency *+ m_iSpeedall ) - vUp * ( ( ALLVelocity + oldoriginALL + ForceTehPoint) *+ interp *+ FPS *+ globals *+ c->tick_count *+ fLatency *+ m_iSpeedall ) );
  398. vMyEyesPosition = vTmp3 - (vRight * ( ( ALLVelocity + oldoriginALL + ForceTehPoint + ALLweapVelocity) *+ interp *+ FPS *+ globals *+ c->tick_count *+ fLatency *+ m_iSpeedall ) - vForward * ( ( ALLVelocity + oldoriginALL + ForceTehPoint) *+ interp *+ FPS *+ globals *+ c->tick_count *+ fLatency *+ m_iSpeedall ) - vUp * ( ( ALLVelocity + oldoriginALL + ForceTehPoint) *+ interp *+ FPS *+ globals *+ c->tick_count *+ fLatency *+ m_iSpeedall ) );
  399.  
  400. }
  401. void cAimbot::IsEnemyUsingAntiAim(CBaseEntity *pBaseEntity)
  402. {
  403. QAngle AADETECT;
  404. AADETECT.x = *(float*) ( ( DWORD )pBaseEntity + ( DWORD )0x1420);
  405. AADETECT.y = *(float*) ( ( DWORD )pBaseEntity + ( DWORD )0x1424);
  406. AADETECT.z = 0.0f;
  407. if(( AADETECT.x > 89.f) && (AADETECT.x < 91.f))
  408. {
  409. if(new_Menu->CvarList.AimVars.randz)
  410. m_vecPosition.z += new_Menu->CvarList.AimVars.Height + RandomFloat(new_Menu->CvarList.AimVars.HeightRandmin,new_Menu->CvarList.AimVars.HeightRandmax);
  411. else
  412. m_vecPosition.z += new_Menu->CvarList.AimVars.Height;
  413. if(new_Menu->CvarList.AimVars.randz)
  414. m_vecPosition.y += new_Menu->CvarList.AimVars.Forward + RandomFloat(new_Menu->CvarList.AimVars.ForwardRandmin,new_Menu->CvarList.AimVars.ForwardRandmax);
  415. else
  416. m_vecPosition.y += new_Menu->CvarList.AimVars.Forward;
  417. if(new_Menu->CvarList.AimVars.randz)
  418. m_vecPosition.x += new_Menu->CvarList.AimVars.Right + RandomFloat(new_Menu->CvarList.AimVars.RightRandmin,new_Menu->CvarList.AimVars.RightRandmax);
  419. else
  420. m_vecPosition.x += new_Menu->CvarList.AimVars.Right;
  421. }
  422. //AngleVectors( QAngle( 0.0f, pBaseEntity->GetAbsAngles().y, 0.0f ), &vF, &vR, &vU );
  423. }
  424. bool GetWeaponInfo(C_BaseCombatWeapon*pWeapon,int iWeaponID, int &iBulletType, int &iPenetration, int &iDamage, float &flDistance, float &flRangeModifier)
  425. {
  426. bool bPistolBit = *(PBOOL)((DWORD)pWeapon + 0x9E0);//m_bSilencerOn usp
  427. bool bRifleBit = *(PBOOL)((DWORD)pWeapon + 0x9E8);//m_bSilencerOn m41
  428.  
  429.  
  430. switch(iWeaponID)
  431. {
  432. case WEAPON_NULL:
  433. iBulletType = 0;
  434. iPenetration = 0;
  435. iDamage = 0;
  436. flDistance = 0.0f;
  437. flRangeModifier = 0.0f;
  438. break;
  439. case WEAPON_P228:
  440. iBulletType = 9;
  441. iPenetration = 1;
  442. iDamage = 40;
  443. flDistance = 4096.0f;
  444. flRangeModifier = 0.8f;
  445. break;
  446. case WEAPON_GLOCK18:
  447. iBulletType = 6;
  448. iPenetration = 1;
  449. iDamage = 25;
  450. flDistance = 8192.0f;
  451. flRangeModifier = 0.75f;
  452. break;
  453. case WEAPON_SCOUT:
  454. iBulletType = 2;
  455. iPenetration = 1;
  456. iDamage = 75;
  457. flDistance = 8192.0f;
  458. flRangeModifier = 0.98f;
  459. break;
  460. case WEAPON_MAC10:
  461. iBulletType = 8;
  462. iPenetration = 1;
  463. iDamage = 29;
  464. flDistance = 4096.0f;
  465. flRangeModifier = 0.82f;
  466. break;
  467. case WEAPON_AUG:
  468. iBulletType = 2;
  469. iPenetration = 2;
  470. iDamage = 32;
  471. flDistance = 8192.0f;
  472. flRangeModifier = 0.96f;
  473. break;
  474. case WEAPON_ELITES:
  475. iBulletType = 6;
  476. iPenetration = 1;
  477. iDamage = 45;
  478. flDistance = 4096.0f;
  479. flRangeModifier = 0.75f;
  480. break;
  481. case WEAPON_FIVESEVEN:
  482. iBulletType = 10;
  483. iPenetration = 1;
  484. iDamage = 25;
  485. flDistance = 4096.0f;
  486. flRangeModifier = 0.885f;
  487. break;
  488. case WEAPON_UMP45:
  489. iBulletType = 8;
  490. iPenetration = 1;
  491. iDamage = 30;
  492. flDistance = 4096.0f;
  493. flRangeModifier = 0.82f;
  494. break;
  495. case WEAPON_SG550:
  496. iBulletType = 3;
  497. iPenetration = 2;
  498. iDamage = 70;
  499. flDistance = 8192.0f;
  500. flRangeModifier = 0.98f;
  501. break;
  502. case WEAPON_GALIL:
  503. iBulletType = 3;
  504. iPenetration = 2;
  505. iDamage = 30;
  506. flDistance = 8192.0f;
  507. flRangeModifier = 0.98f;
  508. break;
  509. case WEAPON_FAMAS:
  510. iBulletType = 3;
  511. iPenetration = 2;
  512. iDamage = 30;
  513. flDistance = 8192.0f;
  514. flRangeModifier = 0.96f;
  515. break;
  516. case WEAPON_USP45:
  517. iBulletType = 8;
  518. iPenetration = 1;
  519. iDamage = bPistolBit ? 30.0f : 34.0f;;
  520. flDistance = 4096.0f;
  521. flRangeModifier = 0.79f;
  522. break;
  523. case WEAPON_AWP:
  524. iBulletType = 5;
  525. iPenetration = 3;
  526. iDamage = 115;
  527. flDistance = 8192.0f;
  528. flRangeModifier = 0.99f;
  529. break;
  530. case WEAPON_MP5:
  531. iBulletType = 6;
  532. iPenetration = 1;
  533. iDamage = 26;
  534. flDistance = 4096.0f;
  535. flRangeModifier = 0.84f;
  536. break;
  537. case WEAPON_M249:
  538. iBulletType = 4;
  539. iPenetration = 2;
  540. iDamage = 32;
  541. flDistance = 8192.0f;
  542. flRangeModifier = 0.97f;
  543. break;
  544. case WEAPON_M4A1:
  545. iBulletType = 3;
  546. iPenetration = 2;
  547. iDamage = 33;
  548. flDistance = 8192.0f;
  549. flRangeModifier = bRifleBit ? 0.95f : 0.97f;
  550. break;
  551. case WEAPON_TMP:
  552. iBulletType = 6;
  553. iPenetration = 1;
  554. iDamage = 26;
  555. flDistance = 4096.0f;
  556. flRangeModifier = 0.84f;
  557. break;
  558. case WEAPON_G3SG1:
  559. iBulletType = 2;
  560. iPenetration = 3;
  561. iDamage = 80;
  562. flDistance = 8192.0f;
  563. flRangeModifier = 0.98f;
  564. break;
  565. case WEAPON_DEAGLE:
  566. iBulletType = 1;
  567. iPenetration = 2;
  568. iDamage = 54;
  569. flDistance = 4096.0f;
  570. flRangeModifier = 0.81f;
  571. break;
  572. case WEAPON_SG552:
  573. iBulletType = 3;
  574. iPenetration = 2;
  575. iDamage = 33;
  576. flDistance = 8192.0f;
  577. flRangeModifier = 0.955f;
  578. break;
  579. case WEAPON_AK47:
  580. iBulletType = 2;
  581. iPenetration = 2;
  582. iDamage = 36;
  583. flDistance = 8192.0f;
  584. flRangeModifier = 0.98f;
  585. break;
  586. case WEAPON_P90:
  587. iBulletType = 10;
  588. iPenetration = 1;
  589. iDamage = 26;
  590. flDistance = 4096.0f;
  591. flRangeModifier = 0.84f;
  592. break;
  593. default:
  594. iBulletType = 0;
  595. iPenetration = 0;
  596. iDamage = 0;
  597. flDistance = 0.0f;
  598. flRangeModifier = 0.0f;
  599. break;
  600. }
  601.  
  602. if(iBulletType != 0)
  603. return true;
  604. else
  605. return false;
  606. }
  607.  
  608. bool AutoWall2(Vector &vStart,Vector &vecEnd,C_BaseEntity*pBaseEntity){
  609. trace_t tr,tr2;
  610. Vector vecSrc,vecDir,tmpVec = vecEnd;
  611. float flRangeModifier,flPenetrationDistance,flCurrentDistance = 0.0f;
  612. int iPenetration;
  613. int iCurrentDamage = 0;
  614. int iPenetrationPower = 0;
  615. float flLength = 0.0f;
  616. float flTempLength = 0.0f;
  617. int iBulletType = 0;
  618. float flTravelledDistance = 0.0f;
  619. bool bForceOn;
  620. if(bCheckVisible(vStart,vecEnd,pBaseEntity))
  621. return true;
  622. C_BaseEntity*pLocal = gNeeded.GetEntityByIndex(g_pEngine->GetLocalPlayer());
  623. if( !pLocal )
  624. return false;
  625. CBaseCombatWeapon* pWeapon = gNospread.GetBaseCombatActiveWeapon(pLocal);
  626. if( !pWeapon )
  627. return false;
  628. int iWeaponID = gNospread.getWeaponID(g_pModelinfo->GetModelName(pWeapon->GetModel()));
  629. if( !iWeaponID )
  630. return false;
  631. DWORD dwTemp[5];
  632.  
  633. __asm
  634. {
  635. MOV EDX,pLocal;
  636. MOV EAX,pBaseEntity;
  637.  
  638. PUSH 0;
  639. PUSH EDX;
  640. PUSH EAX;
  641. LEA ECX,dwTemp;
  642. CALL dwTraceFilter;
  643. }
  644. if( !bForceOn ){
  645. bForceOn = true;
  646. VectorCopy(vStart,vecSrc);
  647. vecDir = vecEnd - vStart;
  648. flLength = VectorLength ( vecDir );
  649. vecDir /= flLength;
  650. if(!GetWeaponInfo(pWeapon,iWeaponID,iBulletType,iPenetration,iCurrentDamage,flCurrentDistance,flRangeModifier))
  651. return false;
  652. float fPenetrationPower = 0.0f;
  653.  
  654. __asm
  655. {
  656. LEA ECX, flPenetrationDistance
  657. PUSH ECX
  658. LEA EDX, fPenetrationPower
  659. PUSH EDX
  660. PUSH iBulletType
  661. CALL dwGetBulletTypeParameters
  662. }
  663. iPenetrationPower = (int)fPenetrationPower;
  664. float flDamageModifier = 20.0f;
  665. while(iPenetration || iCurrentDamage > 0){
  666. vecEnd = vecSrc + vecDir * 10;
  667. if(flTravelledDistance > flCurrentDistance)
  668. return false;
  669. Trace( vecSrc, vecEnd, 0x46004003/*0x4600400B*//*0x2004003*/, (ITraceFilter*)dwTemp, &tr );
  670. surfacedata_t *g_pSurfaceData = g_pPhysicAPI->GetSurfaceData( tr.surface.surfaceProps );
  671. int iMaterial = g_pSurfaceData->game.material;
  672. float flPenetrationPowerModifier = 0.0f;
  673.  
  674. __asm
  675. {
  676. LEA EAX, flDamageModifier
  677. LEA ECX, flPenetrationPowerModifier
  678. MOV EDX, iMaterial
  679. CALL dwGetTextureInformation
  680. }
  681. iPenetrationPower *= flPenetrationPowerModifier;
  682. flTravelledDistance += 10;
  683. if(tr.fraction != 1.0){
  684. if( tr.allsolid )
  685. return false;
  686. VectorSubtract ( tr.endpos, vStart, tmpVec );
  687. flTempLength = VectorLength ( tmpVec );
  688. if ( flTempLength >= flLength ){
  689. if ( iCurrentDamage >= 0 )
  690. return true;
  691. }
  692. iCurrentDamage *= (pow (flRangeModifier, (flTempLength / 500)));
  693. iCurrentDamage *= flDamageModifier;
  694. iPenetration--;
  695. }
  696. vecSrc = vecEnd;
  697. }}
  698. else if( bForceOn ){
  699. bForceOn = false;
  700. Trace( vecSrc, vecEnd, 0x46004003/*0x4600400B*//*0x2004003*/, (ITraceFilter*)dwTemp, &tr2 );
  701. if( tr2.fraction == 1.0f || tr2.m_pEnt->entindex() == pBaseEntity->entindex() )
  702. return true;
  703. return false;
  704. }
  705. return true;
  706. }
  707. struct Hitbox_s { Vector aimSpot; };
  708. std::vector< Hitbox_s > vHitbox;
  709. enum { VEC_PITCH, VEC_YAW, VEC_ROLL, VEC_DEFAULT };
  710.  
  711. class CPlayer
  712. {
  713. public:
  714. std::vector< Hitbox_s > vHitbox;
  715. }; extern CPlayer g_Player[ 66 ];
  716. CPlayer g_Player[ 66 ];
  717.  
  718. inline void Add_AimbotSpot ( INT iIndex, INT iVEC, Vector vOrigin, FLOAT flOffset )
  719. {
  720. Hitbox_s dummy;
  721.  
  722. if ( iVEC != VEC_DEFAULT )
  723. vOrigin[iVEC] += flOffset;
  724.  
  725. dummy.aimSpot = vOrigin;
  726. g_Player[iIndex].vHitbox.push_back( dummy );
  727. }
  728.  
  729. inline void Add_AimbotSpot_2 ( INT iIndex, INT iVEC, Vector vOrigin, FLOAT flOffset, std::vector< Hitbox_s > &outVector )
  730. {
  731. Hitbox_s dummy;
  732.  
  733. if ( iVEC != VEC_DEFAULT )
  734. vOrigin[iVEC] += flOffset;
  735.  
  736. dummy.aimSpot = vOrigin;
  737. outVector.push_back( dummy );
  738. }
  739. void cAimbot::Bot(CUserCmd* c)
  740. {
  741. C_BaseEntity*pLocalPlayer = (C_BaseEntity*)g_pEntList->GetClientEntity( g_pEngine->GetLocalPlayer() );
  742. Reset();
  743. vEyePos = gNeeded.GetEyePosition(pLocalPlayer);
  744.  
  745. for(int i = 1; i <= g_pEntList->GetHighestEntityIndex(); i++)
  746. {
  747. C_BaseEntity* pBaseEnt = gNeeded.GetEntityByIndex(i);
  748. if(pBaseEnt == NULL)
  749. continue;
  750. if(pBaseEnt->index == pLocalPlayer->index)
  751. continue;
  752. if( stricmp( pBaseEnt->GetClientClass()->GetName(), "CCSPlayer" ) == 0 )
  753. {
  754.  
  755. int nHealth = *(PINT)((DWORD)pBaseEnt + 0x90);
  756. if(!IsAlive(pLocalPlayer))
  757. continue;
  758. if(!IsAlive(pBaseEnt))
  759. continue;
  760. if(nHealth <= 0)
  761. continue;
  762. if(pBaseEnt->IsDormant())
  763. continue;
  764. if(!HasAmmo(pLocalPlayer))
  765. continue;
  766. if(pBaseEnt->GetTeamNumber() == pLocalPlayer->GetTeamNumber())
  767. continue;
  768. if(bHasMiscWeapon())
  769. continue;
  770. if(!GetHitboxPosition(i,12,m_vecPosition,c->viewangles))
  771. continue;
  772. //IsEnemyUsingAntiAim(pBaseEnt);
  773. vEyeEnemyPos = gNeeded.GetEyePosition(pBaseEnt);
  774. if(new_Menu->CvarList.AimVars.Prediction == 1)
  775. {
  776. g_Prediction.ReportMove(vEyePos,i);
  777. g_Prediction.ReportMove(vEyeEnemyPos,i);
  778. g_Prediction.ReportMove(m_vecPosition,i);
  779. Prediction(pLocalPlayer,pBaseEnt,m_vecPosition,vEyePos,vEyeEnemyPos,c);
  780. }
  781. Vector vForward, vRight, vUp;
  782. Vector vForward2, vRight2 ,vUp2;
  783. QAngle qAngles = QAngle(0,pBaseEnt->GetRenderAngles().y,0);
  784. QAngle qAngles2 = QAngle(0,pBaseEnt->GetRenderAngles().y,0);
  785. AngleVectors( qAngles, &vForward, &vRight, &vUp );
  786. AngleVectors( qAngles2, &vForward2, &vRight2, &vUp2 );
  787. Vector vTmp = m_vecPosition;
  788. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  789. m_vecPosition = vTmp + vForward * new_Menu->CvarList.AimVars.Corps_plusY;
  790. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  791. m_vecPosition = vTmp - vForward * new_Menu->CvarList.AimVars.Corps_moinY;
  792. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  793. m_vecPosition = vTmp + vRight * new_Menu->CvarList.AimVars.Corps_plusX;
  794. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  795. m_vecPosition = vTmp - vRight * new_Menu->CvarList.AimVars.Corps_moinX;
  796. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  797. m_vecPosition = vTmp + vForward2 * new_Menu->CvarList.AimVars.Corps_plusY2;
  798. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  799. m_vecPosition = vTmp - vForward2 * new_Menu->CvarList.AimVars.Corps_moinY2;
  800. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  801. m_vecPosition = vTmp + vRight2 * new_Menu->CvarList.AimVars.Corps_plusX2;
  802. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  803. m_vecPosition = vTmp - vRight2 * new_Menu->CvarList.AimVars.Corps_moinX2;
  804. //
  805. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  806. m_vecPosition = vTmp + (vForward * new_Menu->CvarList.AimVars.Corps_plusY + vUp * new_Menu->CvarList.AimVars.Corps_plusZ);
  807. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  808. m_vecPosition = vTmp - (vForward * new_Menu->CvarList.AimVars.Corps_moinY - vUp * new_Menu->CvarList.AimVars.Corps_plusZ);
  809. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  810. m_vecPosition = vTmp + (vRight * new_Menu->CvarList.AimVars.Corps_plusX + vUp * new_Menu->CvarList.AimVars.Corps_plusZ);
  811. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  812. m_vecPosition = vTmp - (vRight * new_Menu->CvarList.AimVars.Corps_moinX - vUp * new_Menu->CvarList.AimVars.Corps_plusZ);
  813. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  814. m_vecPosition = vTmp + (vForward2 * new_Menu->CvarList.AimVars.Corps_plusY2 + vUp * new_Menu->CvarList.AimVars.Corps_plusZ);
  815. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  816. m_vecPosition = vTmp - (vForward2 * new_Menu->CvarList.AimVars.Corps_moinY2 - vUp * new_Menu->CvarList.AimVars.Corps_plusZ);
  817. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  818. m_vecPosition = vTmp + (vRight2 * new_Menu->CvarList.AimVars.Corps_plusX2 + vUp * new_Menu->CvarList.AimVars.Corps_plusZ);
  819. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  820. m_vecPosition = vTmp - (vRight2 * new_Menu->CvarList.AimVars.Corps_moinX2 - vUp * new_Menu->CvarList.AimVars.Corps_plusZ);
  821. //
  822. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  823. m_vecPosition = vTmp + (vForward * new_Menu->CvarList.AimVars.Corps_plusY + vUp * new_Menu->CvarList.AimVars.Corps_plusZ2);
  824. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  825. m_vecPosition = vTmp - (vForward * new_Menu->CvarList.AimVars.Corps_moinY - vUp * new_Menu->CvarList.AimVars.Corps_plusZ2);
  826. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  827. m_vecPosition = vTmp + (vRight * new_Menu->CvarList.AimVars.Corps_plusX + vUp * new_Menu->CvarList.AimVars.Corps_plusZ2);
  828. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  829. m_vecPosition = vTmp - (vRight * new_Menu->CvarList.AimVars.Corps_moinX - vUp * new_Menu->CvarList.AimVars.Corps_plusZ2);
  830. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  831. m_vecPosition = vTmp + (vForward2 * new_Menu->CvarList.AimVars.Corps_plusY2 + vUp * new_Menu->CvarList.AimVars.Corps_plusZ2);
  832. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  833. m_vecPosition = vTmp - (vForward2 * new_Menu->CvarList.AimVars.Corps_moinY2 - vUp * new_Menu->CvarList.AimVars.Corps_plusZ2);
  834. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  835. m_vecPosition = vTmp + (vRight2 * new_Menu->CvarList.AimVars.Corps_plusX2 + vUp * new_Menu->CvarList.AimVars.Corps_plusZ2);
  836. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  837. m_vecPosition = vTmp - (vRight2 * new_Menu->CvarList.AimVars.Corps_moinX2 - vUp * new_Menu->CvarList.AimVars.Corps_plusZ2);
  838. //
  839. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  840. m_vecPosition = vTmp + (vForward * new_Menu->CvarList.AimVars.Corps_plusY + vUp * new_Menu->CvarList.AimVars.Corps_plusZ3);
  841. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  842. m_vecPosition = vTmp - (vForward * new_Menu->CvarList.AimVars.Corps_moinY - vUp * new_Menu->CvarList.AimVars.Corps_plusZ3);
  843. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  844. m_vecPosition = vTmp + (vRight * new_Menu->CvarList.AimVars.Corps_plusX + vUp * new_Menu->CvarList.AimVars.Corps_plusZ3);
  845. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  846. m_vecPosition = vTmp - (vRight * new_Menu->CvarList.AimVars.Corps_moinX - vUp * new_Menu->CvarList.AimVars.Corps_plusZ3);
  847. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  848. m_vecPosition = vTmp + (vForward2 * new_Menu->CvarList.AimVars.Corps_plusY2 + vUp * new_Menu->CvarList.AimVars.Corps_plusZ3);
  849. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  850. m_vecPosition = vTmp - (vForward2 * new_Menu->CvarList.AimVars.Corps_moinY2 - vUp * new_Menu->CvarList.AimVars.Corps_plusZ3);
  851. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  852. m_vecPosition = vTmp + (vRight2 * new_Menu->CvarList.AimVars.Corps_plusX2 + vUp * new_Menu->CvarList.AimVars.Corps_plusZ3);
  853. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  854. m_vecPosition = vTmp - (vRight2 * new_Menu->CvarList.AimVars.Corps_moinX2 - vUp * new_Menu->CvarList.AimVars.Corps_plusZ3);
  855. //
  856. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  857. m_vecPosition = vTmp + (vForward * new_Menu->CvarList.AimVars.Corps_plusY + vUp * new_Menu->CvarList.AimVars.Corps_plusZ4);
  858. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  859. m_vecPosition = vTmp - (vForward * new_Menu->CvarList.AimVars.Corps_moinY - vUp * new_Menu->CvarList.AimVars.Corps_plusZ4);
  860. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  861. m_vecPosition = vTmp + (vRight * new_Menu->CvarList.AimVars.Corps_plusX + vUp * new_Menu->CvarList.AimVars.Corps_plusZ4);
  862. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  863. m_vecPosition = vTmp - (vRight * new_Menu->CvarList.AimVars.Corps_moinX - vUp * new_Menu->CvarList.AimVars.Corps_plusZ4);
  864. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  865. m_vecPosition = vTmp + (vForward2 * new_Menu->CvarList.AimVars.Corps_plusY2 + vUp * new_Menu->CvarList.AimVars.Corps_plusZ4);
  866. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  867. m_vecPosition = vTmp - (vForward2 * new_Menu->CvarList.AimVars.Corps_moinY2 - vUp * new_Menu->CvarList.AimVars.Corps_plusZ4);
  868. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  869. m_vecPosition = vTmp + (vRight2 * new_Menu->CvarList.AimVars.Corps_plusX2 + vUp * new_Menu->CvarList.AimVars.Corps_plusZ4);
  870. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  871. m_vecPosition = vTmp - (vRight2 * new_Menu->CvarList.AimVars.Corps_moinX2 - vUp * new_Menu->CvarList.AimVars.Corps_plusZ4);
  872. //
  873. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  874. m_vecPosition = vTmp + (vForward * new_Menu->CvarList.AimVars.Corps_plusY + vUp * new_Menu->CvarList.AimVars.Corps_plusZ5);
  875. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  876. m_vecPosition = vTmp - (vForward * new_Menu->CvarList.AimVars.Corps_moinY - vUp * new_Menu->CvarList.AimVars.Corps_plusZ5);
  877. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  878. m_vecPosition = vTmp + (vRight * new_Menu->CvarList.AimVars.Corps_plusX + vUp * new_Menu->CvarList.AimVars.Corps_plusZ5);
  879. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  880. m_vecPosition = vTmp - (vRight * new_Menu->CvarList.AimVars.Corps_moinX - vUp * new_Menu->CvarList.AimVars.Corps_plusZ5);
  881. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  882. m_vecPosition = vTmp + (vForward2 * new_Menu->CvarList.AimVars.Corps_plusY2 + vUp * new_Menu->CvarList.AimVars.Corps_plusZ5);
  883. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  884. m_vecPosition = vTmp - (vForward2 * new_Menu->CvarList.AimVars.Corps_moinY2 - vUp * new_Menu->CvarList.AimVars.Corps_plusZ5);
  885. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  886. m_vecPosition = vTmp + (vRight2 * new_Menu->CvarList.AimVars.Corps_plusX2 + vUp * new_Menu->CvarList.AimVars.Corps_plusZ5);
  887. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  888. m_vecPosition = vTmp - (vRight2 * new_Menu->CvarList.AimVars.Corps_moinX2 - vUp * new_Menu->CvarList.AimVars.Corps_plusZ5);
  889. //
  890. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  891. m_vecPosition = vTmp + vUp * new_Menu->CvarList.AimVars.Corps_plusZ;
  892. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  893. m_vecPosition = vTmp + vUp * new_Menu->CvarList.AimVars.Corps_plusZ2;
  894. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  895. m_vecPosition = vTmp + vUp * new_Menu->CvarList.AimVars.Corps_plusZ3;
  896. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  897. m_vecPosition = vTmp + vUp * new_Menu->CvarList.AimVars.Corps_plusZ4;
  898. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
  899. m_vecPosition = vTmp + vUp2 * new_Menu->CvarList.AimVars.Corps_plusZ5;
  900. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)) { continue; }
  901. }
  902. }
  903. }
  904. }
  905. }
  906. }
  907. }
  908. }
  909. }
  910. }
  911. }
  912. }
  913. }
  914. }
  915. }
  916. }
  917. }
  918. }
  919. }
  920. }
  921. }
  922. }
  923. }
  924. }
  925. }
  926. }
  927. }
  928. }
  929. }
  930. }
  931. }
  932. }
  933. }
  934. }
  935. }
  936. }
  937. }
  938. }
  939. }
  940. }
  941. }
  942. }
  943. }
  944. }
  945. }
  946. }
  947. }
  948. }
  949. }
  950. }
  951. }
  952. }
  953. else { continue; }
  954. }
  955. if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt))
  956. continue;
  957. nTarget = i;
  958. m_vecFinal = m_vecPosition;
  959. }
  960. }
  961. if(nTarget != -1)
  962. {
  963. QAngle lol;
  964. if(new_Menu->CvarList.AimVars.Autoshoot)
  965. c->buttons |= IN_ATTACK;
  966. if(new_Menu->CvarList.AimVars.Aim)
  967. CalculateAngle(vEyePos,m_vecFinal,c->viewangles);
  968. if(!new_Menu->CvarList.AimVars.Silentaim)
  969. {
  970. g_pCvar->FindVar("cl_mouseenable")->SetValue(0);
  971. g_pEngine->SetViewAngles(c->viewangles);
  972. }
  973. g_pRenderView->SetMainView(m_vecFinal,c->viewangles);
  974. g_pClient->SetCrosshairAngle(c->viewangles);
  975. g_pPrediction->SetLocalViewAngles(c->viewangles);
  976. g_pPrediction->SetViewAngles(c->viewangles);
  977. }
  978. else
  979. g_pCvar->FindVar("cl_mouseenable")->SetValue(1);
  980. }
  981. void cAimbot::Bot2(CUserCmd* c)
  982. {
  983. C_BaseEntity*pLocalPlayer = (C_BaseEntity*)g_pEntList->GetClientEntity( g_pEngine->GetLocalPlayer() );
  984. Reset();
  985. vEyePos = gNeeded.GetEyePosition(pLocalPlayer);
  986. int z[19] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18};
  987. for(int v = 0; v <= 18; ++v)
  988. {
  989. for(int i = 1; i <= g_pEntList->GetHighestEntityIndex(); i++)
  990. {
  991. C_BaseEntity* pBaseEnt = gNeeded.GetEntityByIndex(i);
  992. if(pBaseEnt == NULL)
  993. continue;
  994. if(pBaseEnt->index == pLocalPlayer->index)
  995. continue;
  996. if( stricmp( pBaseEnt->GetClientClass()->GetName(), "CCSPlayer" ) == 0 )
  997. {
  998.  
  999. int nHealth = *(PINT)((DWORD)pBaseEnt + 0x90);
  1000. if(!IsAlive(pLocalPlayer))
  1001. continue;
  1002. if(!IsAlive(pBaseEnt))
  1003. continue;
  1004. if(nHealth <= 0)
  1005. continue;
  1006. if(pBaseEnt->IsDormant())
  1007. continue;
  1008. if(!HasAmmo(pLocalPlayer))
  1009. continue;
  1010. if(pBaseEnt->GetTeamNumber() == pLocalPlayer->GetTeamNumber())
  1011. continue;
  1012. if(bHasMiscWeapon())
  1013. continue;
  1014. if(!testn00b(i,z[v],m_vecPosition,pBaseEnt))
  1015. continue;
  1016. //IsEnemyUsingAntiAim(pBaseEnt);
  1017. vEyeEnemyPos = gNeeded.GetEyePosition(pBaseEnt);
  1018. if(new_Menu->CvarList.AimVars.Prediction == 1)
  1019. {
  1020. g_Prediction.ReportMove(vEyePos,i);
  1021. g_Prediction.ReportMove(vEyeEnemyPos,i);
  1022. g_Prediction.ReportMove(m_vecPosition,i);
  1023. Prediction(pLocalPlayer,pBaseEnt,m_vecPosition,vEyePos,vEyeEnemyPos,c);
  1024. }
  1025. if(!AutoWall2(vEyePos,m_vecPosition,pBaseEnt))
  1026. continue;
  1027. nTarget = i;
  1028. m_vecFinal = m_vecPosition;
  1029. }
  1030. }
  1031. }
  1032. if(nTarget != -1)
  1033. {
  1034. if(new_Menu->CvarList.AimVars.Autoshoot)
  1035. c->buttons |= IN_ATTACK;
  1036. if(new_Menu->CvarList.AimVars.Aim)
  1037. CalculateAngle(vEyePos,m_vecFinal,c->viewangles);
  1038. if(!new_Menu->CvarList.AimVars.Silentaim)
  1039. {
  1040. g_pCvar->FindVar("cl_mouseenable")->SetValue(0);
  1041. g_pEngine->SetViewAngles(c->viewangles);
  1042. }
  1043. g_pRenderView->SetMainView(m_vecFinal,c->viewangles);
  1044. g_pClient->SetCrosshairAngle(c->viewangles);
  1045. g_pPrediction->SetLocalViewAngles(c->viewangles);
  1046. g_pPrediction->SetViewAngles(c->viewangles);
  1047.  
  1048. }
  1049. else
  1050. g_pCvar->FindVar("cl_mouseenable")->SetValue(1);
  1051. }
  1052. void cAimbot::Bot3(CUserCmd* c)
  1053. {
  1054. C_BaseEntity*pLocalPlayer = (C_BaseEntity*)g_pEntList->GetClientEntity( g_pEngine->GetLocalPlayer() );
  1055. Reset();
  1056. vEyePos = gNeeded.GetEyePosition(pLocalPlayer);
  1057. for(int i = 1; i <= g_pEntList->GetHighestEntityIndex(); i++)
  1058. {
  1059. C_BaseEntity* pBaseEnt = gNeeded.GetEntityByIndex(i);
  1060. if(pBaseEnt == NULL)
  1061. continue;
  1062. if(pBaseEnt->index == pLocalPlayer->index)
  1063. continue;
  1064. if( stricmp( pBaseEnt->GetClientClass()->GetName(), "CCSPlayer" ) == 0 )
  1065. {
  1066.  
  1067. int nHealth = *(PINT)((DWORD)pBaseEnt + 0x90);
  1068. if(!IsAlive(pLocalPlayer))
  1069. continue;
  1070. if(!IsAlive(pBaseEnt))
  1071. continue;
  1072. if(nHealth <= 0)
  1073. continue;
  1074. if(pBaseEnt->IsDormant())
  1075. continue;
  1076. if(!HasAmmo(pLocalPlayer))
  1077. continue;
  1078. if(pBaseEnt->GetTeamNumber() == pLocalPlayer->GetTeamNumber())
  1079. continue;
  1080. if(bHasMiscWeapon())
  1081. continue;
  1082. Vector vMin,vMax;
  1083. if(!GetHitboxPositiontehrealone(i,12,m_vecPosition,c->viewangles,pBaseEnt,vMin,vMax))
  1084. continue;
  1085. IsEnemyUsingAntiAim(pBaseEnt);
  1086. vEyeEnemyPos = gNeeded.GetEyePosition(pBaseEnt);
  1087. if(new_Menu->CvarList.AimVars.Prediction == 1)
  1088. {
  1089. g_Prediction.ReportMove(vEyePos,i);
  1090. g_Prediction.ReportMove(vEyeEnemyPos,i);
  1091. g_Prediction.ReportMove(m_vecPosition,i);
  1092. Prediction(pLocalPlayer,pBaseEnt,m_vecPosition,vEyePos,vEyeEnemyPos,c);
  1093. }
  1094.  
  1095. if(!AutoWall2(vEyePos,m_vecPosition,pBaseEnt))
  1096. continue;
  1097. nTarget = i;
  1098. m_vecFinal = m_vecPosition;
  1099. }
  1100. }
  1101. if(nTarget != -1)
  1102. {
  1103. if(new_Menu->CvarList.AimVars.Autoshoot)
  1104. c->buttons |= IN_ATTACK;
  1105. if(new_Menu->CvarList.AimVars.Aim)
  1106. CalculateAngle(vEyePos,m_vecFinal,c->viewangles);
  1107.  
  1108. if(!new_Menu->CvarList.AimVars.Silentaim)
  1109. {
  1110. g_pCvar->FindVar("cl_mouseenable")->SetValue(0);
  1111. g_pEngine->SetViewAngles(c->viewangles);
  1112. }
  1113. g_pRenderView->SetMainView(m_vecFinal,c->viewangles);
  1114. g_pClient->SetCrosshairAngle(c->viewangles);
  1115. g_pPrediction->SetLocalViewAngles(c->viewangles);
  1116. g_pPrediction->SetViewAngles(c->viewangles);
  1117. }
  1118. else
  1119. g_pCvar->FindVar("cl_mouseenable")->SetValue(1);
  1120. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement