Weapon Logger
I found in ollydbg the string WeaponName and i noticed that the name of the weapon is stored at weaponptr + 0x8. So i decided to make a weapon logger but it won't work, my program shuts down when i press the hotkey to output the names, it says that it stopped responding. Here is my loop that does it:
Any idea of what i am doing wrong?
Code:
while(true)
{
if(GetAsyncKeyState(VK_NUMPAD1)&1)
{
for(int i = 0; i<512; i++)
{
if(((*(DWORD*)((*(DWORD*)(base + 0xA314B0 ) + (4*i))) != NULL))) weaponname = (char*)((*(DWORD*)((*(DWORD*) (base + 0xA314B0)) + (4*i))) + 0x8);
cout<<weaponname<<"\n";
}
}
}

)