Make a logger

Posts 1–11 of 11 · Page 1 of 1
Make a logger
First you need to find the pointer to the weapon array:
Code:
0xA65EE8
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.

}
You need the weapon name. 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:
Code:
Hex of the id
Log it to a file:
Code:
file << "Item number: " << i << " ID: " << hex << i << " Name: " << (LPCTSTR)weaponname << ".\n";
It looks 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:
Code:
#include <fstream>
This is just the way how to. Its very easy .
Did't test it.. So it is posable that I made some mistakes

@Brimir
Error: hex
Undefine it !
How to ?
Quote Originally Posted by ***** View Post

@Brimir
Error: hex
Undefine it !
How to ?
I think it is a part of iostream, in namespace std.

So use:
Code:
#include <iostream>
using namespace std;
or use in your code:
Code:
std::hex
with:
Code:
#include <iostream>
Or just only use hex of std
@Brimir

Solved and Thank you for newest with me.
I use fstream for mine too, but it searches for the weapon pointer itself.
Quote Originally Posted by derh.acker View Post
I use fstream for mine too, but it searches for the weapon pointer itself.
i have recently made an offset loggerand it can log pointers too so i can say it: i made it too.
Gj I also made a address logger. So easy
@Brimir

You should become a VIP coder for Crossfire! You help a lot on this section.
Thanks , the only problem is that I don't have mutch time. And I don't know enought to make advanced hacks. Mem hacks ar very easy. But there is a lot more.
@Brimir
May I can teach you that...Anything if I can do..
Quote Originally Posted by ***** View Post
@Brimir
May I can teach you that...Anything if I can do..
Thanks, I send you a pm
Posts 1–11 of 11 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?