Make a weapon log

Posts 115 of 18 · Page 1 of 2
Make a weapon log
for those who like to ask me how to make a weapon log..
here is my source code...

Code:
#include <windows.h>
#include <fstream>
using namespace std;

//Globals
ofstream ofile;
#define WeaponMgr  0x??????

void log_weapons()
{
	DWORD CShell = NULL;
	do
	{
		CShell = (DWORD)GetModuleHandleA("CShell.dll");
		Sleep(100);
	} while (CShell == NULL);

	Sleep(1000);

	DWORD pWeaponMgr = NULL;
	do
	{
		pWeaponMgr = *(DWORD*)(CShell+WeaponMgr);
		Sleep(100);
	} while (pWeaponMgr == NULL);

	Sleep(1000);

	for(int i=0; i<600; i++)
	{
		if((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr))+(4*i)) ) != NULL)
		{
			char* WepName = (char*)((*(DWORD*)((*(DWORD*)(CShell+WeaponMgr)) +(4*i))) + 8);
			ofile << "GiNiYaT101:  ID = " << i << " , Name = " << WepName << "\n";
		}
	}
	ExitProcess(0);
}

bool WINAPI DllMain(HMODULE hDll, DWORD dwReason, PVOID pvReserved)
{
	if(dwReason == DLL_PROCESS_ATTACH)
	{
		DisableThreadLibraryCalls(hDll);

		ofile.open("C:\Weaponlog.txt", ios::app);

		ofile << "GiNiYaT101:  Weapon Log started\n\n";
		CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)log_weapons, NULL, NULL, NULL);
	}

	else if(dwReason == DLL_PROCESS_DETACH)
	{
		ofile << "\nGiNiYaT101:  Weapon Log ended";
		ofile.close();
	}

    return true;
}
you must get the game closed after it is injected...
note:
if it didnt work try it with a bypass and use sxs.dll method...
dont forget to press thanks if it worked
Great thanks man!
Thank you really much for this!
@Osama bin Lad3n
isnt it obvious?

Code:
ofile << "GiNiYaT101:  ID = " << i << " , Name = " << WepName << "\n";
		}
	}
	ExitProcess(0);
}

bool WINAPI DllMain(HMODULE hDll, DWORD dwReason, PVOID pvReserved)
{
	if(dwReason == DLL_PROCESS_ATTACH)
	{
		DisableThreadLibraryCalls(hDll);

		ofile.open("C:\Weaponlog.txt", ios::app);

		ofile << "GiNiYaT101:  Weapon Log started\n\n";
		CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)log_weapons, NULL, NULL, NULL);
	}

	else if(dwReason == DLL_PROCESS_DETACH)
	{
		ofile << "\nGiNiYaT101:  Weapon Log ended";
		ofile.close();
	}

    return true;
}
so the new loop is 600?
Quote Originally Posted by DevilGhost View Post
so the new loop is 600?
nope it's 576
Why do you use the same loop as me? lol I always use 600. xD

Anyway, THANK YOU FOR THIS! LOVE YOU @giniyat101

(no homo)

Finally, I can make own weapon hack...!
Quote Originally Posted by CrossRaiders View Post
Why do you use the same loop as me? lol I always use 600. xD

Anyway, THANK YOU FOR THIS! LOVE YOU @giniyat101

(no homo)

Finally, I can make own weapon hack...!
i used 600 just because if i used 559 for example more weapons will be added and not logged
Quote Originally Posted by giniyat101 View Post
i used 600 just because if i used 559 for example more weapons will be added and not logged
I use 600 loop in all my hacks...
Thank you Very Much. really, this awesome. Work Perfect. now I can change m60 to M4A1-custom, Thompson, etc. again, thanks very much for this!
where i can weapon codes?
how i add the codes?
if i want to change a m16 to thompson how i will do it?
it doesnt work :P gives this error in C++ ::: 1>main.cpp(46): warning C4129: 'W' : unrecognized character escape sequence
then the code that gives the error is

Code:
ofile.open("C:\Weaponlog.txt", ios::app);
Quote Originally Posted by Simpson15 View Post
it doesnt work :P gives this error in C++ ::: 1>main.cpp(46): warning C4129: 'W' : unrecognized character escape sequence
then the code that gives the error is

Code:
ofile.open("C:\Weaponlog.txt", ios::app);
use a double back-slash
Posts 115 of 18 · Page 1 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?