Help me to get Weapon IDs

Posts 1–8 of 8 · Page 1 of 1
Help me to get Weapon IDs
I'm trying to get list of weapon ids like in this thread - http://www.mpgh.net/forum/242-crossf...gun-index.html.
I need it because I want to make a weapon hack of other CF localization, not NA, and weapon ids are different.

Here is the source code of weapon logger (not mine):

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

#pragma comment(linker,"/MERGE:.rdata=.text")
#pragma comment(linker,"/FILEALIGN:512 /SECTION:.text,EWRX /IGNORE:4078")
#pragma comment(linker,"/BASE:0x13110000")
#pragma comment(linker,"/ENTRY:New_DllMain")

#define WeaponMgr 0xA68F90

//---
DWORD WINAPI H4X(LPVOID)
{
DWORD cshell = (DWORD)GetModuleHandleA( "CShell.dll" );
DWORD weapon = *(DWORD*)( cshell + 0xA68F90);
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";
}

	return 0;
}


//---
bool R2H()
{
    if ( GetModuleHandleA("CShell.dll") != NULL && GetModuleHandleA("ClientFx.fxd") != NULL )
        return 1;

    return 0;
}


//---
DWORD WINAPI W41t(LPVOID)
{
    while ( !R2H()) Sleep(200);

    CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)H4X, NULL, NULL, NULL);

    return 0;
}


//---
void New_DllMain(HMODULE hDll, DWORD dwReason, LPVOID lpReserved)
{
    DisableThreadLibraryCalls(hDll);

    if ( dwReason == DLL_PROCESS_ATTACH )
        CreateThread(0, 0, (LPTHREAD_START_ROUTINE)W41t, 0, 0, 0);
}
It probably works, but when I put sxs.dll into crossfire folder and start CF, it crashes with send error report. Howewer, it creates a file with weapons indexies, but list is not complete. It has 30-40 weapons only.

Maybe someone help me, because I don't really know how to fix it.
I made a tut about it... Why you don't use that?
Quote Originally Posted by Brimir View Post
I made a tut about it... Why you don't use that?
i would be very appreciative if u made a tut like that of logger but not for wep hack but for normal hacks
So does not any one know how to do that?

Brimir, maybe you can give me a working .dll of your logger or maybe another solution to solve my problem, please.

It's very important for me, because on my CF localization i never see a weapon hack, and I very want to make it first.
Did you update the weapon pointer?
Quote Originally Posted by A$IAN View Post
Did you update the weapon pointer?
What is the weapon pointer? Did your mean weaponmgr? I use this value - 0xA68F90 and its actual.
Posts 1–8 of 8 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us