PDA

View Full Version : basic aimbot



STR
18-01-08, 08:15
#include "sdk.h"

cAimHelper::cAimHelper()
{
vPlayer.Init(0,0,0);
vFinal.Init(0,0,0);
iTarget = -1;
}

bool cAimHelper::CheckPlayerVisibility( C_BaseEntity* pBaseEntity )
{
//improve me
ray.Init( Me.BaseEnt()->EyePosition(), vPlayer );
m_pEnginetrace->TraceRay( ray ,MASK_ALL, 0, &tr );
if ( tr.fraction > 0.97 )
return true;
else
return false;
}
bool cAimHelper::GetHitBox( C_BaseEntity* pBaseEntity )
{
//improve me.
matrix3x4_t pmatrix[MAXSTUDIOBONES];
studiohdr_t *studeo_hedah = m_pModelinfo->GetStudiomodel((model_t*)pBaseEntity->GetModel());
if(!pBaseEntity->SetupBones( pmatrix, MAXSTUDIOBONES, BONE_USED_BY_HITBOX, m_pGlobals->curtime ))
return false;
for(int iNumHitBoxSets = 0; iNumHitBoxSets < studeo_hedah->numhitboxsets;iNumHitBoxSets++)
{
for(int iHitboxCount = 0; iHitboxCount < studeo_hedah->iHitboxCount(iNumHitBoxSets); iHitboxCount++)
{
mstudiobbox_t* Area = studeo_hedah->pHitbox(iHitboxCount, iNumHitBoxSets);
if(Area->bone == RawrICopyPaste)
{
VectorTransform(Area->bbmin, pmatrix[ Area->bone ], vMin);
VectorTransform(Area->bbmax, pmatrix[ Area->bone ], vMax);
vPlayer = (vMin + vMax) * 0.5f;
}
}
}
return true;
}
void cAimHelper::AdjustVectors()
{
Vector vDeltaOrigin = Vector(
cvars.proofens_adjust_x.flGetValue(),
cvars.proofens_adjust_y.flGetValue(),
cvars.proofens_adjust_z.flGetValue()
);
VectorCopy( vPlayer + vDeltaOrigin, vFinal );
//add some kind of ping corrections etc here
}
bool cAimHelper::CheckAll( C_BaseEntity* pBaseEntity )
{
if( !m_pEngine->GetPlayerInfo( pBaseEntity->index , &m_pPlayerInfo ))
return false;
if( !gESP.IsAlive( pBaseEntity ) )
return false;
if( pBaseEntity->GetTeamNumber() == Me.BaseEnt()->GetTeamNumber() )
return false;
if( !GetHitBox( pBaseEntity ))
return false;
if( !CheckPlayerVisibility( pBaseEntity ))
return false;
if( hMaths.FOV( Me.BaseEnt()->GetAbsAngles(), Me.BaseEnt()->EyePosition(), vPlayer ) > cvars.proofens_fov.iGetValue() )
return false;
iTarget = pBaseEntity->index;
AdjustVectors();
return true;
}
void cAimHelper::SetAngle( CUserCmd* pUserCmd )
{
iTarget = -1;

for( int index = 1; index < m_pEntList->GetHighestEntityIndex(); ++index )
{
if ( index == m_pEngine->GetLocalPlayer() ) continue;
IClientEntity* ClientEntity = m_pEntList->GetClientEntity( index );
if ( ClientEntity == NULL||ClientEntity->IsDormant() ) continue;
CBaseEntity* pBaseEntity = ClientEntity->GetBaseEntity();
if ( CheckAll( pBaseEntity ) )
continue;
}
if( iTarget < 1)
return;

hMaths.CalcAngle( Me.BaseEnt()->EyePosition(), vFinal, pUserCmd->viewangles );
m_pEngine->SetViewAngles( pUserCmd->viewangles );
if( cvars.proofens_autoshoot.iGetValue() == 1 )
m_pInput->MouseEvent( 1, true );
}


class cAimHelper
{
public:
cAimHelper();
bool CheckPlayerVisibility( C_BaseEntity* pBaseEntity );
void AdjustVectors();
bool GetHitBox( C_BaseEntity* pBaseEntity );
bool CheckAll( C_BaseEntity* pBaseEntity );
void SetAngle( CUserCmd* cmd );
int iTarget;
Vector vPlayer,vFinal,vMin,vMax;
trace_t tr;
Ray_t ray;
player_info_t m_pPlayerInfo;
};

Helo
18-01-08, 08:20
nice fum7n ^^ good to learn out of it!

thx,
Helo

coolboy
20-01-08, 12:46
n1 fumin .... is that for cs:s?
can i compile this with an other software as visual studio?

coolboy
22-01-08, 07:03
i cant compile this hack ... can you explan me howto? what to open project/file and then what where to write? pls?

n0n3
23-01-08, 04:17
rofl //improve me
cAimHelper right...

coolboy
23-01-08, 06:23
pleasee help me i cant get it :((( just errors while compiling the dll.
visual studio 03 .net

FerlasSoram
17-02-08, 04:10
thx i used this it rocked

Savage Northern Rat
17-02-08, 04:29
thx i used this it rocked

Epic..bump, necroposting nigger.

toppn
26-02-08, 06:43
ty

toppn
26-02-08, 06:43
is this for css?

toppn
26-02-08, 06:44
and do i just copy this to the code page in vb?

toppn
26-02-08, 06:45
1 more question, if i use this when im done can i go on to vac servers??

tpablo221
03-03-08, 08:18
thats very basic

Un1ver$al
03-03-08, 08:19
Ty fum1n ur teh best** still**

shadowkiller198
15-03-08, 01:29
hmm dont know nothink about programming

toffe32
15-03-08, 05:27
thanks!

chasexp
17-03-08, 08:59
:OOOOO

Chillo1415
20-03-08, 10:39
yes

Roberts91
01-04-08, 10:30
Nice I didn't know thats all required to make a hack your basically just making a class. The only thing I don't get is how do you make it vac secured you just hide the .exe?... Seems pretty simple. :D

mencore
06-08-08, 12:15
oh rifk, these replies here are getting epic :D

Supreme
26-11-08, 10:16
ill try it out later ;)