HelpIs there anything wrong with this loop?

Posts 1–9 of 9 · Page 1 of 1
Is there anything wrong with this loop?
Addresses are correctly defined, but whenever I turn it on, CF just crashes(no error message, no Xtrap warning, nothing):

Code:
for(int y =0; y<321;y++)
				{
					*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) + WeaponRange) = 172200;
				}
It happens with any hack that uses WeaponMgr, but others(Fast Defuse, No Fall Damage) are working fine... any help?
Quote Originally Posted by JamesRo View Post
Addresses are correctly defined, but whenever I turn it on, CF just crashes(no error message, no Xtrap warning, nothing):

Code:
for(int y =0; y<321;y++)
				{
					*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) + WeaponRange) = 172200;
				}
It happens with any hack that uses WeaponMgr, but others(Fast Defuse, No Fall Damage) are working fine... any help?
this could be because its a wrong addy of your WeaponMgr or the wrong addy with WeaponRange
also make sure you have these if statements in your loop.

DWORD pWeaponMgr = *(DWORD*)(dwCShell + WeaponMgr);
if(pWeaponMgr)
{
for(int y=0; y<321; y++)
if((*(DWORD*)(pWeaponMgr+(4*y))) != NULL)
//memhack here
}
For some reson, pWeaponMgr is returning NULL to me, I checked with this code:
Code:
if(GetAsyncKeyState(VK_NUMPAD0)&1)
		{
			DWORD pWeaponMgr = *(DWORD*)(CShell + WeaponMgr);
				
				if(pWeaponMgr==NULL)
				{
					Beep(500,100);//When I press 0, I hear a beep because pWeaponMgr is null...
					/*for(int i = 0; i< 445; i++)
					{
						if((*(DWORD*)(pWeaponMgr+(4*i))) != NULL)
						{
							*(float*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i))) + 0x80C) = 117220;
						}
					}*/
				}		
		}
Anyone ever had this problem?
@JamesRo The problem is you cant code
Quote Originally Posted by ARGB View Post
@JamesRo The problem is you cant code
I've just solved it, so your logic fails
Quote Originally Posted by JamesRo View Post
I've just solved it, so your logic fails
no, I bet you cant code, just because you 'made' a hack you arent a coder
you use public resources, thats nothing special. Do it alone; learn C/C++!
Quote Originally Posted by ARGB View Post
no, I bet you cant code, just because you 'made' a hack you arent a coder
you use public resources, thats nothing special. Do it alone; learn C/C++!
Join Date
Apr 2013

Thanks for the advice, Mr. Newcomer.
Quote Originally Posted by JamesRo View Post
Join Date
Apr 2013

Thanks for the advice, Mr. Newcomer.
emm, anyways I found this site before I started learning C++, I code now for 2.5 years ..
Since when do you leech?
Posts 1–9 of 9 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us