help to Ingame menu v1
error port
code
http://www.mpgh.net/forum/242-crossf...game-menu.html
@giniyat101

Code:
#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include <d3d9.h>
#include <d3dx9.h>
#include <windows.h>
#include "menu.h"
DWORD WINAPI menu(LPVOID lpParam)
{
//Create the new menu
CMenu* pMenu = new CMenu("[mi5v1.0");
//Wait until we are ready
do
{
Sleep(100);
} while (!pMenu->Ready());
//CShell base address
DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll");
//Pass the pointers to the menu
pMenu->MessageFunc = CShell + 0x84570;
pMenu->VisibleState = CShell + 0x37DB44;
pMenu->PTC = CShell + 0x35AC34;
//Our options
//MUST TERMINATE WITH NULL!!!
char* optOffOn[] = {"Off", "On", NULL};
//variables to store current state
DWORD LessRecoil = 0;
DWORD wallhack = 0;
//Add some items
pMenu->AddItem("LessRecoil", optOffOn, &LessRecoil);
pMenu->AddItem("Wall hack", optOffOn, &wallhack);
//Lets begin memory hacks
while (1)
{
DWORD pWeaponMgr = *(DWORD*)(CShell+0xB74118);
if (pWeaponMgr)
{
for (int i=0; i<650; i++)
{
DWORD pWeapon = *(DWORD*)(pWeaponMgr+i*4);
if (pWeapon)
{
if (LessRecoil)
*(FLOAT*)(pWeapon+0x3A6C) = 100.0f;
else
*(FLOAT*)(pWeapon+0x3A6C) = 1.0f;
}
}
}
if (wallhack)
memcpy((VOID*)0x6D29F4, "\x00\x00\x00\x00\x00\x00", 6);
else
memcpy((VOID*)0x6D29F4, "\x01\x01\x01\x01\x01\x01", 6);
//Must place in a while(1)
pMenu->Nav();
Sleep(100);
}
}
BOOL APIENTRY DllMain( HMODULE hModule,DWORD ul_reason_for_call,LPVOID lpReserved )
{
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
{
MessageBoxA(0,"[mi5 v1",".[mi5 v1.0.0",0);
CreateThread(0,0,(LPTHREAD_START_ROUTINE)menu,0,0,0);
}
return TRUE;
}
http://www.mpgh.net/forum/242-crossf...game-menu.html
@giniyat101

maybe, offset/pointer is wrong


