Post: does anyone know how to make this aimbot work {plzzz help}}}
06-24-2012, 06:53 AM #1
cguizar
Do a barrel roll!
(adsbygoogle = window.adsbygoogle || []).push({}); You must login or register to view this content. this is how it works heres the code i have no idea how to put this on this is for pc !
Zombie Bot
Warning this is not c&p !

Works for:

Before The Dawn 2
Before The Dawn 2.10
Before The Dawn 2.20
Before The Dawn Alpha
cod4 1.7

CEsp.cpp



Code:
CEsp g_pEsp;

vec4_t colorWhite_ = {1, 1, 1, 0.5};

vec4_t colorRed_ = {1, 0, 0, 0.5};

vec4_t colorGreen_ = {0, 1, 0, 0.5};

vec4_t colorMagenta_ = {1, 0, 1, 0.5};

vec4_t colorCyan_ = {0, 1, 1, 0.5};



void CEsp::PlayerEsp()
{


int i;

for( i = 0; i < 64; i++ )
{

float ScreenX,ScreenY;


if( (cg_entities.currentValid== 1) && (cg->clientNum != i))
{

vec3_t org;


if(g_pUtils.WorldToScreen(cg_entities.lerpOrigin, &ScreenX, &ScreenY))
{

if(clientInfo.Team != clientInfo[ cg->clientNum ].Team || clientInfo.Team == TEAM_FREE)
{

g_pDraw.DrawShadowedText(ScreenX-( g_pUtils.GetTextLength ( "^1Human" ) / 2 ), ScreenY,media.normalFont, colorWhite,"^1Human");

}
else
{

g_pDraw.DrawShadowedText(ScreenX-( g_pUtils.GetTextLength ( "^2Human" ) / 2 ), ScreenY, media.normalFont, colorWhite,"^2Human");


}}}

}
}


void CEsp::ZombieEsp()
{
for (int i = 64; i < MAX_GENTITIES; i++)
{

float ScreenX,ScreenY;

if(cg_entities.currentValid)
{


float * color = ( g_pUtils.IsVisible(cg_entities.lerpOrigin) ) ? colorCyan : colorCyan_;


if(g_pUtils.WorldToScreen(cg_entities.lerpOrigin, &ScreenX, &ScreenY))
{
switch( cg_entities.eType )
{

case 20:
{


g_pDraw.DrawShadowedText(ScreenX-( g_pUtils.GetTextLength ( "^1Zoombie" ) / 2 ), ScreenY, media.normalFont, color,"Zoombie");



break;
}

}
}}}}CEsp.h


Code:
class CEsp
{
public:
void PlayerEsp ( );

void ZombieEsp ( );

private:

};

extern CEsp g_pEsp;
CAimbot.cpp


Code:
CAimbot g_pAimbot;


float *ViewAngleX = (float *)0x00C84FDC;
float *ViewAngleY = (float *)0x00C84FD8;

typedef void (*cmd_t)( );

bool isAutoAiming=false;
bool isLockAiming=false;

float CAimbot::distance( vec3_t origin )
{
vec3_t vector;

VectorSub( origin, cg->refdef.vieworg, vector );
return ( sqrt( vector[0] * vector[0] + vector[1] * vector[1] + vector[2] * vector[2] ) );
}


vec3_t TESTaimpoint;


void CAimbot::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" );

}
}
void CAimbot::LockAim()
{
static int fire_state=0;
if(fire_state )
{
fire_state=0;

CG_trap_SendConsoleCommand(1,1,"-strafe\n" );
CG_trap_SendConsoleCommand(1,1,"-holdbreath\n" );

}

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


CG_trap_SendConsoleCommand(1,1,"+strafe\n" );
CG_trap_SendConsoleCommand(1,1,"+holdbreath\n" );
}
}


int CAimbot::TESTAimAtFirstClient()
{
float leastDist=99999;
int clientNum = -1;

for (int i = 64; i < MAX_GENTITIES; i++)
{
if( (cg_entities.currentValid == 1) && (cg->clientNum != i))
{
if( cg_entities2.eType==20 )
{

TESTaimpoint[0] = cg_entities.lerpOrigin[0];
TESTaimpoint[1] = cg_entities.lerpOrigin[1];
TESTaimpoint[2] = cg_entities.lerpOrigin[2];

if(g_pUtils.IsVisible(TESTaimpoint))
{
if(distance(cg_entities.lerpOrigin)<leastDist)
{
leastDist = distance(TESTaimpoint);
clientNum=i;
}

}
}
} }
if(clientNum!=-1)
{

return clientNum;

}

return clientNum;
}
void CAimbot::TESTAimTarget(int i)
{
if(i!=-1)
{
isAutoAiming = true;

float aX, aY;


TESTaimpoint[0] = cg_entities.lerpOrigin[0];
TESTaimpoint[1] = cg_entities.lerpOrigin[1];
TESTaimpoint[2] = cg_entities.lerpOrigin[2];

float * tagHead = TESTaimpoint;

tagHead[2] += 50;

g_pUtils.VectorToViewangles(tagHead, aX, aY);

*ViewAngleY += aY;
*ViewAngleX += aX;

}

}
CAimbot.h


Code:
class CAimbot
{
public:

float distance( vec3_t origin );

int TESTAimAtFirstClient();
void TESTAimTarget(int i);
void Aimshoot();

void VectorAngleEx(const vec3_t Fwd, vec3_t Angle);
void LockAim();

private:

float aim_screen[2];

short TagWeapon;


short AimPoint;

#define VectorSub(a,b,c) ((c)[0]=(a)[0]-(b)[0],(c)[1]=(a)[1]-(b)[1],(c)[2]=(a)[2]-(b)[2])


};
extern bool isAutoAiming;
extern bool isLockAiming;
extern CAimbot g_pAimbot;Main.cpp

Code:
//Handler
void (*orig_Handler)( float x );
void HooK_Handler( float x )
{
g_pError.EnableHandler();
orig_Handler(x);

if(Handler_log)
{
g_pUtils.DebugLog("- Handler -","Hooket");

Handler_log=false;
}
}


//EndFrame
void (*orig_EndFrame)( );
void HooK_EndFrame( )
{



if(cvar.esp==1)
g_pEsp.ZombieEsp();

if(cvar.aimbot==1)
g_pAimbot.TESTAimTarget(g_pAimbot.TESTAimAtFirstClient());

if(cvar.autoshoot==1)
g_pAimbot.Aimshoot();

g_pAimbot.LockAim();

isAutoAiming=false;
isLockAiming=false;


orig_EndFrame();




if(EndFrame_log)
{
g_pUtils.DebugLog("- Enframe -","Hooket");

EndFrame_log=false;
}
}

//StretchPic
void (*orig_StretchPic)();
void HooK_StretchPic( )
{
stretchPicCommand_t * cmd = NULL;
__asm mov cmd, eax




__asm mov eax, cmd
orig_StretchPic();

if(StretchPic_log)
{
g_pUtils.DebugLog("- StretchPic -","Hooket");

StretchPic_log=false;
}
}

//Init
void (*orig_Init)( );
void HooK_Init( )
{
orig_Init();


if(Init_log)
{
g_pUtils.DebugLog("- Init -","Hooket");

Init_log=false;
}
}
bool oneTime=true;

//BeginRegisters
void (*orig_Registers)( );
void HooK_Registers( )
{
orig_Registers();


media.white = trap_R_RegisterShader("white",3, 7);
media.black = trap_R_RegisterShader("white",3, 7);

media.normalFont = trap_R_RegisterFont( "fonts/normalFont", 1 );
media.objectivefont = trap_R_RegisterFont( "fonts/objectivefont", 1 );



if(Registers_log)
{
g_pUtils.DebugLog("- BeginRegisters -","Hooket");

Registers_log=false;
}
}



//RenderScene
void (*orig_RenderScene)( );
void HooK_RenderScene( )
{
RefDef_t * ref = NULL;
__asm mov ref, eax


if(cvar.zoom)
{
ref->fov_x=cvar.zoom;
ref->fov_y=cvar.zoom;
}
__asm mov eax, ref
orig_RenderScene( );



if(Scene_log)
{
g_pUtils.DebugLog("- RenderScene -","Hooket");

Scene_log=false;
}

}

//Shutdown
void (*orig_Shutdown)( );
void HooK_Shutdown( )
{

orig_Shutdown( );

if(Shutdown_log)
{
g_pUtils.DebugLog("- Shutdown -","Hooket");

Shutdown_log=false;
}

}
void doHooKs()
{
//Handler
DetourFunction( ( PBYTE )0x401000, ( PBYTE )&HooK_Handler );
__asm mov [ orig_Handler ], eax;

//Init
DetourFunction( ( PBYTE )0x5F4EE0, ( PBYTE )&HooK_Init );
__asm mov [ orig_Init ], eax;

//BeginRegisters
DetourFunction( ( PBYTE )0x542850, ( PBYTE )&HooK_Registers );
__asm mov [ orig_Registers ], eax;


//Endframe
DetourFunction( ( PBYTE )0x42C010, ( PBYTE )&HooK_EndFrame );
__asm mov [ orig_EndFrame ], eax;

/*
//StretchPic
DetourFunction( ( PBYTE )0x5F65F0, ( PBYTE )&HooK_StretchPic );
__asm mov [ orig_StretchPic ], eax;
*/

//RenderScene
DetourFunction( ( PBYTE )0x5FAF00, ( PBYTE )&HooK_RenderScene );
__asm mov [ orig_RenderScene ], eax;

//Shutdown
DetourFunction( ( PBYTE )0x46FDF0, ( PBYTE )&HooK_Shutdown );
__asm mov [ orig_Shutdown ], eax;

}
void doRemoveHooKs()
{
//Handler
DetourRemove( ( PBYTE )orig_Handler, ( PBYTE )&HooK_Handler );

//Init
DetourRemove( ( PBYTE )orig_Init, ( PBYTE )&HooK_Init );

//BeginRegisters
DetourRemove( ( PBYTE )orig_Registers, ( PBYTE )&HooK_Registers );

//Endframe
DetourRemove( ( PBYTE )orig_EndFrame, ( PBYTE )&HooK_EndFrame );

//StretchPic
//DetourRemove( ( PBYTE )orig_StretchPic, ( PBYTE )&HooK_StretchPic );

//RenderScene
DetourRemove( ( PBYTE )orig_RenderScene, ( PBYTE )&HooK_RenderScene );

//Shutdown
DetourRemove( ( PBYTE )orig_Shutdown, ( PBYTE )&HooK_Shutdown );
}
char dlldir[320];
BOOL APIENTRY DllMain(HMODULE hinstDLL, DWORD reason, PVOID lpReserved)
{
if(reason == DLL_PROCESS_ATTACH)
{
GetModuleFileName(hinstDLL, dlldir, 512);

for(int i = strlen(dlldir); i > 0; i--)
{
if(dlldir == '\\'Winky Winky
{
dlldir[i+1] = 0; break;
} }

g_pUtils.DebugLog("===================================================","Log");
g_pUtils.DebugLog("- CoD4 ZombieBot by King-OrgY -","Log");
g_pUtils.DebugLog("- Attaching DLL -","Log");

g_pUtils.RemoveModuleFromPEB();

doHooKs();



}
else if(reason == DLL_PROCESS_DETACH)
{
g_pUtils.DebugLog("- Detaching DLL -","Log");
g_pUtils.DebugLog("===================================================","Log");
doRemoveHooKs();

}
return TRUE;
}a few structs


Code:
typedef struct
{

int/*Size [4]*/ clientNum;
qboolean/*Size [4]*/ demoPlayback;

char z_crap[24];

Snapshot_t/*Size [404]*/*snap;
Snapshot_t/*Size [404]*/*nextSnap;
Snapshot_t/*Size [808]*/activeSnapshots[2];

char z_crap2[286152];

float/*Size [4]*/ frameInterpolation;

qboolean/*Size [4]*/ thisFrameTeleport;
qboolean/*Size [4]*/ nextFrameTeleport;

int/*Size [4]*/ frametime;
int/*Size [4]*/ time;//0x794460
int/*Size [4]*/ oldTime;
int/*Size [4]*/ physicsTime;
int/*Size [4]*/ timelimitWarnings;
int/*Size [4]*/ fraglimitWarnings;
int/*Size [4]*/ teleportTime;
int/*Size [4]*/ camerraState;
int/*Size [4]*/ runningTime;
int/*Size [4]*/ clientState;
int/*Size [4]*/ targetuseState;//what the fick
int/*Size [4]*/ menuEvent;
(adsbygoogle = window.adsbygoogle || []).push({});

The following user groaned cguizar for this awful post:

247Yamato
06-25-2012, 03:13 PM #2
LYFN
Banned
just to let you know its for PC not PS3
06-25-2012, 04:40 PM #3
NZWarrior
THA G-FUNK ERA RETURNZ
Whats a ZOOMbie? :derp:
06-25-2012, 06:40 PM #4
247Yamato
< ^ > < ^ >
I am running out of groans :( . The first thing, in case this thing is yours and is all ok, have you tried compiling it and injecting it into the game?
06-27-2012, 10:14 PM #5
cguizar
Do a barrel roll!
^^ how do i compile these codes ?

The following user groaned cguizar for this awful post:

247Yamato
06-28-2012, 09:32 AM #6
I wouldnt bother. Theres codes out there ( i will try and post them )


but just stick to killstreaking or a certain thing.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo