blablablaido (10-09-2010),cgallagher21 (10-09-2010)
#include "stdafx.h"
cAimbot_t AIMBOT;
float *ViewAngleX = (float *)0xF6B318;
float *ViewAngleY = (float *)0xF6B314;
float cAimbot_t::distance( vec3_t origin )
{
vec3_t vector;
VectorSub( origin, ref->vieworg, vector );
return ( sqrt( vector[0] * vector[0] + vector[1] * vector[1] + vector[2] * vector[2] ) );
}
char *HeadBodyTags[] =
{
"head",//1
"neck",//2
};
vec3_t aimpoint;
bool isAutoAiming=false;
void cAimbot_t::Aimshoot()
{
static int fire_state=0;
if(fire_state )
{
fire_state=0;
CG_trap_SendConsoleCommand(1,1,"-attack\n" );
}
else if(!fire_state && isAutoAiming )
{
fire_state=1;
CG_trap_SendConsoleCommand(1,1,"+attack\n" );
}
}
bool cAimbot_t::getVisibleBoneTag(centity_t *cent,vec3_t *origin)
{
if (!MISC.GetTagForAimbot(cent,&aimpoint))
{
return qfalse;
}
aimpoint[2] += 7.5;
vec3_t trDelta;
float CG_PING=(PlayerSnap->ping)/50;
VectorSubtract(cent->lerpOrigin_3, cent->lerpOrigin_2, trDelta);
VectorMA(aimpoint,CG_PING,trDelta, aimpoint);
if (MISC.IsVisible( aimpoint))
{
return qtrue;
}
return qfalse;
}
int cAimbot_t::AimAtFirstClient()
{
float leastDist=99999;
int clientNum = -1;
for( int i = 0; i < cgs->maxclients; i++ )
{
if( (cg_entities[i].Alive && cg_entities[i].Valid ) && (cg->clientNum != i))
{
if(clientInfo[i].team != clientInfo[ cg->clientNum ].team || clientInfo[ i ].team == TEAM_FREE)
{
if( getVisibleBoneTag(&cg_entities[i],&aimpoint) )
{
if(distance(aimpoint)<leastDist)
{
leastDist = distance(aimpoint);
clientNum=i;
}
}
}
}
}
if(clientNum!=-1)
{
return clientNum;
}
return clientNum;
}
void cAimbot_t::AimTarget(int i)
{
if(i!=-1)
{
float aX, aY;
isAutoAiming = true;
getVisibleBoneTag(&cg_entities[i],&aimpoint);
MISC.VectorToViewangles(aimpoint, aX, aY);
*ViewAngleX += aX;
*ViewAngleY += aY;
}
}
--------------------------------------------------------------------------------
Credit s go to me for posting
and vicente95 for makeing this source i hope to see some aimbots up soon /yea
blablablaido (10-09-2010),cgallagher21 (10-09-2010)
HOLY SHIT.
THATS AMAZING!
looks kinda small
not my fault im just posting
Probably u will have to change x,y and etc... values.
It's from cod4 / MW2..
See the "+attack" command?
Fail* he didnt tell me what section *facepalms*
hahahaa xD
You shall not pass.
/moved to MW2 source code section.
Insane (10-09-2010)
im going to repost in mw2 and cod4 section request close so i dont get banned