Results 1 to 2 of 2
  1. #1
    eyalolgadol1's Avatar
    Join Date
    Jul 2020
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0

    I'd like to know why my little external hack is not working

    #include <iostream>
    #include <Windows.h>
    using namespace std;

    int main()
    {
    DWORD pid;
    DWORD playerHealth = 0x1DFE9F5B680;
    int value = 0;

    HWND hwnd = FindWindowA(0, "Grand Theft Auto V");
    if (hwnd == NULL)
    {
    cout << "Cannot find window" << endl;
    }

    GetWindowThreadProcessId(hwnd, &pid);
    HANDLE handle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);

    if (GetAsyncKeyState(VK_SPACE))
    {
    WriteProcessMemory(hwnd, (LPVOID)playerHealth, &value, sizeof(value), 0);
    }

    }


    this is a little external hack in c++ i made.
    the address in question works when i change it through cheat engine, but when i compile the code and press space, it doesn't work.
    this is a console application.
    the address is a dynamic address ,but i have not closed the game yet and it works through cheat engine, so it should work here too.

  2. #2
    NachoImperium's Avatar
    Join Date
    Aug 2018
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    Quote Originally Posted by eyalolgadol1 View Post
    #include <iostream>
    #include <Windows.h>
    using namespace std;

    int main()
    {
    DWORD pid;
    DWORD playerHealth = 0x1DFE9F5B680;
    int value = 0;

    HWND hwnd = FindWindowA(0, "Grand Theft Auto V");
    if (hwnd == NULL)
    {
    cout << "Cannot find window" << endl;
    }

    GetWindowThreadProcessId(hwnd, &pid);
    HANDLE handle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid);

    if (GetAsyncKeyState(VK_SPACE))
    {
    WriteProcessMemory(hwnd, (LPVOID)playerHealth, &value, sizeof(value), 0);
    }

    }


    this is a little external hack in c++ i made.
    the address in question works when i change it through cheat engine, but when i compile the code and press space, it doesn't work.
    this is a console application.
    the address is a dynamic address ,but i have not closed the game yet and it works through cheat engine, so it should work here too.
    I think this:
    Code:
      DWORD playerHealth = 0x1DFE9F5B680;
    is a non-static addr. So if you are restarting your game and trying to write at this addr, it's not working.
    Otherwise, do you get the current health value when you try to read this address?

Similar Threads

  1. I would like to know why my thread was deleted.
    By TrenGod in forum Staff Disputes
    Replies: 3
    Last Post: 03-15-2017, 04:53 PM
  2. I would like to know how to do those hacks :D
    By deviil0007 in forum Combat Arms Hack Requests
    Replies: 0
    Last Post: 06-28-2011, 08:37 PM
  3. my hack does not work right does anyone know why?
    By dorobando in forum CrossFire Hacks & Cheats
    Replies: 4
    Last Post: 10-29-2009, 03:57 AM
  4. I know why there is 0 hacks =)
    By Gigit in forum Combat Arms Europe Hacks
    Replies: 12
    Last Post: 02-09-2009, 11:43 AM
  5. Why is this considered hacking and not cheating?
    By Scientologist in forum Combat Arms Hacks & Cheats
    Replies: 5
    Last Post: 09-06-2008, 07:57 PM