typedef struct
{
int Valid; //0x0 (0xAD28F8)
char _0x0004[0x8]; //0x4
char Name[16]; //0xC (0xAD2904)
int Team; //0x1C (0xAD2914)
char _0x0020[0x4]; //0x20
int Rank; //0x24 (0xAD291C)
char _0x0028[0x10]; //0x28
int Perk; //0x38 (0xAD2930)
char _0x003C[0x8]; //0x3C
int Score; //0x44 (0xAD293C)
char _0x0048[0x458]; //0x48
int Attacking; //0x4A0 (0xAD2D98)
char _0x04A4[0x4]; //0x4A4
int Zooming; //0x4A8 (0xAD2DA0)
char _0x04AC[0xB8]; //0x4AC
}client_t; //[Addr: 0xAD28F8] [Size: 0x564]
class Client_t
{
public int valid;
public string name;
public int team;
public int rank;
public int perk;
public int score;
public int attacking;
public int zooming;
}
public static Client_t ReadClient(int Address)
{
int A = Address;
Client_t ret = new Client_t();
ret.valid = ReadInteger(A);
ret.name = ReadString(A + 0xC, 15);
ret.team = ReadInteger(A + 0x1C);
ret.rank = ReadInteger(A + 0x24);
ret.perk = ReadInteger(A + 0x38);
ret.score = ReadInteger(A + 0x44);
ret.attacking = ReadInteger(A + 0x4A0);
ret.zooming = ReadInteger(A + 0x4A8);
return ret;
}
Client_t[] clients = new Client_t[18];
int a = 0xAD28F8;
for (int i = 0; i < clients.Length; i++) {
clients[i] = ReadClient(a);
a += 0x564;
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MW3Kill
{
class Client_t
{
public int valid;
public string name;
public int team;
public int rank;
public int perk;
public int score;
public int attacking;
public int zooming;
}
public static Client_t ReadClient(int Address)
{
int A = Address;
Client_t ret = new Client_t();
ret.valid = ReadInteger(A);
ret.name = ReadString(A + 0xC, 15);
ret.team = ReadInteger(A + 0x1C);
ret.rank = ReadInteger(A + 0x24);
ret.perk = ReadInteger(A + 0x38);
ret.score = ReadInteger(A + 0x44);
ret.attacking = ReadInteger(A + 0x4A0);
ret.zooming = ReadInteger(A + 0x4A8);
return ret;
}
Client_t[] clients = new Client_t[18];
int a = 0xAD28F8;
for (int i = 0; i < clients.Length; i++) {
clients[i] = ReadClient(a);
a += 0x564;
}
}



using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using System.Diagnostics;
namespace MW3Kill
{
class Client_t
{
public int valid;
public string name;
public int team;
public int rank;
public int perk;
public int score;
public int attacking;
public int zooming;
#region Basic Stuff
[DllImport("kernel32.dll")]
private static extern Int32 ReadProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [In, Out] byte[] buffer, UInt32 size, out IntPtr lpNumberOfBytesWritten);
[DllImport("kernel32.dll")]
private static extern Int32 WriteProcessMemory(IntPtr hProcess, IntPtr lpBaseAddress, [In, Out] byte[] buffer, UInt32 size, out IntPtr lpNumberOfBytesWritten);
IntPtr pHandel;
public bool Process_Handle(string ProcessName)
{
try
{
Process[] ProcList = Process.GetProcessesByName(ProcessName);
if (ProcList.Length == 0)
return false;
else
{
pHandel = ProcList[0].Handle;
return true;
}
}
catch (Exception ex)
{ Console.Beep(); Console.WriteLine("Process_Handle - " + ex.Message); return false; }
}
private byte[] Read(int Address, int Length)
{
byte[] Buffer = new byte[Length];
IntPtr Zero = IntPtr.Zero;
ReadProcessMemory(pHandel, (IntPtr)Address, Buffer, (UInt32)Buffer.Length, out Zero);
return Buffer;
}
private void Write(int Address, int Value)
{
byte[] Buffer = BitConverter.GetBytes(Value);
IntPtr Zero = IntPtr.Zero;
WriteProcessMemory(pHandel, (IntPtr)Address, Buffer, (UInt32)Buffer.Length, out Zero);
}
#endregion
#region Write Functions (Integer & String)
public void WriteInteger(int Address, int Value)
{
Write(Address, Value);
}
public void WriteString(int Address, string Text)
{
byte[] Buffer = new ASCIIEncoding().GetBytes(Text);
IntPtr Zero = IntPtr.Zero;
WriteProcessMemory(pHandel, (IntPtr)Address, Buffer, (UInt32)Buffer.Length, out Zero);
}
public void WriteBytes(int Address, byte[] Bytes)
{
IntPtr Zero = IntPtr.Zero;
WriteProcessMemory(pHandel, (IntPtr)Address, Bytes, (uint)Bytes.Length, out Zero);
}
public void WriteNOP(int Address)
{
byte[] Buffer = new byte[] { 0x90, 0x90, 0x90, 0x90, 0x90 };
IntPtr Zero = IntPtr.Zero;
WriteProcessMemory(pHandel, (IntPtr)Address, Buffer, (UInt32)Buffer.Length, out Zero);
}
#endregion
#region Read Functions (Integer & String)
public int ReadInteger(int Address, int Length = 4)
{
return BitConverter.ToInt32(Read(Address, Length), 0);
}
public string ReadString(int Address, int Length = 4)
{
return new ASCIIEncoding().GetString(Read(Address, Length));
}
public byte[] ReadBytes(int Address, int Length)
{
return Read(Address, Length);
}
#endregion
public static Client_t ReadClient(int Address)
{
int A = Address;
Client_t ret = new Client_t();
ret.valid = ReadInteger(A);
ret.name = ReadString(A + 0xC, 15);
ret.team = ReadInteger(A + 0x1C);
ret.rank = ReadInteger(A + 0x24);
ret.perk = ReadInteger(A + 0x38);
ret.score = ReadInteger(A + 0x44);
ret.attacking = ReadInteger(A + 0x4A0);
ret.zooming = ReadInteger(A + 0x4A8);
Client_t[] clients = new Client_t[18];
int a = 0xAD28F8;
for (int i = 0; i < clients.Length; i++)
{
clients[i] = ReadClient(a);
a += 0x564;
}
return ret;
}
}
}

[StructLayout(LayoutKind.Explicit)]
struct ClientT
{
[FieldOffset(0x0), MarshalAs(UnmanagedType.Bool)]
public bool Valid;
[FieldOffset(0xC), MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)]
public string Name;
[FieldOffset(0x1C)]
public Int32 Team;
[FieldOffset(0x24)]
public Int32 Rank;
[FieldOffset(0x38)]
public Int32 Perk;
[FieldOffset(0x44)]
public Int32 Score;
[FieldOffset(0x4A0), MarshalAs(UnmanagedType.Bool)]
public bool Attacking;
[FieldOffset(0x4A8), MarshalAs(UnmanagedType.Bool)]
public bool Zooming;
}
private const int MAXPLAYERS = 18;
ClientT[] Client;
unsafe void ReadGame() {
while (true) { //Call it on another thread OFC...
fixed (byte* pBuffer = ReadBytes(OFFS_Client, sizeOfClient * MAXPLAYERS)) {
for (int i = 0; i < MAXPLAYERS; i++) {
Client[i] = *(ClientT*) (pBuffer + sizeOfClient * i);
}
}
}
}
private byte[] ReadBytes(int Adress, int Size) {
byte[] read = new byte[Size];
int bytesRead;
ReadProcessMemory(MW3Process, (IntPtr) Adress, read, Size, out bytesRead);
return read;
}


![=]](/forum/images/emotions/=].gif)
public static Client_t ReadClient(int clientnum)
{
int A = 0xAD28F8 + ( 0x564 * clientnum );
Client_t ret = new Client_t();
public static void ReadClient(int clientnum, Client_t* client)
{
int A = 0xAD28F8 + ( 0x564 * clientnum );
client->valid = ReadInteger(A);
Client_t[] clients = new Client_t[18];
int a = 0xAD28F8;
for (int i = 0; i < clients.Length; i++) {
clients[i] = ReadClient(a);
a += 0x564;
}