Don't listen to the rest
First you need to find the pointer to the weapon array:
Then you need to make a loop through the whole array:
Code:
for(int i = 0; i < 600; i++) { //You can see later how many weapons there are. Then you can lower the loop.
}
Look every weapon name in the loop. So you need to find the weapon name offset:
Code:
Weaponpointer + 0x0008;
Look at the content of the string:
Code:
char * weaponname = (char*)(Weapon + 0x0008);
Get the id of the weapon:
Log it to a file:
Code:
file << "Item number: " << i << " ID: " << hex << i << " Name: " << (LPCTSTR)weaponname << ".\n";
It needs to be somting like this:
Code:
DWORD cshell = (DWORD)GetModuleHandleA( "CShell.dll" );
DWORD weapon = *(DWORD*)( cshell + 0xA65EE8);
std::ofstream file;
file.open("Logger.txt");
for(int i = 0; i < 600; i++) { //You can see later how many weapons there are. Then you can lower the loop.
DWORD wapens = *(DWORD*)(weapon +(4*i));
char * weaponname = (char*)(wapens + 0x0008);
file << "Item number: " << i << " ID: " << hex << i << " Name: " << (LPCTSTR)weaponname << ".\n";
}
file.close();
Btw you need Fstream: