Solved Multi-level Pointer CS:S C++

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat


Full Member
Dec 29, 2015
Hi, so my problem is that I dont know how to write a Multilevelpointer into C++ code.
I can easily access the value of the ammo with this pointer in CE: ["server.dll"+004F324C]+0x50+0x8+0x1C4+0x4B0

#include <iostream>
#include <windows.h>
#include <tlhelp32.h>
#include <tchar.h>

using namespace std;

DWORD_PTR dwGetModuleBaseAddress(DWORD dwProcID, TCHAR *szModuleName);
DWORD serverdllBaseAddress = 0;

DWORD_PTR dwGetModuleBaseAddress(DWORD dwProcID, TCHAR *szModuleName)
DWORD_PTR dwModuleBaseAddress = 0;
HANDLE hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE | TH32CS_SNAPMODULE32, dwProcID);
if (hSnapshot != INVALID_HANDLE_VALUE)
MODULEENTRY32 ModuleEntry32;
ModuleEntry32.dwSize = sizeof(MODULEENTRY32);
if (Module32First(hSnapshot, &ModuleEntry32))
if (_tcsicmp(ModuleEntry32.szModule, szModuleName) == 0)
dwModuleBaseAddress = (DWORD_PTR)ModuleEntry32.modBaseAddr;
} while (Module32Next(hSnapshot, &ModuleEntry32));
return dwModuleBaseAddress;

int main()
HWND hwnd = FindWindowA(0, "Counter-Strike Source");
GetWindowThreadProcessId(hwnd, &dwProcID);
cout << "pid is: " << dwProcID << endl;
serverdllBaseAddress = dwGetModuleBaseAddress(dwProcID, _T("server.dll"));
int newAMMO = 200;
DWORD AMMO = (serverdllBaseAddress + 0x004F324C) + 0x50 + 0x8 + 0x1C4 + 0x4B0; //<- Is this the correct way to write it?
HANDLE pHandle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, dwProcID);
WriteProcessMemory(pHandle, (LPVOID)AMMO, &newAMMO, sizeof(newAMMO), 0);
cout << "server.dll: " << hex << serverdllBaseAddress << endl;


(link to image , when I try to upload it here, it says invalid file.. )
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods