Code:
#include "Base.h"
#include "Menu.h"
#include "DirectX.h"
//hack adress define
#define DeviceGame 0x0090BF60
#define LTClientEXE 0x00485F90
#define LTClientDLL 0x3778DF58
#define EspName1 Não encontrado.
#define EspName2 0x372DF5DD
#define NoRecoil 0x37383DFC
#define NoReload 0x373F6834
#define SuperBullets 0x373F14D6
#define WeaponRange1 0x373F6AB9
#define WeaponRange2 0x373F6D09
//Menu Position
int menux = 780;
int menuy = 220;
//Hack Variables
int fps = 0;
int cham = 0;
int nfog = 0;
//Menu Groups
int whit;
---REMOVED SPRITE ( TOO MANY CHARACTERS) ---
void cMenu::RenderMenu(void)
{
AddItem(" [ Visuals ] ", Opt_Folder, &whit, 2, MENUFOLDER);
if(whit){
AddItem("NX Chams" , Opt_on_off , &cham , 2, MENUITEM);
}
AddItem(" [ Removals ] ", Opt_Folder, &whit, 2, MENUFOLDER);
AddItem("No Fog" , Opt_on_off , &nfog , 2, MENUITEM);
if(whit){
}
AddItem(" [ Others ] ", Opt_Folder, &whit, 2, MENUFOLDER);
AddItem("Show FPS " , Opt_on_off , &fps , 2, MENUITEM);
if(whit){
}
}
void cBase::Push(const char* cmd)
{
_asm
{
PUSH cmd
MOV EAX, 0x00485F90
CALL EAX
ADD ESP, 0x4
}
}
cBase Base;
void cBase::RenderFrame(LPDIRECT3DDEVICE9 pDevice)
{
if(fps){
Push("ShowFps 1");
} else {
Push("ShowFps 0");
}
if(cham){
Push("SkelModelStencil -1" );
} else {
Push("SkelModelStencil 0");
}
if(nfog){
Push("FogEnable 0" );
}else{
Push("FogEnable 1" );
}
if(Directx.pFont == NULL)
D3DXCreateFont(pDevice, 15, 0, 350, 0, 0, DEFAULT_CHARSET, OUT_TT_ONLY_PRECIS, PROOF_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial", &Directx.pFont );
if(Directx.pFont2 == NULL)
D3DXCreateFont(pDevice, 18, 0, 700, 0, 0, DEFAULT_CHARSET, OUT_TT_ONLY_PRECIS, PROOF_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial Black", &Directx.pFont2 );
if(sprite){
D3DXCreateTextureFromFileInMemory(pDevice,&Menupic,sizeof(Menupic),&MenuTexture);
D3DXCreateSprite(pDevice,&Sprite);
sprite = FALSE;
}
D3DXVECTOR3 POS;
POS.x = 755;
POS.y = 100;
POS.z = 0;
if (Mmax==0) Menu.RenderMenu();
if(Mvisible){
Sprite->Begin(D3DXSPRITE_ALPHABLEND);
Sprite->Draw(MenuTexture,NULL,NULL,&POS,0xFFFFFFFF);
Sprite->End();
Directx.DrawString(780, 180, Red,Directx.pFont2," steven1578’s first Hack! ");
}
Menu.MenuShow(menux,menuy,Directx.pFont);
Menu.MenuNav();
}
DWORD cBase::GetPointer(int index)
{
DWORD* devicePtr = ***(DWORD****)0x0090BF60;//DPOINTER
//Just change the 0x00000 to the code i gave you!
if( devicePtr == NULL )
return 0;
return devicePtr[index];
}
bool cBase::IsGameReadyForHook(void)
{
if( GetModuleHandle( "d3d9.dll" ) != NULL
&& GetModuleHandle( "ClientFX.fxd" ) != NULL
&& GetModuleHandle( "CShell.dll" ) != NULL )
return true;
return false;
}
DWORD WINAPI dwMainThread(LPVOID)
{
while ( !Base.IsGameReadyForHook() )
Sleep(iWaitTime);
Directx.Hook();
return 0;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
CreateThread(NULL, NULL, dwMainThread, NULL, NULL, NULL);
}
return TRUE;
}