but i tried a few methods /simple ways to load the vecs in game any ideas?
//========================================================================================================================================================= // CSS vector aimbot // by hybOr // todo: // write a function that loads vectors in-game // actually figure out some good vecs for it ;p //========================================================================================================================================================= class myVectors { public: float x,y,z; public: myVectors(){ clearVecs(); } ~myVectors(){ clearVecs(); } public: void setVecs(float newX,float newY,float newZ){ x=newX; y=newY; z=newZ; } void clearVecs(){ x=0; y=0; z=0; } }; //========================================================================================================================================================= myVectors m_Vecs; //========================================================================================================================================================= void vectorAim(CUserCmd* pUserCommand){ Vector vPlayerAngles; iTarget=-1; for( int iIndex = 1; iIndex <= m_pEngine->GetMaxClients(); ++iIndex ){ IClientEntity* ClientEntity = m_pEntList->GetClientEntity( iIndex ); if (ClientEntity == NULL||ClientEntity->IsDormant())continue; CBaseEntity* pBaseEntity = ClientEntity->GetBaseEntity(); if (pBaseEntity == NULL)continue; int iLifeState = *(int*)((DWORD)pBaseEntity+(DWORD)0x87); if (iIndex != m_pEngine->GetLocalPlayer()&&(getVisible( m_pMyPlayer->BaseEnt()->EyePosition(), pBaseEntity->EyePosition(), pBaseEntity ))&&(iLifeState==LIFE_ALIVE)&&(pBaseEntity->GetTeamNumber() != m_pMyPlayer->BaseEnt()->GetTeamNumber())){ vPlayerAngles = pBaseEntity->GetAbsOrigin(); vPlayerAngles.x -= m_Vecs.x; vPlayerAngles.y -= m_Vecs.y; vPlayerAngles.z -= m_Vecs.z; iTarget = iIndex; break; }else continue; } if(iTarget==-1)return; double flDelta[3] = { (m_pMyPlayer->BaseEnt()->EyePosition()[0]-vPlayerAngles[0]), (m_pMyPlayer->BaseEnt()->EyePosition()[1]-vPlayerAngles[1]), (m_pMyPlayer->BaseEnt()->EyePosition()[2]-vPlayerAngles[2]) }; double flHyp = sqrt(flDelta[0]*flDelta[0] + flDelta[1]*flDelta[1]); pUserCommand->viewangles[0] = (float) (atan(flDelta[2]/flHyp) * 57.295779513082f); pUserCommand->viewangles[1] = (float) (atan(flDelta[1]/flDelta[0]) * 57.295779513082f); pUserCommand->viewangles[2] = 0.0f; if(flDelta[0] >= 0.0) { pUserCommand->viewangles[1] += 180.0f; } m_pEngine->SetViewAngles( pUserCommand->viewangles ); } //========================================================================================================================================================= bool getVisible( Vector& vAbsStart, Vector& vAbsEnd, C_BaseEntity* pBaseEnt ) { player_info_t pInfo; trace_t pTrace; Ray_t pRay; pRay.Init( vAbsStart, vAbsEnd ); m_pEnginetrace->TraceRay( pRay, MASK_NPCWORLDSTATIC|CONTENTS_SOLID|CONTENTS_MOVEABLE|CONTENTS_MONSTER|CONTENTS_WINDOW|CONTENTS_DEBRIS|CONTENTS_HITBOX, NULL, &pTrace ); if ( pTrace.fraction > 0.96f ) return true; else return false; } //=========================================================================================================================================================
thats the aimbot..
if anyone knows/ how to load the vecs in please help me out:P
Comment