Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Aimbot.h"
- cAimbot g_Aimbot;
- void cAimbot::Reset()
- {
- nTarget = -1;
- m_vecPosition.Init(0.0f,0.0f,0.0f);
- }
- cAimbot::cAimbot()
- {
- Reset();
- }
- bool bIsDefaultHit( trace_t *pTrace, C_BaseEntity *pEnt )
- {
- if( !pEnt )
- return false;
- if( pTrace->allsolid || pTrace->startsolid )
- return false;
- if( pTrace->m_pEnt && ( pTrace->m_pEnt->index == pEnt->index ) )
- return true;
- if( pTrace->fraction >= 0.94f )
- return true;
- return false;
- }
- __forceinline void Trace( Vector vecStart, Vector vecEnd, unsigned int uiMask, ITraceFilter* pFilter, trace_t *trMain )
- {
- Ray_t ray;
- ray.Init( vecStart, vecEnd );
- g_pEnginetrace->TraceRay( ray, uiMask, pFilter, trMain );
- }
- bool bCheckVisible( Vector &vecAbs ,Vector &vecDest, C_BaseEntity *pEnt )
- {
- if( !pEnt )
- return false;
- C_BaseEntity *pLocal = g_pEntList->GetClientEntity(g_pEngine->GetLocalPlayer())->GetBaseEntity();
- if( !pLocal )
- return false;
- trace_t trTrace;
- Trace( vecAbs, vecDest, 0x46004003, NULL, &trTrace );
- if( bIsDefaultHit( &trTrace , pEnt ) )
- return true;
- return false;
- }
- void cAimbot::CalculateAngle(Vector &vSource, Vector &vDestination, QAngle &qAngle)
- {
- Vector vDelta(vSource - vDestination);
- float flHyp = sqrt((vDelta.x * vDelta.x) + (vDelta.y * vDelta.y));
- qAngle.x = RAD2DEG(atan(vDelta.z / flHyp));
- qAngle.y = RAD2DEG(atan(vDelta.y / vDelta.x));
- if(vDelta.x >= 0.0f)
- qAngle.y += 180.0f;
- }
- bool cAimbot::IsAlive(C_BaseEntity* pEnt)
- {
- char lifestate = *(PCHAR)((DWORD)pEnt + m_offsets.dw_m_lifestats());
- if(!(lifestate == LIFE_ALIVE))
- return false;
- return true;
- }
- bool cAimbot::HasAmmo(C_BaseEntity *pEnt)
- {
- C_BaseCombatWeapon* m_pWeapon = gNospread.GetBaseCombatActiveWeapon ( pEnt );
- if ( !m_pWeapon )
- return true;
- int m_iClip1 = *(int*)((DWORD)m_pWeapon + (DWORD)m_offsets.dw_m_iClip1());
- if(m_iClip1 == 0)
- return false;
- return true;
- }
- bool cAimbot::bHasMiscWeapon()
- {
- C_BaseEntity*pLocalPlayer = (C_BaseEntity*)g_pEntList->GetClientEntity( g_pEngine->GetLocalPlayer() );
- CBaseCombatWeapon* pWeapon = gNospread.GetBaseCombatActiveWeapon(pLocalPlayer);
- if(!pWeapon)
- return false;
- int iWeaponID = gNospread.getWeaponID(g_pModelinfo->GetModelName(pWeapon->GetModel()));
- bool MiscWpn = ((iWeaponID == 0 || iWeaponID == 25 || iWeaponID == 26 || iWeaponID == 27 || iWeaponID == 28 || iWeaponID == 29) ? true : false);
- if(MiscWpn)
- return true;
- return false;
- }
- Vector cAimbot::GetVelocity(C_BaseEntity* pEnt)
- {
- return *(Vector*)((DWORD)pEnt + 0x0F0);
- }
- #define SET_BOUNDS_VALUE( _ARRAY, _INDEX, _X, _Y, _Z ) _ARRAY[_INDEX].x = _X; _ARRAY[_INDEX].y = _Y; _ARRAY[_INDEX].z = _Z; ++_INDEX;
- void GetBoxPoints( const Vector vMins, const Vector vMaxs, Vector *pOut, bool bShouldIncludeCenter )
- {
- /*
- 2-----3
- /| / |
- / | / |
- 6-----5 |
- | 1--|--4
- | / | /
- |/ |/
- 7-----8
- */
- int cornerIndex = 0;
- if ( bShouldIncludeCenter )
- {
- pOut[0] = ( ( vMins + vMaxs ) * .5f );
- ++cornerIndex;
- }
- SET_BOUNDS_VALUE( pOut, cornerIndex, vMins.x, vMins.y, vMins.z );//Min
- SET_BOUNDS_VALUE( pOut, cornerIndex, vMins.x, vMaxs.y, vMins.z );
- SET_BOUNDS_VALUE( pOut, cornerIndex, vMaxs.x, vMaxs.y, vMins.z );
- SET_BOUNDS_VALUE( pOut, cornerIndex, vMaxs.x, vMins.y, vMins.z );
- SET_BOUNDS_VALUE( pOut, cornerIndex, vMaxs.x, vMaxs.y, vMaxs.z );//Max
- SET_BOUNDS_VALUE( pOut, cornerIndex, vMins.x, vMaxs.y, vMaxs.z );
- SET_BOUNDS_VALUE( pOut, cornerIndex, vMins.x, vMins.y, vMaxs.z );
- SET_BOUNDS_VALUE( pOut, cornerIndex, vMaxs.x, vMins.y, vMaxs.z );
- }
- bool cAimbot::GetHitboxPosition(int nIndex,float SPOT,Vector &m_vPosition,QAngle qAngle)
- {
- matrix3x4_t pMatrix[MAXSTUDIOBONES];
- Vector vMin, vMax;
- mstudiohitboxset_t* pHitboxSet;
- mstudiobbox_t* pBox;
- IClientEntity* pEnemyClient = g_pEntList->GetClientEntity(nIndex);
- C_BaseEntity * pEnemy = pEnemyClient->GetBaseEntity();
- const model_t* pModel = pEnemyClient->GetModel();
- studiohdr_t* pStudioHdr = g_pModelinfo->GetStudiomodel(pModel);
- if(pEnemyClient->SetupBones(pMatrix, MAXSTUDIOBONES, BONE_USED_BY_HITBOX, g_pGlobals->interval_per_tick))
- {
- MatrixAngles( pMatrix[ nIndex ], qAngle, m_vPosition );
- pHitboxSet = pStudioHdr->pHitboxSet(*reinterpret_cast<int*>( reinterpret_cast<DWORD>( pEnemyClient ) + 0x4b8 ) );
- pBox = pHitboxSet->pHitbox(SPOT);
- VectorTransform(pBox->bbmin, pMatrix[pBox->bone], vMin);
- VectorTransform(pBox->bbmax, pMatrix[pBox->bone], vMax);
- m_vPosition = ( vMin + vMax ) * 0.5;
- Vector vScreen;
- return true;
- }
- return false;
- }
- bool cAimbot::GetHitboxPositiontehrealone ( int nIndex,float SPOT,Vector &m_vPosition,QAngle qAngle,C_BaseEntity* AA,Vector vMin,Vector vMax){
- matrix3x4_t pMatrix[MAXSTUDIOBONES];
- mstudiohitboxset_t* pHitboxSet;
- mstudiobbox_t* pBox;
- IClientEntity* pEnemyClient = g_pEntList->GetClientEntity(nIndex);
- C_BaseEntity * pEnemy = pEnemyClient->GetBaseEntity();
- float flSimulationTime = *reinterpret_cast<float*>( reinterpret_cast<DWORD>( pEnemyClient ) + 0x68 );
- const model_t* pModel = pEnemyClient->GetModel();
- studiohdr_t* pStudioHdr = g_pModelinfo->GetStudiomodel(pModel);
- if(pEnemyClient->SetupBones(pMatrix, MAXSTUDIOBONES, BONE_USED_BY_HITBOX, g_pGlobals->interval_per_tick))
- {
- MatrixAngles( pMatrix[ nIndex ], qAngle, m_vPosition );
- pHitboxSet = pStudioHdr->pHitboxSet(*reinterpret_cast<int*>( reinterpret_cast<DWORD>( AA ) + 0x4b8 ) );
- pBox = pHitboxSet->pHitbox(SPOT);
- VectorTransform(pBox->bbmin, pMatrix[pBox->bone], vMin);
- VectorTransform(pBox->bbmax, pMatrix[pBox->bone], vMax);
- QAngle AADETECT;
- AADETECT.x = *(float*) ( ( DWORD )AA + ( DWORD )0x1420);
- AADETECT.y = *(float*) ( ( DWORD )AA + ( DWORD )0x1424);
- AADETECT.z = 0.0f;
- if(( AADETECT.x > 89.f) && (AADETECT.x < 91.f))
- {
- m_vPosition.z = vMax.z;
- m_vPosition.y = ( vMin.y + vMax.y ) * 0.5;
- m_vPosition.x = ( vMin.x + vMax.x ) * 0.5;
- }
- else
- m_vPosition = ( vMin + vMax ) * 0.5;
- return true;
- }
- return false;
- }
- bool testn00b( int index , int spot, Vector& vecPosition,CBaseEntity * AA){
- C_BaseEntity*pBaseEntity = gNeeded.GetEntityByIndex( index );
- if(!pBaseEntity ){ return false; }
- matrix3x4_t Matrix[MAXSTUDIOBONES];
- if( !pBaseEntity->SetupBones( Matrix, MAXSTUDIOBONES, BONE_USED_BY_HITBOX, 0 ) ) { return false; }
- studiohdr_t *pStudioHeader = g_pModelinfo->GetStudiomodel( pBaseEntity->GetModel() );
- if( !pStudioHeader ) { return false; }
- mstudiobbox_t *pBox;
- pBox = pStudioHeader->pHitbox( min( (int)spot, pStudioHeader->iHitboxCount( 0 ) ), 0 );
- Vector vMax, vMin;
- VectorTransform( pBox->bbmin, Matrix[pBox->bone], vMin );
- VectorTransform( pBox->bbmax, Matrix[pBox->bone], vMax );
- vecPosition = ( vMin + vMax ) / 2;
- }
- /*void EstimateAbsVelocity( IClientEntity* p, Vector& vel )
- {
- typedef void (__thiscall* EstimateAbsVelocityFn)( IClientEntity* thisptr, Vector& vel );
- static EstimateAbsVelocityFn pfnEstimateAbsVelocity = NULL;
- if ( !pfnEstimateAbsVelocity )
- {
- pfnEstimateAbsVelocity = (EstimateAbsVelocityFn) dwFindPattern(
- (DWORD)GetModuleHandle("client.dll"), 0x690000,
- (PBYTE)"\x83\xEC\x0C\x56\x8B\xF1\xE8\x00\x00\x00\x00\x3B\xF0\x75\x2C\x00", "xxxxxxx????xxxx?");//+16
- if(!pfnEstimateAbsVelocity)
- return;
- }
- pfnEstimateAbsVelocity( p, vel );
- }*/
- bool cAimbot::AutoWall(Vector &vStart , Vector &vPos ,C_BaseEntity * pEnt)
- {
- trace_t tr;
- Ray_t ray;
- Vector vEnd, vEndPos[3];
- C_BaseEntity *pLocal = (C_BaseEntity*)g_pEntList->GetClientEntity( g_pEngine->GetLocalPlayer() );
- vEnd = vPos;
- if(bCheckVisible(vStart,vEnd,pEnt))
- return true;
- ray.Init( vStart, vEnd );
- g_pEnginetrace->TraceRay( ray, MASK_ALL, NULL, &tr );
- vEndPos[0] = tr.endpos;
- ray.Init( vEnd, vStart );
- g_pEnginetrace->TraceRay( ray, MASK_ALL, NULL, &tr );
- vEndPos[1] = tr.endpos;
- VectorSubtract( vEndPos[0], vEndPos[1], vEndPos[2] );
- float flLength = VectorLength( vEndPos[2] );
- if(tr.fraction != 0)
- if ( flLength < 14)
- return true;
- return false;
- }
- INetChannelInfo* GetNetChannel()
- {
- if ( !g_pNet )
- {
- DWORD* pdwEnginePhone = (DWORD*)*(DWORD*) g_pEngine;
- GetNetChannelFn GetNetChannelFunc = (GetNetChannelFn)pdwEnginePhone[72];
- g_pNet = GetNetChannelFunc();
- }
- return g_pNet;
- }
- void Prediction(C_BaseEntity * pMe,C_BaseEntity * pEnemy,Vector &m_vPosition,Vector &vMyEyesPosition,Vector &vEyePositionEnemey,CUserCmd * c)
- {
- CBaseCombatWeapon* pWeapon = gNospread.GetBaseCombatActiveWeapon(pMe);
- Vector weapVelXM = *(Vector*)((DWORD)pWeapon + 0x0F0);
- Vector weapVelYM = *(Vector*)((DWORD)pWeapon + 0x0F4);
- Vector weapVelZM = *(Vector*)((DWORD)pWeapon + 0x0F8);
- CBaseCombatWeapon* pWeapon2 = gNospread.GetBaseCombatActiveWeapon(pEnemy);
- Vector weapVelXE = *(Vector*)((DWORD)pWeapon2 + 0x0F0);
- Vector weapVelYE = *(Vector*)((DWORD)pWeapon2 + 0x0F4);
- Vector weapVelZE = *(Vector*)((DWORD)pWeapon2 + 0x0F8);
- Vector m_vecweapBaseVelocityE = *(Vector*)((DWORD)pWeapon2 + 0x124);
- Vector m_vecweapBaseVelocityM = *(Vector*)((DWORD)pWeapon + 0x124);
- Vector m_vecweapBaseVelocityALL = m_vecweapBaseVelocityE + m_vecweapBaseVelocityM;
- float bullet_time = 0.9f;
- Vector ALLweapVelocity =( weapVelXE + weapVelXM + weapVelYE + weapVelYM + weapVelZE + weapVelZM);
- //////////////////////////////////////////////////////////////////////////////////////////////////
- std::map<C_BaseEntity *,Vector> m_vecrofl;
- // get latency
- float latence =
- g_pNet->GetAvgLatency( MAX_FLOWS )
- *+ g_pNet->GetLatency(MAX_FLOWS)
- *+ g_pNet->GetAvgChoke(MAX_FLOWS)
- *+ g_pNet->GetAvgData(MAX_FLOWS)
- *+ g_pNet->GetAvgLoss(MAX_FLOWS)
- *+ g_pNet->GetAvgPackets(MAX_FLOWS)
- *+ g_pNet->GetSequenceNr(MAX_FLOWS)
- *+ g_pNet->GetTotalData(MAX_FLOWS)
- *+ g_pNet->GetTime()
- *+ g_pEngine->Time();
- float latence2 = g_pNet->ENTITIES *+ g_pNet->ENTMESSAGES *+ g_pNet->EVENTS *+ g_pNet->GENERIC *+ g_pNet->LOCALPLAYER *+ g_pNet->MOVE *+ g_pNet->OTHERPLAYERS
- *+ g_pNet->SIGNON *+ g_pNet->SOUNDS *+ g_pNet->STRINGCMD *+ g_pNet->STRINGTABLE *+ g_pNet->TOTAL *+ g_pNet->USERMESSAGES *+ g_pNet->VOICE;
- float fLatency = latence2 *+ latence;
- //ftw prediction
- int m_iSpeedM = *(int*)((DWORD)pMe + 0xD08 + 0x534);
- int m_iSpeedE = *(int*)((DWORD)pEnemy + 0xD08 + 0x534);
- int m_iSpeedall = m_iSpeedE *+ m_iSpeedM;
- float pingE = *(float*)((DWORD)pEnemy + 0x80);
- float pingeffectE = *(float*)((DWORD)pEnemy + 0x0CF8 + 0x0D58);
- float pingM = *(float*)((DWORD)pMe + 0x80);
- float pingeffectM = *(float*)((DWORD)pMe + 0x0CF8 + 0x0D58);
- float pingall = pingeffectE *+ pingM *+ pingeffectM *+ pingE;
- float globals = g_pGlobals->interval_per_tick;
- // m_flLaggedMovementValue : 51DC35AD 68 B4110000 PUSH 11B4
- float current_LaggedMovementValueE = *reinterpret_cast<float*>( (size_t)pEnemy + 0x119C + 0x11B4 );
- float current_LaggedMovementValueM = *reinterpret_cast<float*>( (size_t)pMe + 0x119C + 0x11B4 );
- float current_LaggedMovementValueEIDC = *(float*)((DWORD)pEnemy + 0x119C );
- float current_LaggedMovementValueMIDC = *(float*)((DWORD)pMe + 0x119C );
- float current_LaggedMovementValueALL = current_LaggedMovementValueE *+ current_LaggedMovementValueM *+ current_LaggedMovementValueEIDC *+ current_LaggedMovementValueMIDC;
- Vector Last;
- IPredictionSystem *sys;
- sys->CanPredict();
- sys->GetNext();
- Vector v[64],v2[65];
- 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]*/;
- Vector m_vecRagdollOriginE = *(Vector*)((DWORD)pEnemy + 0x860);
- Vector m_vecRagdollVelocityE = *(Vector*)((DWORD)pEnemy + 0x854);
- Vector m_vecRagdollVelocityM = *(Vector*)((DWORD)pMe + 0x854);
- Vector m_vecRagdollOriginM = *(Vector*)((DWORD)pMe + 0x860);
- Vector m_vecEyeExitEndpointM = *(Vector*)((DWORD)pMe + 0x810);
- Vector m_vecEyeExitEndpointE = *(Vector*)((DWORD)pEnemy + 0x810);
- Vector m_vecEyeExitEndpointALL = m_vecEyeExitEndpointE + m_vecEyeExitEndpointM;
- Vector m_VecForceM = *(Vector*)((DWORD)pEnemy + 0x4e4);
- Vector m_VecForceE = *(Vector*)((DWORD)pMe+ 0x4e4);
- Vector m_vecForceALL = m_VecForceE + m_VecForceM;
- Vector m_vecDirectionM = *(Vector*)((DWORD)pEnemy + 0x1c);
- Vector m_vecDirectionE = *(Vector*)((DWORD)pMe + 0x1c);
- Vector m_vecDirectionALL = m_vecDirectionE + m_vecDirectionM;
- Vector m_vecCenterM = *(Vector*)((DWORD)pEnemy + 0x4c);
- Vector m_vecCenterE = *(Vector*)((DWORD)pMe + 0x4c);
- Vector m_vecCenterALL = m_vecCenterE + m_vecCenterM;
- Vector m_vecBaseVelocityE = *(Vector*)((DWORD)pEnemy + 0x124);
- Vector m_vecBaseVelocityM = *(Vector*)((DWORD)pMe + 0x124);
- Vector m_vecBaseVelocityALL = m_vecBaseVelocityE + m_vecBaseVelocityM;
- Vector vecEnemyVelocityX = *(Vector*)((DWORD)pEnemy + 0x0F0);
- Vector vecEnemyVelocityY = *(Vector*)((DWORD)pEnemy + 0x0F4);
- Vector vecEnemyVelocityZ = *(Vector*)((DWORD)pEnemy + 0x0F8);
- Vector vMyVelX = *(Vector*)((DWORD)pMe + 0x0F0);
- Vector vMyVelY = *(Vector*)((DWORD)pMe + 0x0F4);
- Vector vMyVelZ = *(Vector*)((DWORD)pMe + 0x0F8);
- Vector vMyVelALL = vMyVelX + vMyVelY + vMyVelZ;
- Vector vecEnemyVelocityALL = vecEnemyVelocityX + vecEnemyVelocityY + vecEnemyVelocityZ;
- Vector ALLVelocity = vecEnemyVelocityALL + vMyVelALL;
- Vector m_vecInitialVelE = *(Vector*)((DWORD)pEnemy + 0x810);
- Vector m_vecInitialVelM = *(Vector*)((DWORD)pMe + 0x810);
- Vector m_vecInitialVelALL = m_vecInitialVelE + m_vecInitialVelM;
- float staminaE = *(float*)((DWORD)pEnemy + 0x13B0);
- float staminaM = *(float*)((DWORD)pMe + 0x13B0);
- float staminaall = staminaM *+ staminaE;
- float m_flFallVelocityM = *(float*)((DWORD)pMe + 0x58);
- float m_flFallVelocityE = *(float*)((DWORD)pEnemy + 0x58);
- float m_flFallVelocityall = m_flFallVelocityM + m_flFallVelocityE;
- Vector m_vecViewOffsetXM = *(Vector*)((DWORD)pEnemy + 0x0E4);
- Vector m_vecViewOffsetYM = *(Vector*)((DWORD)pEnemy + 0x0E4);
- Vector m_vecViewOffsetZM = *(Vector*)((DWORD)pEnemy + 0x0EC);
- Vector m_vecViewOffsetXE = *(Vector*)((DWORD)pMe + 0x0E4);
- Vector m_vecViewOffsetYE = *(Vector*)((DWORD)pMe + 0x0E8);
- Vector m_vecViewOffsetZE = *(Vector*)((DWORD)pMe + 0x0EC);
- Vector m_vecViewOffsetALL = m_vecViewOffsetXE + m_vecViewOffsetXM + m_vecViewOffsetYE + m_vecViewOffsetYM + m_vecViewOffsetZE + m_vecViewOffsetZM;
- CPredictedViewModel *Pred = reinterpret_cast< CPredictedViewModel * >(pMe);
- CPredictedViewModel *Pred2 = reinterpret_cast< CPredictedViewModel * >(pEnemy);
- Vector lol = Pred->GetObserverCamOrigin() + Pred2->GetObserverCamOrigin() ;
- /*Pred->CalcViewModelLag(oldoriginALL,QAngle(Pred->GetAbsAngles()),QAngle(Pred->GetAbsAngles()));
- Pred2->CalcViewModelLag(oldoriginALL,QAngle(Pred2->GetAbsAngles()),QAngle(Pred2->GetAbsAngles()));*/
- Vector rofl = lol + ((Pred->m_vecPreRagdollMins + Pred->m_vecPreRagdollMaxs) + (Pred2->m_vecPreRagdollMins + Pred2->m_vecPreRagdollMaxs)) + (Pred->m_vecLastFacing + Pred2->m_vecLastFacing);
- Vector rv = m_vecRagdollVelocityE + m_vecRagdollVelocityM;
- Vector ro = m_vecRagdollOriginE + m_vecRagdollOriginM;
- Vector we = rv + ro;
- 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;
- ALLVelocity -= m_vecweapBaseVelocityALL + m_vecBaseVelocityALL *+ g_pCvar->FindVar("sv_gravity")->GetFloat() *+ pMe->GetGravity() *+ pEnemy->GetGravity() *+ staminaall *+ Pred->m_flGroundSpeed *+ Pred2->m_flGroundSpeed;
- float interp = max(g_pCvar->FindVar("cl_interp")->GetFloat()
- , g_pCvar->FindVar("cl_interp_ratio")->GetFloat()
- / g_pCvar->FindVar("cl_updaterate")->GetFloat())
- *+ g_pCvar->FindVar("cl_smoothtime")->GetFloat()
- *+ current_LaggedMovementValueALL
- *+ bullet_time;
- //fps test lol what the fuck im doing fps is do nothing ???
- float FPS = 0.f;
- float fLastCount = 0.f;
- float fCurCount;
- fCurCount = clock() * 0.01f;
- ++FPS;
- m_vPosition -= ( ALLVelocity + oldoriginALL + ForceTehPoint + ALLweapVelocity) *+ interp *+ FPS *+ globals *+ c->tick_count *+ fLatency *+ m_iSpeedall ;
- vEyePositionEnemey -= ( ALLVelocity + oldoriginALL + ForceTehPoint + ALLweapVelocity) *+ interp *+ FPS *+ globals *+ c->tick_count *+ fLatency *+ m_iSpeedall ;
- vMyEyesPosition -= ( ALLVelocity + oldoriginALL + ForceTehPoint + ALLweapVelocity) *+ interp *+ FPS *+ globals *+ c->tick_count *+ fLatency *+ m_iSpeedall ;
- Vector vForward, vRight, vUp;
- QAngle qAngles = QAngle(0,pEnemy->GetRenderAngles().y,0);
- AngleVectors( qAngles, &vForward, &vRight, &vUp );
- Vector vTmp = m_vPosition;
- Vector vTmp2 = vEyePositionEnemey;
- Vector vTmp3 = vMyEyesPosition;
- 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 ) );
- 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 ) );
- 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 ) );
- }
- void cAimbot::IsEnemyUsingAntiAim(CBaseEntity *pBaseEntity)
- {
- QAngle AADETECT;
- AADETECT.x = *(float*) ( ( DWORD )pBaseEntity + ( DWORD )0x1420);
- AADETECT.y = *(float*) ( ( DWORD )pBaseEntity + ( DWORD )0x1424);
- AADETECT.z = 0.0f;
- if(( AADETECT.x > 89.f) && (AADETECT.x < 91.f))
- {
- if(new_Menu->CvarList.AimVars.randz)
- m_vecPosition.z += new_Menu->CvarList.AimVars.Height + RandomFloat(new_Menu->CvarList.AimVars.HeightRandmin,new_Menu->CvarList.AimVars.HeightRandmax);
- else
- m_vecPosition.z += new_Menu->CvarList.AimVars.Height;
- if(new_Menu->CvarList.AimVars.randz)
- m_vecPosition.y += new_Menu->CvarList.AimVars.Forward + RandomFloat(new_Menu->CvarList.AimVars.ForwardRandmin,new_Menu->CvarList.AimVars.ForwardRandmax);
- else
- m_vecPosition.y += new_Menu->CvarList.AimVars.Forward;
- if(new_Menu->CvarList.AimVars.randz)
- m_vecPosition.x += new_Menu->CvarList.AimVars.Right + RandomFloat(new_Menu->CvarList.AimVars.RightRandmin,new_Menu->CvarList.AimVars.RightRandmax);
- else
- m_vecPosition.x += new_Menu->CvarList.AimVars.Right;
- }
- //AngleVectors( QAngle( 0.0f, pBaseEntity->GetAbsAngles().y, 0.0f ), &vF, &vR, &vU );
- }
- bool GetWeaponInfo(C_BaseCombatWeapon*pWeapon,int iWeaponID, int &iBulletType, int &iPenetration, int &iDamage, float &flDistance, float &flRangeModifier)
- {
- bool bPistolBit = *(PBOOL)((DWORD)pWeapon + 0x9E0);//m_bSilencerOn usp
- bool bRifleBit = *(PBOOL)((DWORD)pWeapon + 0x9E8);//m_bSilencerOn m41
- switch(iWeaponID)
- {
- case WEAPON_NULL:
- iBulletType = 0;
- iPenetration = 0;
- iDamage = 0;
- flDistance = 0.0f;
- flRangeModifier = 0.0f;
- break;
- case WEAPON_P228:
- iBulletType = 9;
- iPenetration = 1;
- iDamage = 40;
- flDistance = 4096.0f;
- flRangeModifier = 0.8f;
- break;
- case WEAPON_GLOCK18:
- iBulletType = 6;
- iPenetration = 1;
- iDamage = 25;
- flDistance = 8192.0f;
- flRangeModifier = 0.75f;
- break;
- case WEAPON_SCOUT:
- iBulletType = 2;
- iPenetration = 1;
- iDamage = 75;
- flDistance = 8192.0f;
- flRangeModifier = 0.98f;
- break;
- case WEAPON_MAC10:
- iBulletType = 8;
- iPenetration = 1;
- iDamage = 29;
- flDistance = 4096.0f;
- flRangeModifier = 0.82f;
- break;
- case WEAPON_AUG:
- iBulletType = 2;
- iPenetration = 2;
- iDamage = 32;
- flDistance = 8192.0f;
- flRangeModifier = 0.96f;
- break;
- case WEAPON_ELITES:
- iBulletType = 6;
- iPenetration = 1;
- iDamage = 45;
- flDistance = 4096.0f;
- flRangeModifier = 0.75f;
- break;
- case WEAPON_FIVESEVEN:
- iBulletType = 10;
- iPenetration = 1;
- iDamage = 25;
- flDistance = 4096.0f;
- flRangeModifier = 0.885f;
- break;
- case WEAPON_UMP45:
- iBulletType = 8;
- iPenetration = 1;
- iDamage = 30;
- flDistance = 4096.0f;
- flRangeModifier = 0.82f;
- break;
- case WEAPON_SG550:
- iBulletType = 3;
- iPenetration = 2;
- iDamage = 70;
- flDistance = 8192.0f;
- flRangeModifier = 0.98f;
- break;
- case WEAPON_GALIL:
- iBulletType = 3;
- iPenetration = 2;
- iDamage = 30;
- flDistance = 8192.0f;
- flRangeModifier = 0.98f;
- break;
- case WEAPON_FAMAS:
- iBulletType = 3;
- iPenetration = 2;
- iDamage = 30;
- flDistance = 8192.0f;
- flRangeModifier = 0.96f;
- break;
- case WEAPON_USP45:
- iBulletType = 8;
- iPenetration = 1;
- iDamage = bPistolBit ? 30.0f : 34.0f;;
- flDistance = 4096.0f;
- flRangeModifier = 0.79f;
- break;
- case WEAPON_AWP:
- iBulletType = 5;
- iPenetration = 3;
- iDamage = 115;
- flDistance = 8192.0f;
- flRangeModifier = 0.99f;
- break;
- case WEAPON_MP5:
- iBulletType = 6;
- iPenetration = 1;
- iDamage = 26;
- flDistance = 4096.0f;
- flRangeModifier = 0.84f;
- break;
- case WEAPON_M249:
- iBulletType = 4;
- iPenetration = 2;
- iDamage = 32;
- flDistance = 8192.0f;
- flRangeModifier = 0.97f;
- break;
- case WEAPON_M4A1:
- iBulletType = 3;
- iPenetration = 2;
- iDamage = 33;
- flDistance = 8192.0f;
- flRangeModifier = bRifleBit ? 0.95f : 0.97f;
- break;
- case WEAPON_TMP:
- iBulletType = 6;
- iPenetration = 1;
- iDamage = 26;
- flDistance = 4096.0f;
- flRangeModifier = 0.84f;
- break;
- case WEAPON_G3SG1:
- iBulletType = 2;
- iPenetration = 3;
- iDamage = 80;
- flDistance = 8192.0f;
- flRangeModifier = 0.98f;
- break;
- case WEAPON_DEAGLE:
- iBulletType = 1;
- iPenetration = 2;
- iDamage = 54;
- flDistance = 4096.0f;
- flRangeModifier = 0.81f;
- break;
- case WEAPON_SG552:
- iBulletType = 3;
- iPenetration = 2;
- iDamage = 33;
- flDistance = 8192.0f;
- flRangeModifier = 0.955f;
- break;
- case WEAPON_AK47:
- iBulletType = 2;
- iPenetration = 2;
- iDamage = 36;
- flDistance = 8192.0f;
- flRangeModifier = 0.98f;
- break;
- case WEAPON_P90:
- iBulletType = 10;
- iPenetration = 1;
- iDamage = 26;
- flDistance = 4096.0f;
- flRangeModifier = 0.84f;
- break;
- default:
- iBulletType = 0;
- iPenetration = 0;
- iDamage = 0;
- flDistance = 0.0f;
- flRangeModifier = 0.0f;
- break;
- }
- if(iBulletType != 0)
- return true;
- else
- return false;
- }
- bool AutoWall2(Vector &vStart,Vector &vecEnd,C_BaseEntity*pBaseEntity){
- trace_t tr,tr2;
- Vector vecSrc,vecDir,tmpVec = vecEnd;
- float flRangeModifier,flPenetrationDistance,flCurrentDistance = 0.0f;
- int iPenetration;
- int iCurrentDamage = 0;
- int iPenetrationPower = 0;
- float flLength = 0.0f;
- float flTempLength = 0.0f;
- int iBulletType = 0;
- float flTravelledDistance = 0.0f;
- bool bForceOn;
- if(bCheckVisible(vStart,vecEnd,pBaseEntity))
- return true;
- C_BaseEntity*pLocal = gNeeded.GetEntityByIndex(g_pEngine->GetLocalPlayer());
- if( !pLocal )
- return false;
- CBaseCombatWeapon* pWeapon = gNospread.GetBaseCombatActiveWeapon(pLocal);
- if( !pWeapon )
- return false;
- int iWeaponID = gNospread.getWeaponID(g_pModelinfo->GetModelName(pWeapon->GetModel()));
- if( !iWeaponID )
- return false;
- DWORD dwTemp[5];
- __asm
- {
- MOV EDX,pLocal;
- MOV EAX,pBaseEntity;
- PUSH 0;
- PUSH EDX;
- PUSH EAX;
- LEA ECX,dwTemp;
- CALL dwTraceFilter;
- }
- if( !bForceOn ){
- bForceOn = true;
- VectorCopy(vStart,vecSrc);
- vecDir = vecEnd - vStart;
- flLength = VectorLength ( vecDir );
- vecDir /= flLength;
- if(!GetWeaponInfo(pWeapon,iWeaponID,iBulletType,iPenetration,iCurrentDamage,flCurrentDistance,flRangeModifier))
- return false;
- float fPenetrationPower = 0.0f;
- __asm
- {
- LEA ECX, flPenetrationDistance
- PUSH ECX
- LEA EDX, fPenetrationPower
- PUSH EDX
- PUSH iBulletType
- CALL dwGetBulletTypeParameters
- }
- iPenetrationPower = (int)fPenetrationPower;
- float flDamageModifier = 20.0f;
- while(iPenetration || iCurrentDamage > 0){
- vecEnd = vecSrc + vecDir * 10;
- if(flTravelledDistance > flCurrentDistance)
- return false;
- Trace( vecSrc, vecEnd, 0x46004003/*0x4600400B*//*0x2004003*/, (ITraceFilter*)dwTemp, &tr );
- surfacedata_t *g_pSurfaceData = g_pPhysicAPI->GetSurfaceData( tr.surface.surfaceProps );
- int iMaterial = g_pSurfaceData->game.material;
- float flPenetrationPowerModifier = 0.0f;
- __asm
- {
- LEA EAX, flDamageModifier
- LEA ECX, flPenetrationPowerModifier
- MOV EDX, iMaterial
- CALL dwGetTextureInformation
- }
- iPenetrationPower *= flPenetrationPowerModifier;
- flTravelledDistance += 10;
- if(tr.fraction != 1.0){
- if( tr.allsolid )
- return false;
- VectorSubtract ( tr.endpos, vStart, tmpVec );
- flTempLength = VectorLength ( tmpVec );
- if ( flTempLength >= flLength ){
- if ( iCurrentDamage >= 0 )
- return true;
- }
- iCurrentDamage *= (pow (flRangeModifier, (flTempLength / 500)));
- iCurrentDamage *= flDamageModifier;
- iPenetration--;
- }
- vecSrc = vecEnd;
- }}
- else if( bForceOn ){
- bForceOn = false;
- Trace( vecSrc, vecEnd, 0x46004003/*0x4600400B*//*0x2004003*/, (ITraceFilter*)dwTemp, &tr2 );
- if( tr2.fraction == 1.0f || tr2.m_pEnt->entindex() == pBaseEntity->entindex() )
- return true;
- return false;
- }
- return true;
- }
- struct Hitbox_s { Vector aimSpot; };
- std::vector< Hitbox_s > vHitbox;
- enum { VEC_PITCH, VEC_YAW, VEC_ROLL, VEC_DEFAULT };
- class CPlayer
- {
- public:
- std::vector< Hitbox_s > vHitbox;
- }; extern CPlayer g_Player[ 66 ];
- CPlayer g_Player[ 66 ];
- inline void Add_AimbotSpot ( INT iIndex, INT iVEC, Vector vOrigin, FLOAT flOffset )
- {
- Hitbox_s dummy;
- if ( iVEC != VEC_DEFAULT )
- vOrigin[iVEC] += flOffset;
- dummy.aimSpot = vOrigin;
- g_Player[iIndex].vHitbox.push_back( dummy );
- }
- inline void Add_AimbotSpot_2 ( INT iIndex, INT iVEC, Vector vOrigin, FLOAT flOffset, std::vector< Hitbox_s > &outVector )
- {
- Hitbox_s dummy;
- if ( iVEC != VEC_DEFAULT )
- vOrigin[iVEC] += flOffset;
- dummy.aimSpot = vOrigin;
- outVector.push_back( dummy );
- }
- void cAimbot::Bot(CUserCmd* c)
- {
- C_BaseEntity*pLocalPlayer = (C_BaseEntity*)g_pEntList->GetClientEntity( g_pEngine->GetLocalPlayer() );
- Reset();
- vEyePos = gNeeded.GetEyePosition(pLocalPlayer);
- for(int i = 1; i <= g_pEntList->GetHighestEntityIndex(); i++)
- {
- C_BaseEntity* pBaseEnt = gNeeded.GetEntityByIndex(i);
- if(pBaseEnt == NULL)
- continue;
- if(pBaseEnt->index == pLocalPlayer->index)
- continue;
- if( stricmp( pBaseEnt->GetClientClass()->GetName(), "CCSPlayer" ) == 0 )
- {
- int nHealth = *(PINT)((DWORD)pBaseEnt + 0x90);
- if(!IsAlive(pLocalPlayer))
- continue;
- if(!IsAlive(pBaseEnt))
- continue;
- if(nHealth <= 0)
- continue;
- if(pBaseEnt->IsDormant())
- continue;
- if(!HasAmmo(pLocalPlayer))
- continue;
- if(pBaseEnt->GetTeamNumber() == pLocalPlayer->GetTeamNumber())
- continue;
- if(bHasMiscWeapon())
- continue;
- if(!GetHitboxPosition(i,12,m_vecPosition,c->viewangles))
- continue;
- //IsEnemyUsingAntiAim(pBaseEnt);
- vEyeEnemyPos = gNeeded.GetEyePosition(pBaseEnt);
- if(new_Menu->CvarList.AimVars.Prediction == 1)
- {
- g_Prediction.ReportMove(vEyePos,i);
- g_Prediction.ReportMove(vEyeEnemyPos,i);
- g_Prediction.ReportMove(m_vecPosition,i);
- Prediction(pLocalPlayer,pBaseEnt,m_vecPosition,vEyePos,vEyeEnemyPos,c);
- }
- Vector vForward, vRight, vUp;
- Vector vForward2, vRight2 ,vUp2;
- QAngle qAngles = QAngle(0,pBaseEnt->GetRenderAngles().y,0);
- QAngle qAngles2 = QAngle(0,pBaseEnt->GetRenderAngles().y,0);
- AngleVectors( qAngles, &vForward, &vRight, &vUp );
- AngleVectors( qAngles2, &vForward2, &vRight2, &vUp2 );
- Vector vTmp = m_vecPosition;
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + vForward * new_Menu->CvarList.AimVars.Corps_plusY;
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp - vForward * new_Menu->CvarList.AimVars.Corps_moinY;
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + vRight * new_Menu->CvarList.AimVars.Corps_plusX;
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp - vRight * new_Menu->CvarList.AimVars.Corps_moinX;
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + vForward2 * new_Menu->CvarList.AimVars.Corps_plusY2;
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp - vForward2 * new_Menu->CvarList.AimVars.Corps_moinY2;
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + vRight2 * new_Menu->CvarList.AimVars.Corps_plusX2;
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp - vRight2 * new_Menu->CvarList.AimVars.Corps_moinX2;
- //
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + (vForward * new_Menu->CvarList.AimVars.Corps_plusY + vUp * new_Menu->CvarList.AimVars.Corps_plusZ);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp - (vForward * new_Menu->CvarList.AimVars.Corps_moinY - vUp * new_Menu->CvarList.AimVars.Corps_plusZ);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + (vRight * new_Menu->CvarList.AimVars.Corps_plusX + vUp * new_Menu->CvarList.AimVars.Corps_plusZ);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp - (vRight * new_Menu->CvarList.AimVars.Corps_moinX - vUp * new_Menu->CvarList.AimVars.Corps_plusZ);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + (vForward2 * new_Menu->CvarList.AimVars.Corps_plusY2 + vUp * new_Menu->CvarList.AimVars.Corps_plusZ);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp - (vForward2 * new_Menu->CvarList.AimVars.Corps_moinY2 - vUp * new_Menu->CvarList.AimVars.Corps_plusZ);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + (vRight2 * new_Menu->CvarList.AimVars.Corps_plusX2 + vUp * new_Menu->CvarList.AimVars.Corps_plusZ);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp - (vRight2 * new_Menu->CvarList.AimVars.Corps_moinX2 - vUp * new_Menu->CvarList.AimVars.Corps_plusZ);
- //
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + (vForward * new_Menu->CvarList.AimVars.Corps_plusY + vUp * new_Menu->CvarList.AimVars.Corps_plusZ2);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp - (vForward * new_Menu->CvarList.AimVars.Corps_moinY - vUp * new_Menu->CvarList.AimVars.Corps_plusZ2);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + (vRight * new_Menu->CvarList.AimVars.Corps_plusX + vUp * new_Menu->CvarList.AimVars.Corps_plusZ2);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp - (vRight * new_Menu->CvarList.AimVars.Corps_moinX - vUp * new_Menu->CvarList.AimVars.Corps_plusZ2);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + (vForward2 * new_Menu->CvarList.AimVars.Corps_plusY2 + vUp * new_Menu->CvarList.AimVars.Corps_plusZ2);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp - (vForward2 * new_Menu->CvarList.AimVars.Corps_moinY2 - vUp * new_Menu->CvarList.AimVars.Corps_plusZ2);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + (vRight2 * new_Menu->CvarList.AimVars.Corps_plusX2 + vUp * new_Menu->CvarList.AimVars.Corps_plusZ2);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp - (vRight2 * new_Menu->CvarList.AimVars.Corps_moinX2 - vUp * new_Menu->CvarList.AimVars.Corps_plusZ2);
- //
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + (vForward * new_Menu->CvarList.AimVars.Corps_plusY + vUp * new_Menu->CvarList.AimVars.Corps_plusZ3);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp - (vForward * new_Menu->CvarList.AimVars.Corps_moinY - vUp * new_Menu->CvarList.AimVars.Corps_plusZ3);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + (vRight * new_Menu->CvarList.AimVars.Corps_plusX + vUp * new_Menu->CvarList.AimVars.Corps_plusZ3);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp - (vRight * new_Menu->CvarList.AimVars.Corps_moinX - vUp * new_Menu->CvarList.AimVars.Corps_plusZ3);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + (vForward2 * new_Menu->CvarList.AimVars.Corps_plusY2 + vUp * new_Menu->CvarList.AimVars.Corps_plusZ3);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp - (vForward2 * new_Menu->CvarList.AimVars.Corps_moinY2 - vUp * new_Menu->CvarList.AimVars.Corps_plusZ3);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + (vRight2 * new_Menu->CvarList.AimVars.Corps_plusX2 + vUp * new_Menu->CvarList.AimVars.Corps_plusZ3);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp - (vRight2 * new_Menu->CvarList.AimVars.Corps_moinX2 - vUp * new_Menu->CvarList.AimVars.Corps_plusZ3);
- //
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + (vForward * new_Menu->CvarList.AimVars.Corps_plusY + vUp * new_Menu->CvarList.AimVars.Corps_plusZ4);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp - (vForward * new_Menu->CvarList.AimVars.Corps_moinY - vUp * new_Menu->CvarList.AimVars.Corps_plusZ4);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + (vRight * new_Menu->CvarList.AimVars.Corps_plusX + vUp * new_Menu->CvarList.AimVars.Corps_plusZ4);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp - (vRight * new_Menu->CvarList.AimVars.Corps_moinX - vUp * new_Menu->CvarList.AimVars.Corps_plusZ4);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + (vForward2 * new_Menu->CvarList.AimVars.Corps_plusY2 + vUp * new_Menu->CvarList.AimVars.Corps_plusZ4);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp - (vForward2 * new_Menu->CvarList.AimVars.Corps_moinY2 - vUp * new_Menu->CvarList.AimVars.Corps_plusZ4);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + (vRight2 * new_Menu->CvarList.AimVars.Corps_plusX2 + vUp * new_Menu->CvarList.AimVars.Corps_plusZ4);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp - (vRight2 * new_Menu->CvarList.AimVars.Corps_moinX2 - vUp * new_Menu->CvarList.AimVars.Corps_plusZ4);
- //
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + (vForward * new_Menu->CvarList.AimVars.Corps_plusY + vUp * new_Menu->CvarList.AimVars.Corps_plusZ5);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp - (vForward * new_Menu->CvarList.AimVars.Corps_moinY - vUp * new_Menu->CvarList.AimVars.Corps_plusZ5);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + (vRight * new_Menu->CvarList.AimVars.Corps_plusX + vUp * new_Menu->CvarList.AimVars.Corps_plusZ5);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp - (vRight * new_Menu->CvarList.AimVars.Corps_moinX - vUp * new_Menu->CvarList.AimVars.Corps_plusZ5);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + (vForward2 * new_Menu->CvarList.AimVars.Corps_plusY2 + vUp * new_Menu->CvarList.AimVars.Corps_plusZ5);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp - (vForward2 * new_Menu->CvarList.AimVars.Corps_moinY2 - vUp * new_Menu->CvarList.AimVars.Corps_plusZ5);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + (vRight2 * new_Menu->CvarList.AimVars.Corps_plusX2 + vUp * new_Menu->CvarList.AimVars.Corps_plusZ5);
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp - (vRight2 * new_Menu->CvarList.AimVars.Corps_moinX2 - vUp * new_Menu->CvarList.AimVars.Corps_plusZ5);
- //
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + vUp * new_Menu->CvarList.AimVars.Corps_plusZ;
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + vUp * new_Menu->CvarList.AimVars.Corps_plusZ2;
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + vUp * new_Menu->CvarList.AimVars.Corps_plusZ3;
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + vUp * new_Menu->CvarList.AimVars.Corps_plusZ4;
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)){
- m_vecPosition = vTmp + vUp2 * new_Menu->CvarList.AimVars.Corps_plusZ5;
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt)) { continue; }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- else { continue; }
- }
- if(!AutoWall(vEyePos,m_vecPosition,pBaseEnt))
- continue;
- nTarget = i;
- m_vecFinal = m_vecPosition;
- }
- }
- if(nTarget != -1)
- {
- QAngle lol;
- if(new_Menu->CvarList.AimVars.Autoshoot)
- c->buttons |= IN_ATTACK;
- if(new_Menu->CvarList.AimVars.Aim)
- CalculateAngle(vEyePos,m_vecFinal,c->viewangles);
- if(!new_Menu->CvarList.AimVars.Silentaim)
- {
- g_pCvar->FindVar("cl_mouseenable")->SetValue(0);
- g_pEngine->SetViewAngles(c->viewangles);
- }
- g_pRenderView->SetMainView(m_vecFinal,c->viewangles);
- g_pClient->SetCrosshairAngle(c->viewangles);
- g_pPrediction->SetLocalViewAngles(c->viewangles);
- g_pPrediction->SetViewAngles(c->viewangles);
- }
- else
- g_pCvar->FindVar("cl_mouseenable")->SetValue(1);
- }
- void cAimbot::Bot2(CUserCmd* c)
- {
- C_BaseEntity*pLocalPlayer = (C_BaseEntity*)g_pEntList->GetClientEntity( g_pEngine->GetLocalPlayer() );
- Reset();
- vEyePos = gNeeded.GetEyePosition(pLocalPlayer);
- int z[19] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18};
- for(int v = 0; v <= 18; ++v)
- {
- for(int i = 1; i <= g_pEntList->GetHighestEntityIndex(); i++)
- {
- C_BaseEntity* pBaseEnt = gNeeded.GetEntityByIndex(i);
- if(pBaseEnt == NULL)
- continue;
- if(pBaseEnt->index == pLocalPlayer->index)
- continue;
- if( stricmp( pBaseEnt->GetClientClass()->GetName(), "CCSPlayer" ) == 0 )
- {
- int nHealth = *(PINT)((DWORD)pBaseEnt + 0x90);
- if(!IsAlive(pLocalPlayer))
- continue;
- if(!IsAlive(pBaseEnt))
- continue;
- if(nHealth <= 0)
- continue;
- if(pBaseEnt->IsDormant())
- continue;
- if(!HasAmmo(pLocalPlayer))
- continue;
- if(pBaseEnt->GetTeamNumber() == pLocalPlayer->GetTeamNumber())
- continue;
- if(bHasMiscWeapon())
- continue;
- if(!testn00b(i,z[v],m_vecPosition,pBaseEnt))
- continue;
- //IsEnemyUsingAntiAim(pBaseEnt);
- vEyeEnemyPos = gNeeded.GetEyePosition(pBaseEnt);
- if(new_Menu->CvarList.AimVars.Prediction == 1)
- {
- g_Prediction.ReportMove(vEyePos,i);
- g_Prediction.ReportMove(vEyeEnemyPos,i);
- g_Prediction.ReportMove(m_vecPosition,i);
- Prediction(pLocalPlayer,pBaseEnt,m_vecPosition,vEyePos,vEyeEnemyPos,c);
- }
- if(!AutoWall2(vEyePos,m_vecPosition,pBaseEnt))
- continue;
- nTarget = i;
- m_vecFinal = m_vecPosition;
- }
- }
- }
- if(nTarget != -1)
- {
- if(new_Menu->CvarList.AimVars.Autoshoot)
- c->buttons |= IN_ATTACK;
- if(new_Menu->CvarList.AimVars.Aim)
- CalculateAngle(vEyePos,m_vecFinal,c->viewangles);
- if(!new_Menu->CvarList.AimVars.Silentaim)
- {
- g_pCvar->FindVar("cl_mouseenable")->SetValue(0);
- g_pEngine->SetViewAngles(c->viewangles);
- }
- g_pRenderView->SetMainView(m_vecFinal,c->viewangles);
- g_pClient->SetCrosshairAngle(c->viewangles);
- g_pPrediction->SetLocalViewAngles(c->viewangles);
- g_pPrediction->SetViewAngles(c->viewangles);
- }
- else
- g_pCvar->FindVar("cl_mouseenable")->SetValue(1);
- }
- void cAimbot::Bot3(CUserCmd* c)
- {
- C_BaseEntity*pLocalPlayer = (C_BaseEntity*)g_pEntList->GetClientEntity( g_pEngine->GetLocalPlayer() );
- Reset();
- vEyePos = gNeeded.GetEyePosition(pLocalPlayer);
- for(int i = 1; i <= g_pEntList->GetHighestEntityIndex(); i++)
- {
- C_BaseEntity* pBaseEnt = gNeeded.GetEntityByIndex(i);
- if(pBaseEnt == NULL)
- continue;
- if(pBaseEnt->index == pLocalPlayer->index)
- continue;
- if( stricmp( pBaseEnt->GetClientClass()->GetName(), "CCSPlayer" ) == 0 )
- {
- int nHealth = *(PINT)((DWORD)pBaseEnt + 0x90);
- if(!IsAlive(pLocalPlayer))
- continue;
- if(!IsAlive(pBaseEnt))
- continue;
- if(nHealth <= 0)
- continue;
- if(pBaseEnt->IsDormant())
- continue;
- if(!HasAmmo(pLocalPlayer))
- continue;
- if(pBaseEnt->GetTeamNumber() == pLocalPlayer->GetTeamNumber())
- continue;
- if(bHasMiscWeapon())
- continue;
- Vector vMin,vMax;
- if(!GetHitboxPositiontehrealone(i,12,m_vecPosition,c->viewangles,pBaseEnt,vMin,vMax))
- continue;
- IsEnemyUsingAntiAim(pBaseEnt);
- vEyeEnemyPos = gNeeded.GetEyePosition(pBaseEnt);
- if(new_Menu->CvarList.AimVars.Prediction == 1)
- {
- g_Prediction.ReportMove(vEyePos,i);
- g_Prediction.ReportMove(vEyeEnemyPos,i);
- g_Prediction.ReportMove(m_vecPosition,i);
- Prediction(pLocalPlayer,pBaseEnt,m_vecPosition,vEyePos,vEyeEnemyPos,c);
- }
- if(!AutoWall2(vEyePos,m_vecPosition,pBaseEnt))
- continue;
- nTarget = i;
- m_vecFinal = m_vecPosition;
- }
- }
- if(nTarget != -1)
- {
- if(new_Menu->CvarList.AimVars.Autoshoot)
- c->buttons |= IN_ATTACK;
- if(new_Menu->CvarList.AimVars.Aim)
- CalculateAngle(vEyePos,m_vecFinal,c->viewangles);
- if(!new_Menu->CvarList.AimVars.Silentaim)
- {
- g_pCvar->FindVar("cl_mouseenable")->SetValue(0);
- g_pEngine->SetViewAngles(c->viewangles);
- }
- g_pRenderView->SetMainView(m_vecFinal,c->viewangles);
- g_pClient->SetCrosshairAngle(c->viewangles);
- g_pPrediction->SetLocalViewAngles(c->viewangles);
- g_pPrediction->SetViewAngles(c->viewangles);
- }
- else
- g_pCvar->FindVar("cl_mouseenable")->SetValue(1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement