Как написать бхоп на c

Fata_Morgana


  • #1

Всех приветствую, в этом гайде мы напишем свой Bhop для игры CS:GO, на это у нас уйдёт максимум 10 минут.

Нам понадобится:

  • Библиотека для работы с памятью: Memory.dll(Кликабельно).
  • Скачанная Visual Studio со всеми драйверами для работы с C#.
  • Знание языка на начальном уровне.

Сначала делаем чтение «Флагов», они служат для определения где находится игрок, на земле или в воздухе:

C#:

public static int Flags()
        {
            int localplayer = mem.Read<Int>(client_dll + Offsets.dwLocalPlayer);
            int flags = mem.Read<Int>(localplayer + Offsets.m_fFlags);

            return flags;
        }

После этого пишем основном код Баннихопа:

C#:

 public static void Bhop()
        {
            if (BhopProperty) // Отвечает за проверку включена ли функция (сюда вписываем свою переменную типа Bool).
            {
                if (GetAsyncKeyState(32) != 0) // Выполнение проверку нажал ли пользователь пробел. 32 - виртуальный код клавиши "Пробел".
                {
                    if (Flags() == 257 || Flags() == 263) // Проверка флагов, 257- игрок на земле и не в присяде, 263 - игрок на земле но в присяде.
                    {
                        mem.Write<int>(client_dll + Offsets.dwForceJump, 5); // Запись в память игры команды прыжка. 5 - Нажатие.
                        Thread.Sleep(49);
                        mem.Write<int>(client_dll + Offsets.dwForceJump, 4); // 4 - Отжатие прыжка.
                    }
            
                }
            }

        }

Так же не забываем добавить импорт метода GetAsyncKeyState() из user32.dll:

C#:

[DllImport("user32.dll")]
public static extern short GetAsyncKeyState(int vKey);

В моём коде нет цикла While потому что метод запускается в отдельном потоке, я рассказывал об этом тут : Как написать Glow Esp | Как написать чит #3.

Вот и всё, наш Bhop готов.
Ну а если я тебе помог, напиши комментарий и поставь лайк под темой.

Последнее редактирование: 24.05.2021

vandalChel


  • #2

Разве GetAsyncKeyState используется в c#?

Снимок.PNG

Последнее редактирование: 24.05.2021

Fata_Morgana


  • #3

Разве GetAsyncKeyState используется в c#?

Посмотреть вложение 471

Забыл указать что этот метод нужно импортировать :

C#:

        [DllImport("user32.dll")]
        public static extern short GetAsyncKeyState(int vKey);

vandalChel


  • #4

Забыл указать что этот метод нужно импортировать :

C#:

        [DllImport("user32.dll")]
        public static extern short GetAsyncKeyState(int vKey);

Можно узнать узнать по подробней как правильно импортировать?



C#:

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using static VandalHack.ProcesManager;
using static VandalHack.Proporti;

namespace VandalHack
{
    static class Program
    {
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());

        }


      !!!!!!!!!!!!!!!  //---> [DllImport("user32.dll")] <---- !!!!!!!!!!!!!!!!!!!!!!
        !!!!!!!!!!!!!!!!!!!!!!!! //--->  public static extern short GetAsyncKeyState(int vKey); <----!!!!!!!!!!!!!!!!!!!!!!!
        public static void esp()
        {
            while(true)
            {
                Thread.Sleep(1);
                int localplayer = mem.Read<int>(clinet_dll + Offsets.dwLocalPlayer);
                int myteam = mem.Read<int>(localplayer + Offsets.m_iTeamNum);

                for (byte i = 0; i < 64; i++)
                {
                    int enlist = mem.Read<int>(clinet_dll + Offsets.dwEntityList + i * 0x10);
                    int emyteam = mem.Read<int>(enlist + Offsets.m_iTeamNum);
                    float EnyHp = mem.Read<int>(enlist + Offsets.m_iHealth) / 100f;

                    if (GLOWESP)
                    {
                        if (enlist != 0)
                        {
                            if (emyteam != 0 && emyteam != myteam)
                            {
                                int glowindex = mem.Read<int>(enlist + Offsets.m_iGlowIndex);
                                if (HpBase)
                                {
                                    DrawEnity(glowindex, EnyHp);
                                }
                                else
                                {

                                    DrawEnity(glowindex, 225, 0, 0);
                                }
                            }
                        }
                    }
                }
            }
        }

        static void DrawEnity(int GlowIndex, int red, int green, int blue)
        {
            int GlowObject = mem.Read<int>(clinet_dll + Offsets.dwGlowObjectManager);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 4, red / 100f);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 8, green / 100f);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 12, blue / 100f);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 0x10, 225 / 100f);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 0x24, true);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 0x25, false);
        } // GLOW
        static void DrawEnity(int GlowIndex, float hp)
        {
            int GlowObject = mem.Read<int>(clinet_dll + Offsets.dwGlowObjectManager);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 4, 1 - hp);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 8, hp);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 12, 0);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 0x10, 225 / 100f);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 0x24, true);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 0x25, false);
        } // HP

        public static int Flags()
        {
            int localplayer = mem.Read<int>(clinet_dll + Offsets.dwLocalPlayer);
            int flags = mem.Read<int>(localplayer + Offsets.m_fFlags);

            return flags;
        }
        public static void Bhop()
        {
            if (Buhhop)
            {
                if (GetAsyncKeyState(32) != 0)
                {
                    return;
                }
                if (Flags() == 257 || Flags() == 263)
                {
                    mem.Write<int>(clinet_dll + Offsets.dwForceJump, 5);
                    Thread.Sleep(49);
                    mem.Write<int>(clinet_dll + Offsets.dwForceJump, 4);
                }
            }

        }
    }
}

Fata_Morgana


  • #5

Можно узнать узнать по подробней как правильно импортировать?



C#:

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using static VandalHack.ProcesManager;
using static VandalHack.Proporti;

namespace VandalHack
{
    static class Program
    {
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());

        }


      !!!!!!!!!!!!!!!  //---> [DllImport("user32.dll")] <---- !!!!!!!!!!!!!!!!!!!!!!
        !!!!!!!!!!!!!!!!!!!!!!!! //--->  public static extern short GetAsyncKeyState(int vKey); <----!!!!!!!!!!!!!!!!!!!!!!!
        public static void esp()
        {
            while(true)
            {
                Thread.Sleep(1);
                int localplayer = mem.Read<int>(clinet_dll + Offsets.dwLocalPlayer);
                int myteam = mem.Read<int>(localplayer + Offsets.m_iTeamNum);

                for (byte i = 0; i < 64; i++)
                {
                    int enlist = mem.Read<int>(clinet_dll + Offsets.dwEntityList + i * 0x10);
                    int emyteam = mem.Read<int>(enlist + Offsets.m_iTeamNum);
                    float EnyHp = mem.Read<int>(enlist + Offsets.m_iHealth) / 100f;

                    if (GLOWESP)
                    {
                        if (enlist != 0)
                        {
                            if (emyteam != 0 && emyteam != myteam)
                            {
                                int glowindex = mem.Read<int>(enlist + Offsets.m_iGlowIndex);
                                if (HpBase)
                                {
                                    DrawEnity(glowindex, EnyHp);
                                }
                                else
                                {

                                    DrawEnity(glowindex, 225, 0, 0);
                                }
                            }
                        }
                    }
                }
            }
        }

        static void DrawEnity(int GlowIndex, int red, int green, int blue)
        {
            int GlowObject = mem.Read<int>(clinet_dll + Offsets.dwGlowObjectManager);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 4, red / 100f);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 8, green / 100f);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 12, blue / 100f);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 0x10, 225 / 100f);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 0x24, true);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 0x25, false);
        } // GLOW
        static void DrawEnity(int GlowIndex, float hp)
        {
            int GlowObject = mem.Read<int>(clinet_dll + Offsets.dwGlowObjectManager);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 4, 1 - hp);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 8, hp);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 12, 0);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 0x10, 225 / 100f);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 0x24, true);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 0x25, false);
        } // HP

        public static int Flags()
        {
            int localplayer = mem.Read<int>(clinet_dll + Offsets.dwLocalPlayer);
            int flags = mem.Read<int>(localplayer + Offsets.m_fFlags);

            return flags;
        }
        public static void Bhop()
        {
            if (Buhhop)
            {
                if (GetAsyncKeyState(32) != 0)
                {
                    return;
                }
                if (Flags() == 257 || Flags() == 263)
                {
                    mem.Write<int>(clinet_dll + Offsets.dwForceJump, 5);
                    Thread.Sleep(49);
                    mem.Write<int>(clinet_dll + Offsets.dwForceJump, 4);
                }
            }

        }
    }
}

C#:

static class Program
    {
// вставлять тут
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());

        }

Fata_Morgana


  • #6

Можно узнать узнать по подробней как правильно импортировать?



C#:

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
using static VandalHack.ProcesManager;
using static VandalHack.Proporti;

namespace VandalHack
{
    static class Program
    {
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());

        }


      !!!!!!!!!!!!!!!  //---> [DllImport("user32.dll")] <---- !!!!!!!!!!!!!!!!!!!!!!
        !!!!!!!!!!!!!!!!!!!!!!!! //--->  public static extern short GetAsyncKeyState(int vKey); <----!!!!!!!!!!!!!!!!!!!!!!!
        public static void esp()
        {
            while(true)
            {
                Thread.Sleep(1);
                int localplayer = mem.Read<int>(clinet_dll + Offsets.dwLocalPlayer);
                int myteam = mem.Read<int>(localplayer + Offsets.m_iTeamNum);

                for (byte i = 0; i < 64; i++)
                {
                    int enlist = mem.Read<int>(clinet_dll + Offsets.dwEntityList + i * 0x10);
                    int emyteam = mem.Read<int>(enlist + Offsets.m_iTeamNum);
                    float EnyHp = mem.Read<int>(enlist + Offsets.m_iHealth) / 100f;

                    if (GLOWESP)
                    {
                        if (enlist != 0)
                        {
                            if (emyteam != 0 && emyteam != myteam)
                            {
                                int glowindex = mem.Read<int>(enlist + Offsets.m_iGlowIndex);
                                if (HpBase)
                                {
                                    DrawEnity(glowindex, EnyHp);
                                }
                                else
                                {

                                    DrawEnity(glowindex, 225, 0, 0);
                                }
                            }
                        }
                    }
                }
            }
        }

        static void DrawEnity(int GlowIndex, int red, int green, int blue)
        {
            int GlowObject = mem.Read<int>(clinet_dll + Offsets.dwGlowObjectManager);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 4, red / 100f);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 8, green / 100f);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 12, blue / 100f);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 0x10, 225 / 100f);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 0x24, true);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 0x25, false);
        } // GLOW
        static void DrawEnity(int GlowIndex, float hp)
        {
            int GlowObject = mem.Read<int>(clinet_dll + Offsets.dwGlowObjectManager);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 4, 1 - hp);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 8, hp);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 12, 0);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 0x10, 225 / 100f);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 0x24, true);
            mem.Write(GlowObject + (GlowIndex * 0x38) + 0x25, false);
        } // HP

        public static int Flags()
        {
            int localplayer = mem.Read<int>(clinet_dll + Offsets.dwLocalPlayer);
            int flags = mem.Read<int>(localplayer + Offsets.m_fFlags);

            return flags;
        }
        public static void Bhop()
        {
            if (Buhhop)
            {
                if (GetAsyncKeyState(32) != 0)
                {
                    return;
                }
                if (Flags() == 257 || Flags() == 263)
                {
                    mem.Write<int>(clinet_dll + Offsets.dwForceJump, 5);
                    Thread.Sleep(49);
                    mem.Write<int>(clinet_dll + Offsets.dwForceJump, 4);
                }
            }

        }
    }
}

Ты точно по гайду писал?

C#:

 public static void Bhop()
        {
            if (Buhhop)
            {
                if (GetAsyncKeyState(32) != 0) // ты делаешь проверку нажат ли пробел и выполняешь прыжки в игре, а из-за return после того как нажат пробел ты пропускаешь итерацию цикла и прыгаешь когда он не нажат.
                {
                    return; // зачем?
                }
                if (Flags() == 257 || Flags() == 263)
                {
                    mem.Write<int>(clinet_dll + Offsets.dwForceJump, 5);
                    Thread.Sleep(49);
                    mem.Write<int>(clinet_dll + Offsets.dwForceJump, 4);
                }
            }

        }

vandalChel


  • #7

Ты точно по гайду писал?

C#:

 public static void Bhop()
        {
            if (Buhhop)
            {
                if (GetAsyncKeyState(32) != 0) // ты делаешь проверку нажат ли пробел и выполняешь прыжки в игре, а из-за return после того как нажат пробел ты пропускаешь итерацию цикла и прыгаешь когда он не нажат.
                {
                    return; // зачем?
                }
                if (Flags() == 257 || Flags() == 263)
                {
                    mem.Write<int>(clinet_dll + Offsets.dwForceJump, 5);
                    Thread.Sleep(49);
                    mem.Write<int>(clinet_dll + Offsets.dwForceJump, 4);
                }
            }

        }

Спасибо тебе большое :)

  • #8

Всех приветствую, в этом гайде мы напишем свой Bhop для игры CS:GO, на это у нас уйдёт максимум 10 минут.

Нам понадобится:

  • Библиотека для работы с памятью: Memory.dll(Кликабельно).
  • Скачанная Visual Studio со всеми драйверами для работы с C#.
  • Знание языка на начальном уровне.

Сначала делаем чтение «Флагов», они служат для определения где находится игрок, на земле или в воздухе:

C#:

public static int Flags()
        {
            int localplayer = mem.Read<Int>(client_dll + Offsets.dwLocalPlayer);
            int flags = mem.Read<Int>(localplayer + Offsets.m_fFlags);

            return flags;
        }

После этого пишем основном код Баннихопа:

C#:

 public static void Bhop()
        {
            if (BhopProperty) // Отвечает за проверку включена ли функция (сюда вписываем свою переменную типа Bool).
            {
                if (GetAsyncKeyState(32) != 0) // Выполнение проверку нажал ли пользователь пробел. 32 - виртуальный код клавиши "Пробел".
                {
                    if (Flags() == 257 || Flags() == 263) // Проверка флагов, 257- игрок на земле и не в присяде, 263 - игрок на земле но в присяде.
                    {
                        mem.Write<int>(client_dll + Offsets.dwForceJump, 5); // Запись в память игры команды прыжка. 5 - Нажатие.
                        Thread.Sleep(49);
                        mem.Write<int>(client_dll + Offsets.dwForceJump, 4); // 4 - Отжатие прыжка.
                    }
           
                }
            }

        }

Так же не забываем добавить импорт метода GetAsyncKeyState() из user32.dll:

C#:

[DllImport("user32.dll")]
public static extern short GetAsyncKeyState(int vKey);

В моём коде нет цикла While потому что метод запускается в отдельном потоке, я рассказывал об этом тут : Как написать Glow Esp | Как написать чит #3.

Вот и всё, наш Bhop готов.
Ну а если я тебе помог, напиши комментарий и поставь лайк под темой.

у меня memory.dll использует не mem.Write<int>(…); , а mem.WriteMemory(string + string, «int», «0») и из-за этого у меня не получается, что делать?

Я не буду объяснять, как создавать проекты в VisualStudio и тому подобное, будем считать, что те, кто читают этот гайд, хотя бы немного разбираются в том, как создавать и работать с проектами в визуалке.

1)Первым делом нужно скачать библиотеку на GitHub:NativeManager
2)Скомпилируйте эту библиотеку у себя на компьютере
3)Создайте свой проект с будущим читом
4)Через ссылки добавьте NativeManager в свой проект
5)Приступаем к разработке!!!!


————————————————————————————————————————————————————————————————————————————
Чит мы будем создавать на примере игры CS:GO

1)После того как мы создали проект с читом, нам нужно добавить ссылки на пространства имен нашего NativeManager’a
using System.MemoryInteraction;

2)В NativeManager есть 2 класса для работы с памятью

  1. SimpleMemoryManager
  2. MemoryManager(Производный класс от SimpleMemoryManager)

Мы будем использовать класс MemoryManager, так как в нем реализованы методы, которые позволяют нам без дополнительных усилий прочитать данные из памяти процесса.

3)Пишем код для присоединения к процессу игры
ВАЖНО!!!
Игра должна быть запущена раньше чита, иначе мы словим исключение, что такого процесса не существует!

Process process = Process.GetProcessesByName("csgo")[0];
MemoryManager memory = process.GetMemoryManager();

В первой строчке кода мы указали, что нам нужен процесс с именем «CSGO».
Во второй строчке кода мы указали, что нам нужно получить экземпляр MemoryManager для работы с виртуальной памятью процесса.

4)Следующим этапом нам нужно получить модули процесса, с которыми нам нужно работать, что бы прочитать нужные нам данные

IntPtr client = process.GetModule("client.dll").BaseAddress;

5)Создаем бесконечный цикл для того, что бы наш чит постоянно читал данные из игры и мог так же в нее записывать.

6)Теперь нам нужно получить локального игрока из игры. Для этого в цикле нам нужно написать вот такой код

IntPtr localPlayer = memory.Read<IntPtr>(client + 0xD3FC5C);

Число 0xD3FC5C может меняться с каждым обновлением игры. Следить за обновлением оффсетов можно на GitHub по этой ссылке:hazedumper

7)Мы получили локального игрока, теперь нам нужно получить его флаг. С помощью него мы будем понимать в прыжке он или нет

 int flag = memory.Read<int>(localPlayer + 0x104);

8)Для начала сделаем проверку на нажатие кнопки пробела
Этот код нужно добавить в любой из классов

[DllImport("user32.dll")]
static extern bool GetAsyncKeyState(int vKey);

А этот код в наш цикл после получения флага

if (GetAsyncKeyState(32))
{

}

9)Теперь нам нужно сделать проверку, находится игрок в воздухе или на земле. Для этого нужно добавить этот код в условие проверки нажатия клавиши пробел

 if(flag == 256 || flag == 262)
{

}

10)В этом условии нам нужно сделать запись в память игры, что бы делать прыжок, когда мы оказываемся на земле

if (flag == 256 || flag == 262)
{
     memory.Write(client + 0x51FE22C, 4);
}
else
{
     memory.Write(client + 0x51FE22C, 5);
}

На этом все. Мы написали такой маленький и легкий код, с помощью которого наш персонаж может прыгать без остановок.
Надеюсь, я объяснил все доходчиво и понятно. Если будут какие то вопросы, то с удовольствием отвечу вам на них в комментариях.
А вот подарок тем, кто не хочет копировать код по частям.

Process process = Process.GetProcessesByName("csgo")[0];
            MemoryManager memory = process.GetMemoryManager();

            IntPtr client = process.GetModule("client.dll").BaseAddress;

            while(true)
            {
                IntPtr localPlayer = memory.Read<IntPtr>(client + 0xD3FC5C);

                int flag = memory.Read<int>(localPlayer + 0x104);

                if (GetAsyncKeyState(32))
                {
                    if (flag == 256 || flag == 262)
                    {
                        memory.Write(client + 0x51FE22C, 4);
                    }
                    else
                    {
                        memory.Write(client + 0x51FE22C, 5);
                    }
                }

                Thread.Sleep(1);
            }

Go Back   UnKnoWnCheaTs — Multiplayer Game Hacking and Cheats

  • First-Person Shooters


  • Counter Strike


  • Counterstrike Global Offensive

  • Reload this Page

    [Tutorial] [C++] Creating your first cheat (Bunnyhop)

    [C++] Creating your first cheat (Bunnyhop)
    [C++] Creating your first cheat (Bunnyhop)

    Save

    Authenticator Code

    Reply

    Thread Tools

    [C++] Creating your first cheat (Bunnyhop)

    Old
    20th December 2016, 04:36 AM

     
    #1

    Depris

    A God

    Depris's Avatar

    Join Date: Dec 2016


    Posts: 184

    Reputation: 847

    Rep Power: 152

    Depris is Developing C+++Depris is Developing C+++Depris is Developing C+++Depris is Developing C+++Depris is Developing C+++Depris is Developing C+++Depris is Developing C+++

    Points: 5,992, Level: 8

    Points: 5,992, Level: 8 Points: 5,992, Level: 8 Points: 5,992, Level: 8

    Level up: 54%, 508 Points needed

    Level up: 54% Level up: 54% Level up: 54%

    Activity: 2.5%

    Activity: 2.5% Activity: 2.5% Activity: 2.5%

    Last Achievements
    [C++] Creating your first cheat (Bunnyhop)[C++] Creating your first cheat (Bunnyhop)

    Cool
    [C++] Creating your first cheat (Bunnyhop)


    In this tutorial, I will show the basics in creating your first C++ external cheat in Counter-Strike: Global Offensive.

    Memory Reading/Writing
    When working externally, the most common way to create cheats is by using the ReadProcessMemory for reading memory and WriteProcessMemory for writing memory. Pretty self explanatory right? Every program contains memory and we are able to read and write it using the mentioned functions. For cheating, this is excellent.

    Requirements
    We are going to be using a already created memory class to safe us time as well as allow us to read and write using a template, saving us more time and making it easier to use.

    Download ProcMem here: http://www.unknowncheats.me/forum/do…=file&id=13249

    Writing it up
    Go ahead and create a new project by selecting an «Empty Project» and naming it whatever you like. Right click «Source Files» and add a «New Item.» Choose the C++ File and name it «Main» or whatever you choose. This file will contain the entry point for our program. Make sure your project is set to use Multi-Byte Character set. To begin you must include the header file by typing #include «ProcMem.h» in your Main.cpp file. You must make sure you have added them to your solution first.

    If you look inside ProcMem you will see that the functions are inside a class named ProcMem. Type «ProcMem» (Name of the class) followed by a shortcut to access the functions inside the class. I have chosen to use Mem.

    Now lets define the entry point of the application. By default this is stated by:

    Code:

    int main() {
    	return 0;
    }

    After that we are going to want to choose which process we are wanting to attach to and which process we want to read/write memory from. Access our memory class and choose the function Process. The function accepts a char input so we simply put the name of the process. In this case it would be «csgo.exe».

    Now we need to choose which module we want to read from. Again access the memory class and choose the function Module. Again it accepts a char and simple put the name of the module. We want to use the client.dll. This function returns a value so assign the function to a variable with the type DWORD.

    Now we need some offsets. I’m not going to go into detail into what offsets are but basically the determine the distance to find the memory that we are interested in reading/writing.

    For a bunnyhop cheat we need the following offsets.

    • Localplayer
    • Flags
    • Forcejump

    In the past offsets were found using external tools such as Cheat Engine. Nowadays, they are easily found all over the internet.

    Go to the last page of: Global Offensive Structs/Offsets

    And take note of the Offsets we need.

    Code:

    - - - - - - Tool by Y3t1y3t ( uc ) - - - - - - 
    | -> http://www.unknowncheats.me/forum/counterstrike-global-offensive/100856-cs-go-offset-dumper-small-one.html
    | -> Thu Dec 15 11:37:55 2016
    - -
    DT_BasePlayer -> m_fFlags: _____________________ 0x00000100
    LocalPlayer -> m_dwLocalPlayer: ________________ 0x00AA5834
    Extra -> m_dwForceJump: ________________________ 0x04F5EB58

    Simple define these variables in your solution. It even tells you what variable type is needed for each offsets. We are going to use a struct to contain this information.

    Code:

    struct sOffsets{
    	DWORD dwFlags = 0x100;
    	DWORD dwLocalPlayer = 0x00AA5834;
    	DWORD dwForceJump = 0x04F5EB58;
    }Offsets;

    We can access these variables using Offsets.<name>
    Now it comes to reading memory. We can read memory using readprocessmemory but out memory class has a template which makes it much easier.

    Simple use: Mem.Read<data type>(Addresses); and assign the value of the function to a variable.

    We are going to find the Local Base by adding the LocalPlayer offset to our already round Client address.

    Code:

    	DWORD dwLocalBase = Mem.Read<DWORD>(Offsets.dwLocalPlayer + dwClientDLL);

    Next we are going to read our player flags

    Code:

    		BYTE dwFlags = Mem.Read<DWORD>(dwLocalBase + Offsets.dwFlags);

    Put this in a loop so that it constantly reads the memory so we know when it changes.

    Code:

    	
    From MSDN - Shift Operators: >> and <<
    
    The left-shift operator causes the bit pattern in the first operand to be shifted to the left by the number of bits specified by the second operand. Bits vacated by the shift operation are zero-filled. This is a logical shift instead of a shift-and-rotate operation.
    This means that the user is taking the bits value of 1 and shifting the bits to the left based on the right number.

    For CS:GO when our bit flags are 1 << 0 are player is at rest / on the ground.

    Other flags

    Code:

    #define	FL_ONGROUND				(1<<0)	// At rest / on the ground
    #define FL_DUCKING				(1<<1)	// Player flag -- Player is fully crouched
    #define	FL_WATERJUMP			(1<<2)	// player jumping out of water
    #define FL_ONTRAIN				(1<<3) // Player is _controlling_ a train, so movement commands should be ignored on client during prediction.
    #define FL_INRAIN				(1<<4)	// Indicates the entity is standing in rain
    #define FL_FROZEN				(1<<5) // Player is frozen for 3rd person camera
    #define FL_ATCONTROLS			(1<<6) // Player can't move, but keeps key inputs for controlling another entity
    #define	FL_CLIENT				(1<<7)	// Is a player
    #define FL_FAKECLIENT			(1<<8)	// Fake client, simulated server side; don't send network messages to them
    #define	FL_INWATER				(1<<9)	// In water

    Basically we want to jump every time our player is touching the ground for PERFECT hops. Therefore define FL_ONGROUND in our solution.

    We use an if statement to check that when our player in on the ground to write 6 to the jump address. We could write 1 but it means we also have to write 0 again. Writing 6 is much easier and write 1 and then 0 for you.

    Before we write memory, make sure to add the memory writing template to your ProcMem.

    So just place: Mem.Write<DWORD>(dwClientDLL + Offsets.dwForceJump, 6); into the code executed in your if statement.

    Code:

    	// Memory Writing Template
    	template<class t>
    	BOOL Write(DWORD dwAddress, t ValueToWrite) {
    		return WriteProcessMemory(hProcess, (LPVOID)dwAddress, &ValueToWrite, sizeof(t), NULL);
    	}

    Lets use && GetAsyncKeyState(VK_SPACE) to check if space is pressed.

    And we should have a perfect BHOP cheat.

    Code:

    #include "ProcMem.h"
    
    #define FL_ONGROUND (1 << 0)
    
    struct sOffsets{
    	DWORD dwFlags = 0x100;
    	DWORD dwLocalPlayer = 0x00AA5834;
    	DWORD dwForceJump = 0x04F5EB58;
    }Offsets;
    
    ProcMem Mem;
    
    int main() {
    	Mem.Process("csgo.exe");
    	DWORD dwClientDLL = Mem.Module("client.dll");
    
    
    	while (true) {
    		DWORD dwLocalBase = Mem.Read<DWORD>(Offsets.dwLocalPlayer + dwClientDLL);
    		BYTE dwFlags = Mem.Read<DWORD>(dwLocalBase + Offsets.dwFlags);
    
    		if (dwFlags & FL_ONGROUND && GetAsyncKeyState(VK_SPACE)) {
    			Mem.Write<DWORD>(dwClientDLL + Offsets.dwForceJump, 6);
    		}
    	}
    
    
    	return 0;
    }

    Simple press the green play button to run your program. Make sure you’re running VB using admin privileges.


    Depris is offline

    Reply With Quote

    Old
    20th December 2016, 07:13 AM

     
    #2

    legitplayer1337

    The Legendary Cheater

    legitplayer1337's Avatar

    Join Date: Jan 2016

    Location: Czech Republic


    Posts: 539

    Reputation: 4521

    Rep Power: 183

    legitplayer1337 is a legend in the cheating communitylegitplayer1337 is a legend in the cheating communitylegitplayer1337 is a legend in the cheating communitylegitplayer1337 is a legend in the cheating communitylegitplayer1337 is a legend in the cheating communitylegitplayer1337 is a legend in the cheating communitylegitplayer1337 is a legend in the cheating communitylegitplayer1337 is a legend in the cheating communitylegitplayer1337 is a legend in the cheating communitylegitplayer1337 is a legend in the cheating communitylegitplayer1337 is a legend in the cheating community

    Points: 9,204, Level: 11

    Points: 9,204, Level: 11 Points: 9,204, Level: 11 Points: 9,204, Level: 11

    Level up: 46%, 596 Points needed

    Level up: 46% Level up: 46% Level up: 46%

    Activity: 1.4%

    Activity: 1.4% Activity: 1.4% Activity: 1.4%

    Last Achievements
    [C++] Creating your first cheat (Bunnyhop)

    Its not bad tutorial just 1 thing. Stop using ProcMem we are not in 2013.

    __________________

    Code:

    C:UsersMax KunesDocumentsVisual Studio 2015ProjectsCSGO-SDK-Example-masterReleasesource.pdb
    record x;stop (top forceupdate method)

    legitplayer1337 is offline

    Reply With Quote

    Old
    20th December 2016, 07:20 AM

     
    #3

    GDPR_Anonymous

    MVP

    GDPR_Anonymous's Avatar

    Join Date: Sep 2005


    Posts: 18,294

    Reputation: 425882

    Rep Power: 0

    GDPR_Anonymous has a huge epeen!GDPR_Anonymous has a huge epeen!GDPR_Anonymous has a huge epeen!GDPR_Anonymous has a huge epeen!GDPR_Anonymous has a huge epeen!GDPR_Anonymous has a huge epeen!GDPR_Anonymous has a huge epeen!GDPR_Anonymous has a huge epeen!GDPR_Anonymous has a huge epeen!GDPR_Anonymous has a huge epeen!GDPR_Anonymous has a huge epeen!

    Points: 1, Level: 1

    Points: 1, Level: 1 Points: 1, Level: 1 Points: 1, Level: 1

    Level up: 0%, 1 Points needed

    Level up: 0% Level up: 0% Level up: 0%

    Activity: 0%

    Activity: 0% Activity: 0% Activity: 0%

    Quote:

    Originally Posted by Depris
    View Post

    And we should have a perfect BHOP cheat.

    that eats 100% cpu

    I recommend sleeping in that infinite loop.

    And why this weird use of the struct? An enum class/global constexpr variables have it’s uses too.
    If it was meant to be a singleton you’re doing it very wrong.

    Personally I would rewrite it like this if you’re not using the sdk:

    Code:

    enum class Entity_flags : unsigned int {
    	on_ground   = (1 << 0),	  
    	ducking     = (1 << 1),	  
    	water_jump  = (1 << 2),	
    	on_train    = (1 << 3),    
    	in_rain     = (1 << 4),	  
    	frozen      = (1 << 5),     
    	at_controls = (1 << 6), 
    	client      = (1 << 7),	  
    	fake_client = (1 << 8),
    	in_water    = (1 << 9)
    };
    
    enum class Entity_offsets : DWORD {
    	flags = 0x100
    };
    
    enum class Client_offsets : DWORD {
    	local_player = 0x00AA5834,
    	force_jump   = 0x04F5EB58
    };


    Last edited by GDPR_Anonymous; 20th December 2016 at 07:33 AM.


    GDPR_Anonymous is offline

    Reply With Quote

    Old
    20th December 2016, 07:20 AM

     
    #4

    Depris

    A God

    Depris's Avatar


    Threadstarter

    Join Date: Dec 2016


    Posts: 184

    Reputation: 847

    Rep Power: 152

    Depris is Developing C+++Depris is Developing C+++Depris is Developing C+++Depris is Developing C+++Depris is Developing C+++Depris is Developing C+++Depris is Developing C+++

    Points: 5,992, Level: 8

    Points: 5,992, Level: 8 Points: 5,992, Level: 8 Points: 5,992, Level: 8

    Level up: 54%, 508 Points needed

    Level up: 54% Level up: 54% Level up: 54%

    Activity: 2.5%

    Activity: 2.5% Activity: 2.5% Activity: 2.5%

    Last Achievements
    [C++] Creating your first cheat (Bunnyhop)[C++] Creating your first cheat (Bunnyhop)

    Quote:

    Originally Posted by legitplayer1337
    View Post

    Its not bad tutorial just 1 thing. Stop using ProcMem we are not in 2013.

    Obviously I don’t use ProcMem in my own cheat. This is more for beginners. I’ll possibly discuss how to make a memory class in my next tutorial.

    Thanks for the feedback.


    Depris is offline

    Reply With Quote

    Old
    20th December 2016, 11:14 AM

     
    #5

    JStyler

    1337 H4x0!2

    JStyler's Avatar

    Join Date: May 2013


    Posts: 136

    Reputation: 3870

    Rep Power: 244

    JStyler is a legend in the cheating communityJStyler is a legend in the cheating communityJStyler is a legend in the cheating communityJStyler is a legend in the cheating communityJStyler is a legend in the cheating communityJStyler is a legend in the cheating communityJStyler is a legend in the cheating communityJStyler is a legend in the cheating communityJStyler is a legend in the cheating communityJStyler is a legend in the cheating communityJStyler is a legend in the cheating community

    Points: 13,795, Level: 15

    Points: 13,795, Level: 15 Points: 13,795, Level: 15 Points: 13,795, Level: 15

    Level up: 14%, 1,205 Points needed

    Level up: 14% Level up: 14% Level up: 14%

    Activity: 0%

    Activity: 0% Activity: 0% Activity: 0%

    Last Achievements
    [C++] Creating your first cheat (Bunnyhop)[C++] Creating your first cheat (Bunnyhop)

    You forgot dw_mouseEnable, else you will bhop while chatting and pressing space in pausemenu.

    Nice tutorial but next time you do it, make it properly.


    JStyler is offline

    Reply With Quote

    Old
    20th December 2016, 01:28 PM

     
    #6

    zxcvbnm12345

    n00bie

    zxcvbnm12345's Avatar

    Join Date: Dec 2016


    Posts: 5

    Reputation: 10

    Rep Power: 152

    zxcvbnm12345 has made posts that are generally average in quality

    Good tutorial. Thank you


    zxcvbnm12345 is offline

    Reply With Quote

    Old
    20th December 2016, 03:14 PM

     
    #7

    olsarets7

    UC Supporter

    olsarets7's Avatar

    Join Date: Mar 2014


    Posts: 288

    Reputation: 882

    Rep Power: 220

    olsarets7 Microsoft is Endangered By This Manolsarets7 Microsoft is Endangered By This Manolsarets7 Microsoft is Endangered By This Manolsarets7 Microsoft is Endangered By This Manolsarets7 Microsoft is Endangered By This Manolsarets7 Microsoft is Endangered By This Manolsarets7 Microsoft is Endangered By This Man

    Points: 5,945, Level: 8

    Points: 5,945, Level: 8 Points: 5,945, Level: 8 Points: 5,945, Level: 8

    Level up: 50%, 555 Points needed

    Level up: 50% Level up: 50% Level up: 50%

    Activity: 0%

    Activity: 0% Activity: 0% Activity: 0%

    Quote:

    Originally Posted by legitplayer1337
    View Post

    Its not bad tutorial just 1 thing. Stop using ProcMem we are not in 2013.

    ^ This.
    Otherwise, good job ma dude


    olsarets7 is offline

    Reply With Quote

    Old
    20th December 2016, 03:20 PM

     
    #8

    llefty

    n00bie

    llefty's Avatar

    Join Date: Sep 2016


    Posts: 8

    Reputation: 149

    Rep Power: 159

    llefty is in the shadow of all hacking legendsllefty is in the shadow of all hacking legends

    Points: 4,576, Level: 7

    Points: 4,576, Level: 7 Points: 4,576, Level: 7 Points: 4,576, Level: 7

    Level up: 9%, 824 Points needed

    Level up: 9% Level up: 9% Level up: 9%

    Activity: 6.1%

    Activity: 6.1% Activity: 6.1% Activity: 6.1%

    Last Achievements
    [C++] Creating your first cheat (Bunnyhop)[C++] Creating your first cheat (Bunnyhop)

    Thank you so much dude, this is really useful.


    llefty is offline

    Reply With Quote

    Old
    20th December 2016, 04:04 PM

     
    #9

    synthfx

    A Forum Hero

    synthfx's Avatar

    Join Date: Aug 2014

    Location: Germany


    Posts: 1,412

    Reputation: 17318

    Rep Power: 240

    synthfx Will always be a legend at UCsynthfx Will always be a legend at UCsynthfx Will always be a legend at UCsynthfx Will always be a legend at UCsynthfx Will always be a legend at UCsynthfx Will always be a legend at UCsynthfx Will always be a legend at UCsynthfx Will always be a legend at UCsynthfx Will always be a legend at UCsynthfx Will always be a legend at UCsynthfx Will always be a legend at UC

    Recognitions
    Award symbolizing a retired staff member who dedicated a notable amount of time and effort to their past staff position.
    Former Staff

    Points: 36,603, Level: 29

    Points: 36,603, Level: 29 Points: 36,603, Level: 29 Points: 36,603, Level: 29

    Level up: 13%, 2,197 Points needed

    Level up: 13% Level up: 13% Level up: 13%

    Activity: 8.8%

    Activity: 8.8% Activity: 8.8% Activity: 8.8%

    Last Achievements
    [C++] Creating your first cheat (Bunnyhop)[C++] Creating your first cheat (Bunnyhop)[C++] Creating your first cheat (Bunnyhop)

    An advice regarding your memory write function:

    — it should be universal, hence also a template function. Why not make the parameters also as universal as possible?

    Code:

    template < typename T >
    bool Write( std::uintptr_t address, T const& val ) {
    	return !!WriteProcessMemory( proc, reinterpret_cast< LPVOID >( address ), reinterpret_cast< LPCVOID >( &val ), sizeof( val ), nullptr );
    }

    uintptr_t is, depending on the configuration of your solution, either 32-bits or 64-bits long
    which ensures you can also address higher space in case of a 64-bit application.

    ‘T const& val’ is useful because of when the template’s deduced/passed type is larger than
    4 bytes it will still only copy 4 bytes because you are using a reference to it which is basically like using a pointer.
    Also I’d advise you to use const just for the logical consistency of the reference’s meaning and for the fact that this value should not be modified.

    Also use bool instead of BOOL. Instead of copying 4 bytes you are only copying 1 byte.
    This ‘!!expression’ notation explicitly converts the result of the expression to a boolean expression.

    —-

    Other than mentioning and using ProcMem, nice tutorial



    Last edited by synthfx; 20th December 2016 at 04:07 PM.


    synthfx is offline

    Reply With Quote

    Old
    20th December 2016, 07:01 PM

     
    #10

    fisherprice

    UnKnoWnCheaTeR

    fisherprice's Avatar

    Join Date: May 2016

    Location: China


    Posts: 959

    Reputation: 25707

    Rep Power: 200

    fisherprice has reputation that takes up 2GB of server space!fisherprice has reputation that takes up 2GB of server space!fisherprice has reputation that takes up 2GB of server space!fisherprice has reputation that takes up 2GB of server space!fisherprice has reputation that takes up 2GB of server space!fisherprice has reputation that takes up 2GB of server space!fisherprice has reputation that takes up 2GB of server space!fisherprice has reputation that takes up 2GB of server space!fisherprice has reputation that takes up 2GB of server space!fisherprice has reputation that takes up 2GB of server space!fisherprice has reputation that takes up 2GB of server space!

    Recognitions
    Members who have contributed financial support towards UnKnoWnCheaTs.
    Donator

    (1)

    Points: 37,306, Level: 29

    Points: 37,306, Level: 29 Points: 37,306, Level: 29 Points: 37,306, Level: 29

    Level up: 41%, 1,494 Points needed

    Level up: 41% Level up: 41% Level up: 41%

    Activity: 7.9%

    Activity: 7.9% Activity: 7.9% Activity: 7.9%

    Last Achievements
    [C++] Creating your first cheat (Bunnyhop)[C++] Creating your first cheat (Bunnyhop)[C++] Creating your first cheat (Bunnyhop)

    gj. just stay good old basic winapi call and include. procmem mean user stuck ask question here when tutorial finish. cannot progress if noob.

    __________________

    Quote:

    Recent completed projects: EFIPM — EFI Physmeme / ApexBot / ValorantBot

    null#0740


    fisherprice is offline

    Reply With Quote

    Old
    20th December 2016, 08:46 PM

     
    #11

    Burak DatLife

    Member

    Burak DatLife's Avatar

    Join Date: Jul 2015


    Posts: 64

    Reputation: 1870

    Rep Power: 187

    Burak DatLife -- If this mans rep is lowered; we will all dieBurak DatLife -- If this mans rep is lowered; we will all dieBurak DatLife -- If this mans rep is lowered; we will all dieBurak DatLife -- If this mans rep is lowered; we will all dieBurak DatLife -- If this mans rep is lowered; we will all dieBurak DatLife -- If this mans rep is lowered; we will all dieBurak DatLife -- If this mans rep is lowered; we will all dieBurak DatLife -- If this mans rep is lowered; we will all dieBurak DatLife -- If this mans rep is lowered; we will all dieBurak DatLife -- If this mans rep is lowered; we will all dieBurak DatLife -- If this mans rep is lowered; we will all die

    Points: 8,970, Level: 11

    Points: 8,970, Level: 11 Points: 8,970, Level: 11 Points: 8,970, Level: 11

    Level up: 25%, 830 Points needed

    Level up: 25% Level up: 25% Level up: 25%

    Activity: 2.2%

    Activity: 2.2% Activity: 2.2% Activity: 2.2%

    Last Achievements
    [C++] Creating your first cheat (Bunnyhop)[C++] Creating your first cheat (Bunnyhop)

    Nice tutorial for begginers.

    but why you are writing memory for bhop
    you can just simulate key press of spacebar


    Burak DatLife is offline

    Reply With Quote

    Old
    20th December 2016, 10:50 PM

     
    #12

    Depris

    A God

    Depris's Avatar


    Threadstarter

    Join Date: Dec 2016


    Posts: 184

    Reputation: 847

    Rep Power: 152

    Depris is Developing C+++Depris is Developing C+++Depris is Developing C+++Depris is Developing C+++Depris is Developing C+++Depris is Developing C+++Depris is Developing C+++

    Points: 5,992, Level: 8

    Points: 5,992, Level: 8 Points: 5,992, Level: 8 Points: 5,992, Level: 8

    Level up: 54%, 508 Points needed

    Level up: 54% Level up: 54% Level up: 54%

    Activity: 2.5%

    Activity: 2.5% Activity: 2.5% Activity: 2.5%

    Last Achievements
    [C++] Creating your first cheat (Bunnyhop)[C++] Creating your first cheat (Bunnyhop)

    Quote:

    Originally Posted by Burak DatLife
    View Post

    Nice tutorial for begginers.

    but why you are writing memory for bhop
    you can just simulate key press of spacebar

    In terms of detection doesn’t make any difference. Also less chance of fail.



    Last edited by Depris; 20th December 2016 at 11:51 PM.


    Depris is offline

    Reply With Quote

    Old
    27th December 2016, 06:38 PM

     
    #13

    user2plus

    Junior Member

    user2plus's Avatar

    Join Date: Dec 2016

    Location: Ukraine, Kyiv


    Posts: 35

    Reputation: 450

    Rep Power: 151

    user2plus is a preacher of ownage - listen and learnuser2plus is a preacher of ownage - listen and learnuser2plus is a preacher of ownage - listen and learnuser2plus is a preacher of ownage - listen and learnuser2plus is a preacher of ownage - listen and learn

    Points: 1,869, Level: 3

    Points: 1,869, Level: 3 Points: 1,869, Level: 3 Points: 1,869, Level: 3

    Level up: 67%, 231 Points needed

    Level up: 67% Level up: 67% Level up: 67%

    Activity: 1.4%

    Activity: 1.4% Activity: 1.4% Activity: 1.4%

    Last Achievements
    [C++] Creating your first cheat (Bunnyhop)

    Why u using lib’s for first hack? Only full code in your hax, because VAC has db with all yours libs…


    user2plus is offline

    Reply With Quote

    Old
    27th December 2016, 11:52 PM

     
    #14

    ReactiioN

    Junior Forum Moderator

    ReactiioN's Avatar

    Join Date: Sep 2012

    Location: ∞ DevOps


    Posts: 2,887

    Reputation: 80788

    Rep Power: 363

    ReactiioN has a huge epeen!ReactiioN has a huge epeen!ReactiioN has a huge epeen!ReactiioN has a huge epeen!ReactiioN has a huge epeen!ReactiioN has a huge epeen!ReactiioN has a huge epeen!ReactiioN has a huge epeen!ReactiioN has a huge epeen!ReactiioN has a huge epeen!ReactiioN has a huge epeen!

    Recognitions
    The UC Member of the Month award is a prestigious award given to a single community member on a monthly basis. Based on a vote from community members, the award is given to the forum member that has shown exemplary achievement and potential in the UnKnoWnCheaTs community, and has shown great commitment to upholding the principles upon which UnKnoWnCheaTs stands for. A member who has been awarded the Member of the Month award has been distinguished as an asset to the UnKnoWnCheaTs community.
    Member of the Month

    (1)

    Points: 112,967, Level: 48

    Points: 112,967, Level: 48 Points: 112,967, Level: 48 Points: 112,967, Level: 48

    Level up: 46%, 2,733 Points needed

    Level up: 46% Level up: 46% Level up: 46%

    Activity: 2.2%

    Activity: 2.2% Activity: 2.2% Activity: 2.2%

    Last Achievements
    [C++] Creating your first cheat (Bunnyhop)[C++] Creating your first cheat (Bunnyhop)[C++] Creating your first cheat (Bunnyhop)[C++] Creating your first cheat (Bunnyhop)[C++] Creating your first cheat (Bunnyhop)

    Quote:

    Originally Posted by user2plus
    View Post

    Why u using lib’s for first hack? Only full code in your hax, because VAC has db with all yours libs…

    What for a lib? He’s just using a fucking (low coded) header file. Thats not a library

    __________________

    My contributions:

    [C++] CSGO external Hitbox Manager | [Source-Engine] Reverse CL_Move Tutorial | [C++] Lua Script Engine | [C++] variadic Vector class | [C++] Lua Plugin System | [C++] D3D9 Overlay
    __________________________________________________________________________________________________

    __________________________________________________________________________________________________

    Jabber(XMPP): [email protected] | rule 7.


    ReactiioN is offline

    Reply With Quote

    Old
    28th December 2016, 01:34 AM

     
    #15

    Depris

    A God

    Depris's Avatar


    Threadstarter

    Join Date: Dec 2016


    Posts: 184

    Reputation: 847

    Rep Power: 152

    Depris is Developing C+++Depris is Developing C+++Depris is Developing C+++Depris is Developing C+++Depris is Developing C+++Depris is Developing C+++Depris is Developing C+++

    Points: 5,992, Level: 8

    Points: 5,992, Level: 8 Points: 5,992, Level: 8 Points: 5,992, Level: 8

    Level up: 54%, 508 Points needed

    Level up: 54% Level up: 54% Level up: 54%

    Activity: 2.5%

    Activity: 2.5% Activity: 2.5% Activity: 2.5%

    Last Achievements
    [C++] Creating your first cheat (Bunnyhop)[C++] Creating your first cheat (Bunnyhop)

    If you have experience in coding anything with the windows API, you can recreate your own memory class.


    Depris is offline

    Reply With Quote

    Old
    28th December 2016, 02:02 AM

     
    #16

    m1se

    The Legendary Cheater

    m1se's Avatar

    Join Date: Jul 2015


    Posts: 535

    Reputation: 9488

    Rep Power: 199

    m1se DEFINES UNKNOWNCHEATSm1se DEFINES UNKNOWNCHEATSm1se DEFINES UNKNOWNCHEATSm1se DEFINES UNKNOWNCHEATSm1se DEFINES UNKNOWNCHEATSm1se DEFINES UNKNOWNCHEATSm1se DEFINES UNKNOWNCHEATSm1se DEFINES UNKNOWNCHEATSm1se DEFINES UNKNOWNCHEATSm1se DEFINES UNKNOWNCHEATSm1se DEFINES UNKNOWNCHEATS

    Recognitions
    Members who have contributed financial support towards UnKnoWnCheaTs.
    Donator

    (2)

    Points: 16,966, Level: 17

    Points: 16,966, Level: 17 Points: 16,966, Level: 17 Points: 16,966, Level: 17

    Level up: 41%, 834 Points needed

    Level up: 41% Level up: 41% Level up: 41%

    Activity: 2.0%

    Activity: 2.0% Activity: 2.0% Activity: 2.0%

    Last Achievements
    [C++] Creating your first cheat (Bunnyhop)[C++] Creating your first cheat (Bunnyhop)[C++] Creating your first cheat (Bunnyhop)

    As you fucking stated, isn’t this supposed to be for «beginners», what makes you think that most people that read this thread, which I may state again «is for beginners», know how to use the windows API???!!!


    m1se is offline

    Reply With Quote

    Old
    28th December 2016, 03:18 AM

     
    #17

    Depris

    A God

    Depris's Avatar


    Threadstarter

    Join Date: Dec 2016


    Posts: 184

    Reputation: 847

    Rep Power: 152

    Depris is Developing C+++Depris is Developing C+++Depris is Developing C+++Depris is Developing C+++Depris is Developing C+++Depris is Developing C+++Depris is Developing C+++

    Points: 5,992, Level: 8

    Points: 5,992, Level: 8 Points: 5,992, Level: 8 Points: 5,992, Level: 8

    Level up: 54%, 508 Points needed

    Level up: 54% Level up: 54% Level up: 54%

    Activity: 2.5%

    Activity: 2.5% Activity: 2.5% Activity: 2.5%

    Last Achievements
    [C++] Creating your first cheat (Bunnyhop)[C++] Creating your first cheat (Bunnyhop)

    Quote:

    Originally Posted by m1se
    View Post

    As you fucking stated, isn’t this supposed to be for «beginners», what makes you think that most people that read this thread, which I may state again «is for beginners», know how to use the windows API???!!!

    Which is why I suggested to use ProcMem.


    Depris is offline

    Reply With Quote

    Old
    28th December 2016, 01:52 PM

     
    #18

    balto

    The Legendary Cheater

    balto's Avatar

    Join Date: Dec 2014


    Posts: 565

    Reputation: 2335

    Rep Power: 207

    balto is a legend in the cheating communitybalto is a legend in the cheating communitybalto is a legend in the cheating communitybalto is a legend in the cheating communitybalto is a legend in the cheating communitybalto is a legend in the cheating communitybalto is a legend in the cheating communitybalto is a legend in the cheating communitybalto is a legend in the cheating communitybalto is a legend in the cheating communitybalto is a legend in the cheating community

    Points: 22,869, Level: 21

    Points: 22,869, Level: 21 Points: 22,869, Level: 21 Points: 22,869, Level: 21

    Level up: 30%, 1,131 Points needed

    Level up: 30% Level up: 30% Level up: 30%

    Activity: 1.7%

    Activity: 1.7% Activity: 1.7% Activity: 1.7%

    Last Achievements
    [C++] Creating your first cheat (Bunnyhop)[C++] Creating your first cheat (Bunnyhop)[C++] Creating your first cheat (Bunnyhop)

    Quote:

    Originally Posted by Burak DatLife
    View Post

    Nice tutorial for begginers.

    but why you are writing memory for bhop
    you can just simulate key press of spacebar

    it’s actuality fails a lot I tried it. Memory best <3


    balto is offline

    Reply With Quote

    Old
    28th December 2016, 11:27 PM

     
    #19

    ReactiioN

    Junior Forum Moderator

    ReactiioN's Avatar

    Join Date: Sep 2012

    Location: ∞ DevOps


    Posts: 2,887

    Reputation: 80788

    Rep Power: 363

    ReactiioN has a huge epeen!ReactiioN has a huge epeen!ReactiioN has a huge epeen!ReactiioN has a huge epeen!ReactiioN has a huge epeen!ReactiioN has a huge epeen!ReactiioN has a huge epeen!ReactiioN has a huge epeen!ReactiioN has a huge epeen!ReactiioN has a huge epeen!ReactiioN has a huge epeen!

    Recognitions
    The UC Member of the Month award is a prestigious award given to a single community member on a monthly basis. Based on a vote from community members, the award is given to the forum member that has shown exemplary achievement and potential in the UnKnoWnCheaTs community, and has shown great commitment to upholding the principles upon which UnKnoWnCheaTs stands for. A member who has been awarded the Member of the Month award has been distinguished as an asset to the UnKnoWnCheaTs community.
    Member of the Month

    (1)

    Points: 112,967, Level: 48

    Points: 112,967, Level: 48 Points: 112,967, Level: 48 Points: 112,967, Level: 48

    Level up: 46%, 2,733 Points needed

    Level up: 46% Level up: 46% Level up: 46%

    Activity: 2.2%

    Activity: 2.2% Activity: 2.2% Activity: 2.2%

    Last Achievements
    [C++] Creating your first cheat (Bunnyhop)[C++] Creating your first cheat (Bunnyhop)[C++] Creating your first cheat (Bunnyhop)[C++] Creating your first cheat (Bunnyhop)[C++] Creating your first cheat (Bunnyhop)

    btw I wouldn’t call that ‘c++’

    __________________

    My contributions:

    [C++] CSGO external Hitbox Manager | [Source-Engine] Reverse CL_Move Tutorial | [C++] Lua Script Engine | [C++] variadic Vector class | [C++] Lua Plugin System | [C++] D3D9 Overlay
    __________________________________________________________________________________________________

    __________________________________________________________________________________________________

    Jabber(XMPP): [email protected] | rule 7.


    ReactiioN is offline

    Reply With Quote

    Reply


    Similar Threads
    Thread Thread Starter Forum Replies Last Post
    [Release] first internal bunnyhop BuzteR CS:GO Releases 3 1st July 2016 04:32 PM
    [Tutorial] Creating your first DLL and inject it pt. 1 evilplayer Programming for Beginners 22 9th February 2016 01:50 PM
    Creating your first C++ dll hack JoshRose C and C++ 59 8th August 2015 02:35 PM
    [Tutorial] Creating Your First Menu Tutorial sysdump Direct3D 7 22nd December 2012 11:28 AM
    [Tutorial] Creating your First Windows Sidebar Gadget CallMeEclipse General Programming and Reversing 7 10th July 2011 02:51 AM

    Tags

    memory, class, offsets, choose, function, read, dword, access, process, file

    «
    Previous Thread
    |
    Next Thread
    »

    Forum Jump

    All times are GMT. The time now is 03:06 AM.

    Contact Us —
    Toggle Dark Theme

    Terms of Use Information Privacy Policy Information
    Copyright ©2000-2023, Unknowncheats� UKCS #312436

    [C++] Creating your first cheat (Bunnyhop) [C++] Creating your first cheat (Bunnyhop)

    no new posts

    • Home
    • Forum
    • MultiPlayer Game Hacks & Cheats
    • Steam Games Hacks & Cheats
    • CounterStrike: Global Offensive Hacks
    • Counter Strike: Global Offensive Coding & Resources
    • [Outdated] [C++] How to make a simple external bunnyhop hack!

    1. Welcome to MPGH — MultiPlayer Game Hacking, the world’s leader in Game Hacks, Game Cheats, Trainers, Combat Arms Hacks & Cheats, Crossfire Hacks & Cheats, WarRock Hacks & Cheats, SoldierFront Hacks & Cheats, Project Blackout Hacks & Cheats, Operation 7 Hacks & Cheats, Blackshot Hacks & Cheats, A.V.A. Hacks & Cheats, Call of Duty Hacks & Cheats, Gunz Hacks & Cheats, Quake LIVE Hacks & Cheats, WolfTeam Hacks & Cheats, America’s Army Hacks & Cheats, Battlefield 2/2142 Hacks & Cheats, Battlefield Heroes Hacks & Cheats, Battlefield Bad Company 2 (BC2) Hacks & Cheats, Battlefield 3 (BF3) Hacks & Cheats, Maplestory Hacks & Cheats, Diablo 3 Hacks & Cheats, Starcraft 2 Hacks & Cheats, Heroes of Newerth Hacks & Cheats, Call of Duty Hacks & Cheats, Call of Duty 4 Hacks & Cheats, Modern Warfare Hacks & Cheats, Modern Warfare 2 Hacks & Cheats, Call of Duty Modern Warfare 3 Hacks & Cheats, Project Blackout Hacks & Cheats, Runescape Hacks & Bots, Minecraft Hacks & Mods, MAT Hacks & Cheats, All Points Bulletin Hacks & Cheats, Vindictus Hacks & Cheats, Dragon Nest Hacks & Cheats, DayZ Hacks & Cheats, WarZ Hacks & Cheats, Arctic Combat Hacks & Cheats, Black OPS 2 Hacks & Cheats, BlackLight Retribution Hacks & Cheats, Bullet Run Hacks & Cheats, All Points Bulletin Hacks & Cheats, Arctic Combat Hacks & Cheats, Warframe Hacks & Cheats, Crysis 3 Hacks & Cheats, Warface Hacks & Cheats, Realm of the Mad God Hacks & Cheats, War Thunder Hacks & Cheats, Call of Duty Ghosts Hacks & Cheats, Battlefield 4 Hacks & Cheats and cheats and trainers for many other multiplayer games.

      With several hundred thousand FREE hacks, cheats and bots, over 4 million members strong, a free and open marketplace and a great community, what else is there to ask for?

      REGISTER now for full benefits of our site, it’s completely FREE to join:

      • Access to our large gaming community with millions of discussions to participate in.
      • Free access to tutorials, resources, information, tools, trainers, cheats and hacks.
      • Interact with our great community, and make new friends with our members.
      • Active marketplace for gamers and people like you, with thousands of contributors and over half a million posts.
      • Let your voice be heard! You can post, reply, and share whatever is on your mind.
      • Ads are removed, almost completely ad free browsing.

      If you are having any issues, shoot us an email, Contact MPGH Support.

      As always, have fun and enjoy your stay!

      — MPGH Staff

    1. 02-23-2015


      #1

      [C++] How to make a simple external bunnyhop hack!

      Hello everyone, gonna teach you guys how to make a simple bunnyhop today.
      To get started you need to learn C++, if you do not know C++ i recommend you to read my Tutorial for getting started with gamehacking, which can be found Here!
      Credits for helping me ALOT with game hacking: @jkfauvel
      When you feel comfortable enough to create a hack you can continue with this tutorial!
      First of all, you need 2 files, ProcMem.h and ProcMem.cpp.
      Open a Project and Add a header file called ProcMem.h. Within this header file paste the content from this pastebin:
      ProcMem.h
      After that you will need to add a source file called ProcMem.cpp, paste the content from this pastebin into it:
      ProcMem.cpp
      After you are done copy pasting theese 2, create a new source folder and name it main.cpp, after you are done adding all of theese your project should look like this:

      After you have gotten all of the things sorted, we can start working on the code!

      Now we need to make our declarations!

      Code:

      #include "ProcMem.h" // including the header we just made!
      #include <iostream> // Used for ALOT of features.
      #include <Windows.h> // let us do stuff like keybd_event, sleep and alot of other stuff!
      // Not gonna need to use namespace std here, we have nothing to use it on! :)
      ProcMem Mem; // Shortcut for our Memory reading function!

      Once thoose are done, we need to start defining some things we are gonna need, such as key codes and key scans!

      Just under that type in:

      Code:

      #define key_space 0x20 // key_space is space button.
      #define key9 0x39 // key 9 is the button 9 (Not to be confused with numpad 9)
      #define key9_sc 0x0A // Scan code so we can use it in a keybd_event()
      void bhopFunc(); // This is where we are going to put our bunnyhop function!

      After you have gotten your declaration done, you need to get the latest offsets for csgo, you can get theese by using cheat engine or searching around! (Currently theese offsets are up to date as of 2015-02-24)

      Code:

      const DWORD localBase = 0xA6C90C // This is our localBase.
      const DWORD flagOffset = 0x100 // This is our m_fFlags offset!

      Now we have all our Offsets and declarations done, we can start working on our actual bunnyhop!
      We are now gonna make our bhopFunc and start reading the games memory!

      Code:

      void bhopFunc() {
      int FL_ONGROUND = 257; // When player is on ground this value is 257, 256 when in air.
      Mem.Process("csgo.exe"); // Process we are reading from.
      DWORD ClientDLL = Mem.Module("client.dll"); // This is the module we are reading from.
      }

      After you have choosen the Process and Module we’re reading from, you wanna add this which is our localPlayer and m_fFlags:

      Code:

      DWORD localPlayer = Mem.Read<DWORD>(ClientDLL + localBase); // This is our local player. 
      int m_fFlags = Mem.Read<DWORD>(localPlayer + flagOffset); // this is m_fFlags.

      Now we have everything we need to create our bhop, we need to actually make it jump when holding space bar!

      To do this we must add this line:

      Code:

      if (GetAsyncKeyState(key_space) & 0x8000 && m_fFlags == FL_ONGROUND) { /* If player is holding space, and m_fFlags is equal to 257 press space.*/
       keybd_event(KEY9, KEY9SC, 0, 0);
      
       keybd_event(KEY9, KEY9SC, KEYEVENTF_KEYUP, 0);
      }

      Everything we need is in the bunnyhop function, all we need to do is add a loop to our main function which calls our bhopFunc! Which can be done like this:

      Code:

      int main()
      {
      while(true) {
       bhopFunc();
      }
      
      }

      Now, hopefully you have your very own working bunnyhop hack. This exact method is probably detected, but have fun creating hacks guys!
      If you get banned using this method, dont blame me. I have warned you
      Make sure to click that «Thanks» button if helped you!
      Im gonna be heading to sleep now, if there are any issues you want help with, I’ll reply tomorrow!
      Edit: (Was tired when i made this, sorry for small misstakes!)
      Since this only spams a bunch of 9’s when holding down space you will have to open console and type the following:
      1. unbind space
      2. bind 9 «+jump»
      3. ?
      4. Profit

      Last edited by Yemiez; 02-24-2015 at 01:00 AM.

      Reason: Spelling issues.


    2. The Following 7 Users Say Thank You to Yemiez For This Useful Post:

      980322091 (05-15-2015),Adrenaline (10-07-2015),Galaxyxd (02-26-2015),OscR (04-05-2015),Qw1Kkb3an85 (05-03-2015),WolfLordSky (04-24-2015),Zugatti (06-08-2015)


    3. 02-23-2015


      #2

      Correct me if I’m wrong but from what I’ve seen, the cout ambiguous error is a bug that happens when you use cout too often. You are not using any iostream functions though… Consider placing credits….

      Last edited by jkfauvel; 02-23-2015 at 10:10 PM.

      In the midst of chaos, there is also opportunity.


    4. 02-24-2015


      #3

      Yemiez is offline

      Threadstarter

      Usually Dead

      Former Staff

      Yemiez's Avatar


      Send a message via Birdie™ to Yemiez

      Sweden

      Quote Originally Posted by jkfauvel
      View Post

      Correct me if I’m wrong but from what I’ve seen, the cout ambiguous error is a bug that happens when you use cout too often. You are not using any iostream functions though… Consider placing credits….

      I was very tired when i made this, and forgot alot of stuff, im try and edit in some stuff now before i head off to school, will do the rest later

      Last edited by Yemiez; 02-24-2015 at 01:06 AM.

      Reason: spelling misstake


    5. The Following User Says Thank You to Yemiez For This Useful Post:


    6. 02-24-2015


      #4

      Why the fuck should you unbind space to jump and use 9 for it? You can just send space.


    7. 02-24-2015


      #5

      Change

      Code:

      m_fFlags == FL_ONGROUND

      to

      Code:

      m_fFlags & 0x1 == 1

      If you have any questions regarding my hacks, add me on *******: Merccy#8314


    8. 02-24-2015


      #6

      Quote Originally Posted by Merccy2
      View Post

      Change

      Code:

      m_fFlags == FL_ONGROUND

      to

      Code:

      m_fFlags & 0x1 == 1

      Excuse my ignorance, but what does this changes in practical means?

      In the midst of chaos, there is also opportunity.


    9. 02-24-2015


      #7

      Quote Originally Posted by jkfauvel
      View Post

      Excuse my ignorance, but what does this changes in practical means?

      m_fFlags is a bitmasked value.
      The first bit (2 ^ 0 = 1) is the bit that is 1 when you are on the ground.
      The second bit (2 ^ 1 = 2) is the bit that is 1 when you are crouching.

      If you are checking m_fFlags to 257 it won’t work when you are on fire (1 of the bits will change hence changing the complete value).

      If you have any questions regarding my hacks, add me on *******: Merccy#8314


    10. The Following User Says Thank You to Merccy2 For This Useful Post:


    11. 02-24-2015


      #8

      Yemiez is offline

      Threadstarter

      Usually Dead

      Former Staff

      Yemiez's Avatar


      Send a message via Birdie™ to Yemiez

      Sweden

      Quote Originally Posted by Merccy2
      View Post

      m_fFlags is a bitmasked value.
      The first bit (2 ^ 0 = 1) is the bit that is 1 when you are on the ground.
      The second bit (2 ^ 1 = 2) is the bit that is 1 when you are crouching.

      If you are checking m_fFlags to 257 it won’t work when you are on fire (1 of the bits will change hence changing the complete value).

      I’ve been using a modified version of this method in my multi hack, it works, but maybe changing that will make it go faster? It does work perfectly still, so yea
      Edit: Just read your post abit more, what you mean by being on fire you, do you mean stuff like a molotov?

      Quote Originally Posted by Requiii
      View Post

      Why the fuck should you unbind space to jump and use 9 for it? You can just send space.

      Because it wont actually work with this method otherwise. if you have space bound it wont work, just sending space will do nothing, i’ve tried it
      It does spam space, but it wont actually jump!

      Last edited by Yemiez; 02-24-2015 at 07:30 AM.


    12. 02-24-2015


      #9

      Quote Originally Posted by PsychoBitch
      View Post

      I’ve been using a modified version of this method in my multi hack, it works, but maybe changing that will make it go faster? It does work perfectly still, so yea
      Edit: Just read your post abit more, what you mean by being on fire you, do you mean stuff like a molotov?

      Because it wont actually work with this method otherwise. if you have space bound it wont work, just sending space will do nothing, i’ve tried it
      It does spam space, but it wont actually jump!

      Onfire, I actually have no idea :P.

      Try to crouch and then bhop won’t work because the second bit has changed as well.

      You could just write 5 to client.dll + JUMP_OFFSET, sleep and write 4 to client.dll + JUMP_OFFSET.

      If you have any questions regarding my hacks, add me on *******: Merccy#8314


    13. The Following 2 Users Say Thank You to Merccy2 For This Useful Post:

      Block4o (05-31-2015),Yemiez (02-24-2015)


    14. 02-24-2015


      #10

      Quote Originally Posted by PsychoBitch
      View Post

      Because it wont actually work with this method otherwise. if you have space bound it wont work, just sending space will do nothing, i’ve tried it
      It does spam space, but it wont actually jump!

      That’s not true. If you set the bhop to send space when player is on ground and when space key is held it will work. Yet, you need to know the scan code (0x39) and virtual key code for space (0x20) (here is a table [I usually use the hex code, even though the decimal works]) then:

      Code:

      keybd_event(key_code, scan_code, 0, 0);
      
      keybd_event(key_code, scan_code, KEYEVENTF_KEYUP, 0);

      Where key_code is the virtual key code you wanna use (in this case 0x20) and scan_code is the scan code for the key you wanna use (in this case 0x39). Normally we don’t need the scan code when sending a key(windows that are not games often don’t use DirectInput), but CS:GO uses DirectInput so we need the scan code(don’t kill me if this isn’t entirely wrong).
      @Requiii This method works, but it’s not good, it does not jump in the right time and it’s slow.

      The workaround I came up with was setting the jump key to a different one(you can do this in several different ways), like 9. Then send the jump key when player is on ground and when space is held, same way you did with the example I gave. This method works completely fine.

      There’s for sure other workarounds that are way better, but haven’t got the time to think of it and it’s only a bhop, this was the easiest method I found…

      Last edited by jkfauvel; 02-24-2015 at 02:40 PM.

      In the midst of chaos, there is also opportunity.


    15. The Following User Says Thank You to jkfauvel For This Useful Post:


    16. 02-24-2015


      #11

      so confused, how do you guys determine where all the spaces go, the ()’s etc etc. i will probs do this tut soon but it all looks so complicated— — — Updated — — —

      p.s can you post the full code below? or give a dl link so we can test it and everything


    17. 02-25-2015


      #12

      Quote Originally Posted by PvPGod_
      View Post

      so confused, how do you guys determine where all the spaces go, the ()’s etc etc. i will probs do this tut soon but it all looks so complicated

      — — — Updated — — —

      p.s can you post the full code below? or give a dl link so we can test it and everything

      https://www.learncpp.com/

      If you have any questions regarding my hacks, add me on *******: Merccy#8314


    18. The Following User Says Thank You to Merccy2 For This Useful Post:


    19. 02-25-2015


      #13

      Tip: put «-insecure» in the starting parameters of cs.
      You will can not get banned that way


    20. 02-25-2015


      #14

      Quote Originally Posted by PsychoBitch
      View Post

      I’ve been using a modified version of this method in my multi hack, it works, but maybe changing that will make it go faster? It does work perfectly still, so yea
      Edit: Just read your post abit more, what you mean by being on fire you, do you mean stuff like a molotov?

      Because it wont actually work with this method otherwise. if you have space bound it wont work, just sending space will do nothing, i’ve tried it
      It does spam space, but it wont actually jump!

      Why does it work with my public hack? (inb4 everybody c&p’s this and complains about bans or not working)

      Code:

      #cs ----------------------------------------------------------------------------
      
       Version:		1.0.0.0
       Author:		Requi
      
       Script Function:
      	Bunnyhop Script for CS:GO
      
      #ce ----------------------------------------------------------------------------
      
      #RequireAdmin
      #include <SendMessage.au3>
      #include <WinAPI.au3>
      #include <NomadMemoryPF.au3>
      
      $playerBase = 0x4A0E024
      $flagOffset = 0x100
      $pHandle = 0
      $pID = 0
      $clientDll = 0
      $hwnd = 0
      $hDLL = DllOpen("user32.dll")
      
      $pID = ProcessExists("csgo.exe")
      If $pID <> 0 Then
         $pHandle = _MemoryOpen($pID)
         $clientDll = _ProcessGetModuleBaseAddress($pID, "client.dll")
         $hwnd = WinGetHandle("Counter-Strike: Global Offensive")
         If @error Then
      	  MsgBox(0, "", "An error occured getting handle of window")
         EndIf
         BunnyHop()
      EndIf
      
      Func _IsPressed($sHexKey, $vDLL = 'user32.dll')
      	Local $a_R = DllCall($vDLL, "short", "GetAsyncKeyState", "int", '0x' & $sHexKey)
      	If @error Then Return SetError @error, @extended, False)
      	Return BitAND($a_R[0], 0x8000) <> 0
       EndFunc
      
      Func BunnyHop()
         While True
      	 If(_IsPressed("20", $hDLL)) Then
      		$localPlayer = GetLocalPlayer()
      		$fFlag = GetEntityFlag($localPlayer)
      		If $fFlag = 257 And _WinAPI_GetForegroundWindow() = $hwnd Then
      		   _SendMessageA($hwnd, 0x100, 0x20, 0x390000)
      		   Sleep(30)
      		   _SendMessageA($hwnd, 0x101, 0x20, 0x390000)
      		   Sleep(30)
      		EndIf
      	 EndIf
         WEnd
      EndFunc
      
      Func GetLocalPlayer()
         Return _MemoryRead($clientDll + $playerBase, $pHandle)
      EndFunc
      
      Func GetEntityFlag($ent)
         Return _MemoryRead($ent + $flagOffset, $pHandle)
      EndFunc

    21. 02-25-2015


      #15

      Yemiez is offline

      Threadstarter

      Usually Dead

      Former Staff

      Yemiez's Avatar


      Send a message via Birdie™ to Yemiez

      Sweden

      Quote Originally Posted by Requiii
      View Post

      Why does it work with my public hack? (inb4 everybody c&p’s this and complains about bans or not working)

      Code:

      #cs ----------------------------------------------------------------------------
      
       Version:		1.0.0.0
       Author:		Requi
      
       Script Function:
      	Bunnyhop Script for CS:GO
      
      #ce ----------------------------------------------------------------------------
      
      #RequireAdmin
      #include <SendMessage.au3>
      #include <WinAPI.au3>
      #include <NomadMemoryPF.au3>
      
      $playerBase = 0x4A0E024
      $flagOffset = 0x100
      $pHandle = 0
      $pID = 0
      $clientDll = 0
      $hwnd = 0
      $hDLL = DllOpen("user32.dll")
      
      $pID = ProcessExists("csgo.exe")
      If $pID <> 0 Then
         $pHandle = _MemoryOpen($pID)
         $clientDll = _ProcessGetModuleBaseAddress($pID, "client.dll")
         $hwnd = WinGetHandle("Counter-Strike: Global Offensive")
         If @error Then
      	  MsgBox(0, "", "An error occured getting handle of window")
         EndIf
         BunnyHop()
      EndIf
      
      Func _IsPressed($sHexKey, $vDLL = 'user32.dll')
      	Local $a_R = DllCall($vDLL, "short", "GetAsyncKeyState", "int", '0x' & $sHexKey)
      	If @error Then Return SetError @error, @extended, False)
      	Return BitAND($a_R[0], 0x8000) <> 0
       EndFunc
      
      Func BunnyHop()
         While True
      	 If(_IsPressed("20", $hDLL)) Then
      		$localPlayer = GetLocalPlayer()
      		$fFlag = GetEntityFlag($localPlayer)
      		If $fFlag = 257 And _WinAPI_GetForegroundWindow() = $hwnd Then
      		   _SendMessageA($hwnd, 0x100, 0x20, 0x390000)
      		   Sleep(30)
      		   _SendMessageA($hwnd, 0x101, 0x20, 0x390000)
      		   Sleep(30)
      		EndIf
      	 EndIf
         WEnd
      EndFunc
      
      Func GetLocalPlayer()
         Return _MemoryRead($clientDll + $playerBase, $pHandle)
      EndFunc
      
      Func GetEntityFlag($ent)
         Return _MemoryRead($ent + $flagOffset, $pHandle)
      EndFunc

      Did you read what jkfauvel said at all?


    Similar Threads

    1. Replies: 6

      Last Post: 09-30-2012, 10:56 PM

    2. Replies: 2

      Last Post: 02-01-2010, 12:58 AM

    3. Replies: 0

      Last Post: 06-14-2009, 06:03 PM

    4. Replies: 10

      Last Post: 04-23-2009, 06:26 PM

    5. Replies: 2

      Last Post: 04-21-2009, 06:30 PM

    Tags for this Thread

    1. /* http://pastebin.com/WyaR6ACM — ProcMem.h

    2.  * http://pastebin.com/A6uG024r — ProcMem.cpp */

    3. /* by jkfauvel MPGH.net

    4.  * CS:GO BHOP

    5.  * Thanks to the one who have made ProcMem class

    6.  * Not using namespace std; because it may make ambiguous, thus give you an error

    7.  */

    8. #include <Windows.h> //All KeyState func and a lot more

    9. #include <iostream> //Shit ton of things

    10. #include «ProcMem.h» //Set up permissions, creates byte array, allowing us to read memory

    11. #define PRESSED 0x8000 //Determines key press(highest bit)

    12. #define SPACE 0x20 //Virtual Key Code ‘SPACE’

    13. #define KEY9 0x39 //Virtual Key Code ‘9’ (not to confuse with keypad 9)

    14. #define KEY9SC 0x0A //Scan Code  *You usually don’t need this, but CS:GO uses DirectInput so we need to use this*

    15. ProcMem Mem; //Creates object of ProcMem class

    16. void endProgram(); //Declaring some funcs

    17. //Changes when CS:GO updates:

    18. const DWORD playerBase = 0xA6B91C; //OUTDATED OFFSET *client.dll*

    19. //Does not change when CS:GO updates:

    20. const DWORD healthOffset = 0xFC; //*client.dll*

    21. const DWORD m_fFlags = 0x100; //*client.dll*

    22. const DWORD EntLoopDist = 0x10; //Distance between entities in Entity array *You don’t need this, BHOP only uses our player info*

    23. struct PlayerLocal_t //Struct to hold our player’s data

    24. {

    25. int Flags; //State of our player *Is he jumping, crouching….*

    26. int Health; //Health

    27.     DWORD ClientDLL; //Module to read from

    28.     DWORD LocalPlayer; //Get our player’s information

    29. void ReadInfo() //Func to read memory

    30. {

    31.         Mem.Process(«csgo.exe»); //Set process name

    32.         ClientDLL = Mem.Module(«client.dll»); //Module to read from

    33.         LocalPlayer = Mem.Read<DWORD>(ClientDLL + playerBase); //Get our player’s information

    34.         Flags = Mem.Read<int>(LocalPlayer + m_fFlags); //Get flag state

    35.         Health = Mem.Read<int>(LocalPlayer + healthOffset); //Get health

    36. }

    37. }PlayerLocal;

    38. BOOL findWindow(LPCSTR Window) //Func to find our CS:GO window

    39. {

    40.     HWND hWnds = FindWindow(NULL, TEXT(Window));

    41. if (hWnds == NULL)

    42. return false;

    43. else

    44. return true;

    45. }

    46. BOOL compareWnd(char AWnd[323]) //Func to compare active window with CS:GO window

    47. {

    48. char wnd_title[256];

    49.     HWND hwnd = GetForegroundWindow();

    50.     GetWindowText(hwnd, wnd_title, sizeof(wnd_title));

    51. if (strcmp(wnd_title, AWnd) == 0)

    52. return true;

    53. else

    54. return false;

    55. }

    56. BOOL keyState(int vKey, int vState) //I don’t like writing GetAsyncKeyState every time ;)

    57. {

    58. return GetAsyncKeyState(vKey) & vState;

    59. }

    60. void sendKeys() //Func to send KEY9 to active window

    61. {

    62.     keybd_event(KEY9, KEY9SC, 0, 0);

    63.     Sleep(10); //Delay to diminush number of times key is sent and diminush CPU usage

    64.     keybd_event(KEY9, KEY9SC, KEYEVENTF_KEYUP, 0);

    65. }

    66. void endProgram() //Func to end program *Makes code cleaner*

    67. {

    68.     std::cout << «Exiting… « << std::endl;

    69.     Sleep(1500);

    70. exit(0);

    71. }

    72. void searchWindow() //Will search for CS:GO window

    73. {

    74.     Sleep(100);

    75.     std::cout << «by jkfauvel» << std::endl;

    76.     std::cout << «—————————————————————— « << std::endl;

    77.     std::cout << «Searching for process…»;

    78.     Sleep(200);

    79.     LPCSTR Wnd = «Counter-Strike: Global Offensive»; //Check if there is a window named as stated                                                                

    80. if (!findWindow(Wnd)) //If window is not found then print ‘something’ and call EndProgram() func

    81. {

    82.         Sleep(1500);

    83.         std::cout << » PROCESS: Process Not Found! « << std::endl;

    84.         Sleep(2000);

    85.         endProgram();

    86. }

    87. else if (findWindow(Wnd)) //If windows is found then continue with the code

    88. {

    89.         Sleep(300);

    90.         std::cout << » PROCESS: Process Found! « << std::endl;

    91.         Sleep(1500);

    92. }

    93. }

    94. void optionsList() //List of BHOP options

    95. {

    96.     std::cout << «—————————————————————— « << std::endl;

    97.     std::cout << «Set your jump hotkey to Keyboard 9 ‘NOT KEYPAD 9’ (Game options) « << std::endl;

    98.     std::cout << «Press END to exit « << std::endl;                                                          

    99.     std::cout << «Hold SPACE to Bunnyhop « << std::endl;

    100.     std::cout << «—————————————————————— « << std::endl;

    101. }

    102. void bhop() //Func to determine if sendKeys() func will be called *essentially func to BHOP*

    103. {

    104.     PlayerLocal.ReadInfo(); //Read player’s info

    105. char wndCsgo[33] = «Counter-Strike: Global Offensive»; //Set the window we want to compare

    106. /*Check if player is on ground *257 is on ground 256 is on air*;

    107.      *Check if player’s health is more or equal to 1 *1 means dead for some reason*;

    108.      *Call compareWnd() to compare active window with that of CS:GO;

    109.      *Check if space is held

    110.      */

    111. if (PlayerLocal.Flags == 257 && PlayerLocal.Health >= 1 && compareWnd(wndCsgo) && keyState(SPACE, PRESSED))

    112.         sendKeys(); //Call sendKeys() func

    113. }

    114. int main() //main() func *tie all of the program*

    115. {

    116.     searchWindow();

    117.     optionsList(); //»Load options list *Call optionsList() func*»

    118. while (true) //Infinite loop

    119. {

    120.         bhop();

    121. if (keyState(0x23, PRESSED)) //0x23 = ENDK

    122.             endProgram();

    123.         Sleep(1);

    124. }

    125. }

    Понравилась статья? Поделить с друзьями:
  • Как написать бухгалтер на английском языке
  • Как написать бутылку акварелью
  • Как написать бурматову владимиру владимировичу письмо
  • Как написать буркову александру
  • Как написать буриме