BO2 Zombies Need Code Example

Posts 1–5 of 5 · Page 1 of 1
BO2 Zombies Need Code Example
I am new to this and I was wondering if I could pass a code visual basic simple as get an amount of money in black ops zombies 2 thank you.
It's fairly easy.
 
Code
Code:
internal static class Utils
    {
        [DllImport("kernel32.dll")]
        private static extern IntPtr OpenProcess(uint dwDesiredAccess, bool bInheritHandle, int dwProcessId);

        [DllImport("kernel32.dll")]
        private static extern bool ReadProcessMemory(IntPtr hProcess, int lpBaseAddress, [Out] byte[] lpBuffer, int dwSize, [Out] int lpNumberOfBytesRead);

        [DllImport("kernel32.dll")]
        private static extern bool WriteProcessMemory(IntPtr hProcess, int lpBaseAddress, byte[] lpBuffer, uint nSize, [Out] int lpNumberOfBytesWritten);

        private static IntPtr handle;
        private const int bytes = 0;

        public static void ConnectToGame()
        {
            Process t6zm = Process.GetProcessesByName("t6zm").FirstOrDefault();
            if (t6zm != null)
                handle = OpenProcess(0x1f0fff, false, t6zm.Id);
        }

        public static void WriteInt(int pointer, int value)
        {
            WriteProcessMemory(handle, pointer, BitConverter.GetBytes(value), 4, bytes);
        }

        public static int ReadInt(int pointer)
        {
            var buffer = new byte[4];
            ReadProcessMemory(handle, pointer, buffer, 4, bytes);
            return BitConverter.ToInt32(buffer, 0);
        }
    }
Code:
internal class Client
    {
        private int Index;
        private const int gClients = 0x23427A0;
        private const int clientSize = 0x57f8;

        private int currentClient
        {
            get { return gClients + Index*clientSize; }
        }

        public Client(int index)
        {
            Index = index;
        }

        public int Money
        {
            get { return Utils.ReadInt(currentClient + 0x55C8); }
            set { Utils.WriteInt(currentClient + 0x55C8, value); }
        }
    }
Then you can do just:
Code:
 Utils.ConnectToGame();
            var client = new Client(0);
client.Money = 100000;
Console.WriteLine(client.Money);
Quote Originally Posted by dtx12 View Post
It's fairly easy.
 
Code
Code:
internal static class Utils
    {
        [DllImport("kernel32.dll")]
        private static extern IntPtr OpenProcess(uint dwDesiredAccess, bool bInheritHandle, int dwProcessId);

        [DllImport("kernel32.dll")]
        private static extern bool ReadProcessMemory(IntPtr hProcess, int lpBaseAddress, [Out] byte[] lpBuffer, int dwSize, [Out] int lpNumberOfBytesRead);

        [DllImport("kernel32.dll")]
        private static extern bool WriteProcessMemory(IntPtr hProcess, int lpBaseAddress, byte[] lpBuffer, uint nSize, [Out] int lpNumberOfBytesWritten);

        private static IntPtr handle;
        private const int bytes = 0;

        public static void ConnectToGame()
        {
            Process t6zm = Process.GetProcessesByName("t6zm").FirstOrDefault();
            if (t6zm != null)
                handle = OpenProcess(0x1f0fff, false, t6zm.Id);
        }

        public static void WriteInt(int pointer, int value)
        {
            WriteProcessMemory(handle, pointer, BitConverter.GetBytes(value), 4, bytes);
        }

        public static int ReadInt(int pointer)
        {
            var buffer = new byte[4];
            ReadProcessMemory(handle, pointer, buffer, 4, bytes);
            return BitConverter.ToInt32(buffer, 0);
        }
    }
Code:
internal class Client
    {
        private int Index;
        private const int gClients = 0x23427A0;
        private const int clientSize = 0x57f8;

        private int currentClient
        {
            get { return gClients + Index*clientSize; }
        }

        public Client(int index)
        {
            Index = index;
        }

        public int Money
        {
            get { return Utils.ReadInt(currentClient + 0x55C8); }
            set { Utils.WriteInt(currentClient + 0x55C8, value); }
        }
    }
Then you can do just:
Code:
 Utils.ConnectToGame();
            var client = new Client(0);
client.Money = 100000;
Console.WriteLine(client.Money);
What format to use? is that I am new to this I just be programmed java and .php
Search on youtube how to make a hack using cheat engine. Follow it, you will understand it.
Posts 1–5 of 5 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us