Questioncode problem

Posts 1–8 of 8 · Page 1 of 1
code problem
Code:
VOID MemHack()
{
	DWORD dwCShell = (DWORD)GetModuleHandleA(EncCShell);
	DWORD pWeaponMgr = *(DWORD*)(dwCShell + WeaponMgr);

	if(pWeaponMgr != NULL)
	{
		if (noreload)
		{
			Beep(520,100);
			for(int i = 0; i < maxweploop; i++)
				if((*(DWORD*)(pWeaponMgr+(4*i))) != NULL)
					*(float*)((*(DWORD*)(pWeaponMgr+(4*i))) + NoReload) = 100.0f;
				else
				{
					Sleep(10);
					if((*(DWORD*)(pWeaponMgr+(4*i))) != NULL)
						*(float*)((*(DWORD*)(pWeaponMgr+(4*i))) + NoReload) = 100.0f;
				}
		}
	}
	else
	{
		Sleep(10);
		MemHack();
	}
}
Without the sleeps, the hacks wouldn't work. But the flaw with this code is that it will take more loading time.
Is there any other way to code it?
Code:
VOID MemHack()
{
while(true)
{
	DWORD dwCShell = (DWORD)GetModuleHandleA(EncCShell);
	DWORD pWeaponMgr = *(DWORD*)(dwCShell + WeaponMgr);

	if(pWeaponMgr != NULL)
	{
		if (noreload)
		{
			for(int i = 0; i < maxweploop; i++)
				if((*(DWORD*)(pWeaponMgr+(4*i))) != NULL)
					*(float*)((*(DWORD*)(pWeaponMgr+(4*i))) + NoReload) = 100.0f;
		}
	}
Sleep(10);
}
//MemHack(); //This cause a HUGE lag
}
Quote Originally Posted by rabir007 View Post
Code:
VOID MemHack()
{
while(true)
{
    DWORD dwCShell = (DWORD)GetModuleHandleA(EncCShell);
    DWORD pWeaponMgr = *(DWORD*)(dwCShell + WeaponMgr);

    if(pWeaponMgr != NULL)
    {
        if (noreload)
        {
            for(int i = 0; i < maxweploop; i++)
                if((*(DWORD*)(pWeaponMgr+(4*i))) != NULL)
                    *(float*)((*(DWORD*)(pWeaponMgr+(4*i))) + NoReload) = 100.0f;
        }
    }
Sleep(10);
}
//MemHack(); //This cause a HUGE lag
}
OMG , Why PuttingCode:

DWORD dwCShell = (DWORD)GetModuleHandleA(EncCShell); DWORD pWeaponMgr = *(DWORD*)(dwCShell + WeaponMgr);
into The [[ While (1) ]]
that will cause a really huge lagggggggggggggggggggggggggggg !!!!!!



Quote Originally Posted by DarkPladin View Post
OMG , Why Putting
Code:
DWORD dwCShell = (DWORD)GetModuleHandleA(EncCShell);
    DWORD pWeaponMgr = *(DWORD*)(dwCShell + WeaponMgr);
into The [[ While (1) ]]
that will cause a really huge lagggggggggggggggggggggggggggg !!!!!!
Man, i just repidly checked, and modified a bit, to remove the Recursive calling...
Quote Originally Posted by ayawmanmik View Post
Its Detected
There is a way to make it UD...
u mean recursive calling makes more lag than recursive creating Cshell Handle and the WepMgr !!?
#sry 4 bad english !
You're missing a loop...
Posts 1–8 of 8 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us