Post: [RELEASE] Black Ops 2 1.16 Fair aimbot function C# Code
04-27-2014, 10:08 PM #1
iMP3Rz
Haxor!
(adsbygoogle = window.adsbygoogle || []).push({}); Hello NextgenUpdate Today me and my friend decide to release this C# aimbot 1.16

Hope you guys will enjoy it

Here is a little video with it in action:
#This was before we modifed it, its better now :-)





C# Aimbot Function:

public class Offsets
{
public static uint
g_client = 0x177E928,
clientSize = 0x5808,
g_entity = 0x16B7920,
entitySize = 0x31C,
setClientViewAngles = 0x001E1D90;
}
public static float[] ReadSingle(uint address, int length)
{
byte[] memory = PS3.Extension.ReadBytes(address, length * 4);
ReverseBytes(memory);
float[] numArray = new float[length];
for (int index = 0; index < length; ++index)
numArray[index] = BitConverter.ToSingle(memory, (length - 1 - index) * 4);
return numArray;
}

public static byte[] ReverseBytes(Byte[] toReverse)
{
Array.Reverse(toReverse);
return toReverse;
}
public static void WriteSingle(UInt32 address, float[] input)
{
Int32 length = input.Length;
Byte[] array = new Byte[length * 4];
for (Int32 i = 0; i < length; i++)
{
ReverseBytes(BitConverter.GetBytes(input)).CopyTo(array, (Int32)(i * 4));
}
PS3.SetMemory(address, array);
}

public static uint G_Client2(int client)
{
return Offsets.g_client + (Offsets.clientSize * (uint)client);
}
public static uint G_Entity2(int client)
{
return Offsets.g_entity + (Offsets.entitySize * (uint)client);
}
public static float[] getOrigin(int client)
{
return ReadSingle(G_Client2(client) + 0x28, 3);
}
public static float[] vectoangles(float[] Angles)
{
float num2;
float num3;
float[] numArray = new float[3];
if ((Angles[1] == 0f) && (Angles[0] == 0f))
{
num2 = 0f;
if (Angles[2] > 0f)
{
num3 = 90f;
}
else
{
num3 = 270f;
}
}
else
{
if (Angles[0] != -1f)
{
num2 = (float)((Math.Atan2((double)Angles[1], (double)Angles[0]) * 180.0) / 3.1415926535897931);
}
else if (Angles[1] > 0f)
{
num2 = 90f;
}
else
{
num2 = 270f;
}
if (num2 < 0f)
{
num2 += 360f;
}
float num = (float)Math.Sqrt((double)((Angles[0] * Angles[0]) + (Angles[1] * Angles[1])));
num3 = (float)((Math.Atan2((double)Angles[2], (double)num) * 180.0) / 3.1415926535897931);
if (num3 < 0f)
{
num3 += 360f;
}
}
numArray[0] = -num3;
numArray[1] = num2;
return numArray;
}
public static Boolean isAlive(int client)
{
Int32 alive = PS3.Extension.ReadInt16(0x1783EFB + 0x5808 * (uint)client);
return (alive == 0);
}
public static Boolean isSameTeam(int shooter, int victim)
{
Byte shooterTeam = PS3.Extension.ReadByte(0x1783E2F + (uint)shooter * 0x580;
Byte victimTeam = PS3.Extension.ReadByte(0x1783E2F + (uint)victim * 0x580;
return (shooterTeam == victimTeam);
}

public static float[] getVector(int shooter, int victim)
{
float[] numArray = getOrigin(shooter);
float[] numArray2 = getOrigin(victim);
return new float[] { (numArray2[0] - numArray[0]), (numArray2[1] - numArray[1]), (numArray2[2] - numArray[2]) };
}
public static int nearestPlayer(int shooter)
{
int victim = -1;
float closest = float.MaxValue;
for (int i = 0; i < 12; i++)
{
float XYZ = getOrigin(shooter)[0] - getOrigin(i)[0];
float distance = (float)Math.Sqrt(XYZ * XYZ);
if (isAlive(i) && !isSameTeam(shooter, i))
{
if (distance < closest)
{
victim = i;
closest = distance;
}
}
}
return victim;
}
public static int nearestPlayerFREEFORALL(int shooter)
{
int victim = 0;
double closest = 999999999999999;
for (int i = 0; i < 12; i++)
{
Single xyz = getOrigin(i)[0] - getOrigin(shooter)[0];
Double distance = (Double)Math.Sqrt(xyz * xyz);
if ((i != shooter))
{
if (distance < closest)
{
victim = i;
closest = distance;
}
}
}
return victim;
}
public static void setClientViewAngles(int client)
{
if (PS3.Extension.ReadInt32(G_Client2(client) + 0x5504) == 0)
{
int victim = nearestPlayerFREEFORALL(client);
float[] angles = vectoangles(getVector((int)client, (int)victim));
WriteSingle(0x10004000, angles);
RPC.Call(Offsets.setClientViewAngles, new object[] { G_Entity2(client), 0x10004000, angles });
}
else
{
int victim = nearestPlayer(client);
float[] angles = vectoangles(getVector((int)client, (int)victim));
WriteSingle(0x10004000, angles);
RPC.Call(Offsets.setClientViewAngles, new object[] { G_Entity2(client), 0x10004000, angles });
}
}
public static byte[] ReverseBytes(byte[] inArray)
{
Array.Reverse(inArray);
return inArray;
}


Credits Goes To Those Awsome Guys:

Me (iMP3Rz / Patrick) & Daqe - For Port to B.O.2 & Modify code
-----------------------------------------------------------------------
SC58 for adresses
-----------------------------------------------------------------------
Shark - Team Check Func
-----------------------------------------------------------------------
Any one else i forgot to add :-)

Enjoy Happy

U will need to use PS3Lib v4.2

How to use "Use setClientViewAngles(your client); in a timer or something"
(adsbygoogle = window.adsbygoogle || []).push({});

The following 9 users say thank you to iMP3Rz for this useful post:

Arrow_Modz, Asian, BroIDontMod, D3skm, ImAzazel, Mango_Knife, Miyata, RaGE_LoLo69, Turk_Warrior
04-29-2014, 02:51 PM #20
Daqe
Pokemon Trainer
Originally posted by D3skm View Post
Credits
iMP3Rz -aimbot
B777x-aimbot BiG Help

Erorr
You must login or register to view this content.


U stupid Drack put ur client number Not Happy or Sad And credit : Daqe & iMP3Rz*
04-29-2014, 02:51 PM #21
Originally posted by B777x View Post
Put 0 for host


setClientViewAngles(0,client)

And Erorr ?
04-29-2014, 02:55 PM #22
B777x
Hurah!
Originally posted by D3skm View Post
setClientViewAngles(0,client)

And Erorr ?


no use

setClientViewAngles(0)
04-29-2014, 03:01 PM #23
Originally posted by B777x View Post
no use

setClientViewAngles(0)




BIG THinKs
04-29-2014, 04:56 PM #24
xHostModer
Little One
Originally posted by Daqe View Post
if (Buttons.ButtonPressed((uint)client, Buttons.L1) || Buttons.ButtonPressed((uint)client, Buttons.L1 + Buttons.R1)) *


Dont Like It That Way :fa:
04-29-2014, 04:59 PM #25
xHostModer
Little One
Originally posted by iMP3Rz View Post
Hello NextgenUpdate Today me and my friend decide to release this C# aimbot 1.16

Hope you guys will enjoy it

Here is a little video with it in action:
#This was before we modifed it, its better now :-)





C# Aimbot Function:

public class Offsets
{
public static uint
g_client = 0x177E928,
clientSize = 0x5808,
g_entity = 0x16B7920,
entitySize = 0x31C,
setClientViewAngles = 0x001E1D90;
}
public static float[] ReadSingle(uint address, int length)
{
byte[] memory = PS3.Extension.ReadBytes(address, length * 4);
ReverseBytes(memory);
float[] numArray = new float[length];
for (int index = 0; index < length; ++index)
numArray[index] = BitConverter.ToSingle(memory, (length - 1 - index) * 4);
return numArray;
}

public static byte[] ReverseBytes(Byte[] toReverse)
{
Array.Reverse(toReverse);
return toReverse;
}
public static void WriteSingle(UInt32 address, float[] input)
{
Int32 length = input.Length;
Byte[] array = new Byte[length * 4];
for (Int32 i = 0; i < length; i++)
{
ReverseBytes(BitConverter.GetBytes(input)).CopyTo(array, (Int32)(i * 4));
}
PS3.SetMemory(address, array);
}

public static uint G_Client2(int client)
{
return Offsets.g_client + (Offsets.clientSize * (uint)client);
}
public static uint G_Entity2(int client)
{
return Offsets.g_entity + (Offsets.entitySize * (uint)client);
}
public static float[] getOrigin(int client)
{
return ReadSingle(G_Client2(client) + 0x28, 3);
}
public static float[] vectoangles(float[] Angles)
{
float num2;
float num3;
float[] numArray = new float[3];
if ((Angles[1] == 0f) && (Angles[0] == 0f))
{
num2 = 0f;
if (Angles[2] > 0f)
{
num3 = 90f;
}
else
{
num3 = 270f;
}
}
else
{
if (Angles[0] != -1f)
{
num2 = (float)((Math.Atan2((double)Angles[1], (double)Angles[0]) * 180.0) / 3.1415926535897931);
}
else if (Angles[1] > 0f)
{
num2 = 90f;
}
else
{
num2 = 270f;
}
if (num2 < 0f)
{
num2 += 360f;
}
float num = (float)Math.Sqrt((double)((Angles[0] * Angles[0]) + (Angles[1] * Angles[1])));
num3 = (float)((Math.Atan2((double)Angles[2], (double)num) * 180.0) / 3.1415926535897931);
if (num3 < 0f)
{
num3 += 360f;
}
}
numArray[0] = -num3;
numArray[1] = num2;
return numArray;
}
public static Boolean isAlive(int client)
{
Int32 alive = PS3.Extension.ReadInt16(0x1783EFB + 0x5808 * (uint)client);
return (alive == 0);
}
public static Boolean isSameTeam(int shooter, int victim)
{
Byte shooterTeam = PS3.Extension.ReadByte(0x1783E2F + (uint)shooter * 0x580Cool Man (aka Tustin);
Byte victimTeam = PS3.Extension.ReadByte(0x1783E2F + (uint)victim * 0x580Cool Man (aka Tustin);
return (shooterTeam == victimTeam);
}

public static float[] getVector(int shooter, int victim)
{
float[] numArray = getOrigin(shooter);
float[] numArray2 = getOrigin(victim);
return new float[] { (numArray2[0] - numArray[0]), (numArray2[1] - numArray[1]), (numArray2[2] - numArray[2]) };
}
public static int nearestPlayer(int shooter)
{
int victim = -1;
float closest = float.MaxValue;
for (int i = 0; i < 12; i++)
{
float XYZ = getOrigin(shooter)[0] - getOrigin(i)[0];
float distance = (float)Math.Sqrt(XYZ * XYZ);
if (isAlive(i) && !isSameTeam(shooter, i))
{
if (distance < closest)
{
victim = i;
closest = distance;
}
}
}
return victim;
}
public static int nearestPlayerFREEFORALL(int shooter)
{
int victim = 0;
double closest = 999999999999999;
for (int i = 0; i < 12; i++)
{
Single xyz = getOrigin(i)[0] - getOrigin(shooter)[0];
Double distance = (Double)Math.Sqrt(xyz * xyz);
if ((i != shooter))
{
if (distance < closest)
{
victim = i;
closest = distance;
}
}
}
return victim;
}
public static void setClientViewAngles(int client)
{
if (GetServerDetails(2) == "dm")
{
int victim = nearestPlayerFREEFORALL(client);
float[] angles = vectoangles(getVector((int)client, (int)victim));
WriteSingle(0x10004000, angles);
RPC.Call(Offsets.setClientViewAngles, new object[] { G_Entity2(client), 0x10004000, angles });
}
else
{
int victim = nearestPlayer(client);
float[] angles = vectoangles(getVector((int)client, (int)victim));
WriteSingle(0x10004000, angles);
RPC.Call(Offsets.setClientViewAngles, new object[] { G_Entity2(client), 0x10004000, angles });
}
}
public static String GetServerDetails(Int32 Index)
{
return Encoding.ASCII.GetString(PS3.GetBytes(0x00f57fd5, 0x100)).Replace(@"\", "|").Split('|'Winky Winky[Index];
}


Credits Goes To Those Awsome Guys:

Me (iMP3Rz / Patrick) & Daqe - For Port to B.O.2 & Modify code
-----------------------------------------------------------------------
Sticky for aimbot structure
-----------------------------------------------------------------------
seb5594 ReadSingle/WriteSingle
-----------------------------------------------------------------------
SC58 for adresses
-----------------------------------------------------------------------
Notorius - GetServerDetail & Quake 3- vectoangles
-----------------------------------------------------------------------
Any one else i forgot to add :-)

Enjoy Happy


U Should Add Exist()
That Would Make The Aimbot Dont Bug..
04-29-2014, 05:51 PM #26
Originally posted by Daqe View Post
U stupid Drack put ur client number Not Happy or Sad And credit : Daqe & iMP3Rz*


Credit to none of you. None of you coded this. You swapped the offsets.
04-29-2014, 06:11 PM #27
Originally posted by AlmightySo View Post
Credit to none of you. None of you coded this. You swapped the offsets.


Yas Daqe No credits
04-29-2014, 06:16 PM #28
Daqe
Pokemon Trainer
Originally posted by AlmightySo View Post
Credit to none of you. None of you coded this. You swapped the offsets.


The good origin value and team function* , Go read post ok , credits go sticky for aimbot structure.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo