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
}
Originally Posted by rabir007
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 !!!!!!