Simple aimbot source code

Posts 1–15 of 24 · Page 1 of 2
Simple aimbot source code
#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
HOLY SHIT.

THATS AMAZING!
Quote Originally Posted by AVGN View Post
looks kinda small
It doesnt work >.>
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?
Quote Originally Posted by Synns View Post
It's from cod4 / MW2..

See the "+attack" command?
[php]
CG_trap_SendConsoleCommand(1,1,"-attack\n" );
}

else if(!fire_state && isAutoAiming )
{
fire_state=1;

CG_trap_SendConsoleCommand(1,1,"+attack\n" );
[/php]
Fail* he didnt tell me what section *facepalms*
Quote Originally Posted by Synns View Post
It's from cod4 / MW2..

See the "+attack" command?
Quote Originally Posted by yusako View Post
Fail* he didnt tell me what section *facepalms*

this is hilarious
hahahaa xD
Wrong section then?
This is hilarious.
/moved to MW2 source code section.
im going to repost in mw2 and cod4 section request close so i dont get banned
Posts 1–15 of 24 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us