HelpReading FlashDuration always returns > 0

Posts 1–5 of 5 · Page 1 of 1
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:

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;
	}
Reading memory (kinda messy)

Code:
float floatRead(DWORD address) {
	float value;
	ReadProcessMemory(process, (LPCVOID)address, &value, sizeof(value), 0);
	return value;
	}
reading flash (i constantly update localplayer)
Code:
flashDuration = memory.floatRead(localplayer + m_fFlashDuration);
if (flashDuration > 0) {
Getting localplayer
Code:
localplayer = (client + m_dwLocalPlayer);
offsets
Code:
DWORD m_fFlashDuration = 0xA2F8;
DWORD m_dwLocalPlayer = 0xA3A43C;
DWORD client; 
DWORD localplayer;
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
Try to use MaxFlashAlpha instead of FlashDuration.
You can just set m_flMaxFlashAlpha to 0
Quote Originally Posted by chudakprofiiq View Post
You can just set m_flMaxFlashAlpha to 0
Not the method I want to use.

Still getting similar issues.
Been over a week since last update/bump after answers, assuming solved.

/Closed.
Posts 1–5 of 5 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?