[SOURCE]Generic Aimbot :D

Researching, Proof of Concepts, Hacking, Console Modding and Hacking and more. No game hacking / modding here.
Post Reply
TeamRetox
Allie
Allie
Posts: 222
Joined: Sat Jun 06, 2009 3:48 pm

[SOURCE]Generic Aimbot :D

Post by TeamRetox »

All you need to do is save this code as a .h file, include it in your project and call the functions :D

Code: Select all

/*========================================================================================
	Visit:
	www.sethioz.co.uk

	Credits:
	TeamRetox - :D
	sreaG - <3
	
	This file may be used and/or spread on teh
	internetz as long as you keep these credits intact

	Usage:
	CAimbot mybot;
	mybot.CalcAim(MyX, MyY, MyZ, EnemyX, EnemyY, EnemyZ, true) for aiming in degrees
	mybot.CalcAim(MyX, MyY, MyZ, EnemyX, EnemyY, EnemyZ, false) for aiming in radians
	after CalcAim you can write mybot.rX and mybot.rY to your rotation
========================================================================================*/

#ifndef CAimbot_H
#define CAimbot_H
#include <math.h>

//comment these out if their already defined :)
#define M_PI 3.14159265359f
#define RadToDeg 57.2957795130f

class CAimbot
{
public:
	void CalcAim(float pX, float pY, float pZ, float eX, float eY, float eZ, bool degrees)
	{
		float dX, dY;
		/*Sector 1 = South-East of our position*/
		if(pX > eX && pY <= eY)
		{
			dX = (eX-pX);
			dY = (pY-eY);
			rX = (M_PI-atan(dY/dX));
		}
		/*Sector 2 = South-West of our position*/
		else if(pX >= eX && pY > eY)
		{
			dX = (pX-eX);
			dY = (pY-eY);
			rX = (M_PI+atan(dY/dX));
		}
		/*Sector 3 = North-West of our position*/
		else if(pX < eX && pY >= eY)
		{
			dX = (pX-eX);
			dY = (eY-pY);
			rX = (M_PI*2-atan(dY/dX));
		}
		/*Sector 4 = North-East of our position*/
		else if(pX <= eX && pY < eY)
		{
			dX = (eX-pX);
			dY = (eY-pY);
			rX = (0.0f+atan(dY/dX));
		}
		float distance;
		distance = sqrt((dX*dX)+(dY*dY));
		if(pZ <= eZ)
		{
			rY = 0.0f+atan((eZ-pZ)/distance);
		}
		else if(pZ > eZ)
		{
			rY = 0.0f-atan((pZ-eZ)/distance);
		}
		if(degrees==true)
		{
			rX = (rX * RadToDeg);
			rY = (rY * RadToDeg);
		}
	}
	float rX, rY;
};
#endif
User avatar
Sethioz
Admin
Admin
Posts: 4762
Joined: Fri Jul 27, 2007 5:11 pm
Custom: Gaming YT > https://youtube.com/SethiozEntertainment
Game Hacking YT > https://youtube.com/sethioz
Game Hacks Store > https://sethioz.com/shopz
Location: unknown
Contact:

Re: [SOURCE]Generic Aimbot :D

Post by Sethioz »

.h or .c ? or how exactly you compile it ?
TeamRetox
Allie
Allie
Posts: 222
Joined: Sat Jun 06, 2009 3:48 pm

Re: [SOURCE]Generic Aimbot :D

Post by TeamRetox »

.h, and you just #include it into your project, set up the aimbot(CAimbot myaimbot;) at the top, pass your coordinates and the enemy's coordinates + true/false(depending on if u want radians or degrees) and then assign myaimbot.x and myaimbot.y to your player's rotation
User avatar
Sethioz
Admin
Admin
Posts: 4762
Joined: Fri Jul 27, 2007 5:11 pm
Custom: Gaming YT > https://youtube.com/SethiozEntertainment
Game Hacking YT > https://youtube.com/sethioz
Game Hacks Store > https://sethioz.com/shopz
Location: unknown
Contact:

Re: [SOURCE]Generic Aimbot :D

Post by Sethioz »

ah its the aimbot function, if i can call it that way. im just not that good with programming.
some time ago i tried to add 'mybrute' (Luigi's bruteforce function) to something, but messed it up, thats pretty much only time when i have tried to include something like this to a project (program).
Post Reply