Reading FlashDuration always returns > 0
I am trying to read flashduration after accomplishing getting a module of another process. I am trying now to read the flashduration for a noflash. This won't be part of my cheat but it's for testing.
It always is > 0 however and it should be 0 while not being flashed in game...
getting client:
Reading memory (kinda messy)
reading flash (i constantly update localplayer)
Getting localplayer
offsets
for some reason, I can't tell why, it is always returning > 0 and doing whatever is after the if statement. Is this something to do with my ReadProcessMemory or something to do with the game/offsets.
I got offsets myself
It always is > 0 however and it should be 0 while not being flashed in game...
getting client:
Code:
DWORD GetClient() {
mEntry.dwSize = sizeof(MODULEENTRY32);
snap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, pID);
if (Module32First(snap, &mEntry) == TRUE)
{
while (Module32Next(snap, &mEntry) == TRUE)
{
if (_stricmp(mEntry.szModule, LPSTR("client.dll")) == 0)
{
CloseHandle(snap);
return (DWORD)mEntry.modBaseAddr;
}
}
}
CloseHandle(snap);
return 0;
}
Code:
float floatRead(DWORD address) {
float value;
ReadProcessMemory(process, (LPCVOID)address, &value, sizeof(value), 0);
return value;
}
Code:
flashDuration = memory.floatRead(localplayer + m_fFlashDuration);
if (flashDuration > 0) {
Code:
localplayer = (client + m_dwLocalPlayer);
Code:
DWORD m_fFlashDuration = 0xA2F8; DWORD m_dwLocalPlayer = 0xA3A43C; DWORD client; DWORD localplayer;
I got offsets myself
