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";
}
}
}
//some globals
#include <fstream>
using namespace std;
ofstream ofile;
char dlldir[320];
char* GetDirectoryFile(char* filename)
{
char path[320];
strcpy(path, dlldir);
strcat(path, filename);
return path;
}
//in your dllmain (under DLL_PROCESS_ATTACH)
GetModuleFileNameA(hDll, dlldir, 512);
for(int i = strlen(dlldir); i > 0; i--) { if(dlldir[i] == '\\') { dlldir[i+1] = 0; break; } }
ofile.open(GetDirectoryFile("Weapon Log.txt"), ios::app);
//in dllmain (under DLL_PROCESS_DETACH)
ofile.close();
//in weapon loop
char* WepName = (char*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*i))) + 8);
ofile << "index: " << i << " name: " << WepName << "\n";
)