Hi, I wanted to do it again D3D hack, but I can not define a pointer ..
Hackbase.cpp my code:
Code:
Code:
// -----------------------------------------------------------------------------
// Project : HackBase v1.0
// Author : Hans211
// Date : 11 April 2009
//
// A basic D3D framework:
// - D3D menu with folders
// - Optimized d3dfont, right aligned text
// - Works for d3d8 or d3d9 (define it in main.h)
// -----------------------------------------------------------------------------
#include "d3dbase.h"
#include <stdio.h>
// group states
int CH_cheats = 1;
int CH_weap = 1;
// item states
int CH_stamina = 1; // stealth as default
int CH_fastammo = 1;
int CH_fasthealth = 0;
int CH_fastrepair = 0;
int CH_fastflag = 1;
int CH_nospread = 1;
int CH_norecoil = 1;
int CH_unlammo = 1;
// called with every EndScene
void DoMenu(pD3DdeviceX pDevice)
{
if (pMenu==0) { // first time , create the menu
pMenu = new D3DMenu("== HackersElite.eu ==",100,160); // title, maxitems,width
pMenu->visible=1; // make it visible
pMenu->col_title=0xffffffff; // change title color to white
} else {
FPScheck(sFPS,"%d Fps");
if (pMenu->noitems==0) RebuildMenu();
if (pMenu->visible && CH_back) DrawGui(pDevice,0x000000); // black background
pMenu->Show(pFont);
pMenu->Nav();
}
}
// Seperate thread for making hacks
DWORD WINAPI HACKthread( LPVOID param )
{
// --- hack loop
while (1) {
// ..if (CH_stamina) ....
// ..
// ..
// ..
Sleep(50);
}
return 0;
}
This is Hans base ..
I want Pointer: Address: 6EFFFC, Offset 1: AA8, Offset 2: AA - and I want to hack on the Speed (Defined in my base)
Please send me here all redone hackbase.cpp
And do not write that I should learn C + +, learn it, but I can not come to this ..
+ Process is TClient.exe
PLEASE!
Hi, I wanted to do it again D3D hack, but I can not define a pointer ..
This is Hans base ..
I want Pointer: Address: 6EFFFC, Offset 1: AA8, Offset 2: AA - and I want to hack on the Speed (Defined in my base)
Please send me here all redone hackbase.cpp
And do not write that I should learn C + +, learn it, but I can not come to this ..
+ Process is TClient.exe
PLEASE!
1. Learn ASM/C/C++
2. Use Code-Tags
3.
Quote:
Please send me here all redone hackbase.cpp
Nope, learn it yourself.
4.
Quote:
but I can not come to this ..
There are several quite good tutorials on pointers for C and C++ out there, google them.
I use this : And if i build it, there is 2/6 errors
Please help me!
( My code
Code:
// -----------------------------------------------------------------------------
// Project : HackBase v1.0
// Author : Hans211
// Date : 11 April 2009
//
// A basic D3D framework:
// - D3D menu with folders
// - Optimized d3dfont, right aligned text
// - Works for d3d8 or d3d9 (define it in main.h)
// -----------------------------------------------------------------------------
#include "d3dbase.h"
#include <stdio.h>
#define Base_Pointer 0x6EFFFC
#define Ofs_MovSpeed_1 0xAA8
#define Ofs_MovSpeed_2 0xAA
char sFPS[20]="xxx Fps";
int CH_back = 2; // 40%
// group states
int CH_cheats = 1;
int CH_weap = 1;
// item states
int CH_stamina = 1; // stealth as default
int CH_fastammo = 1;
int CH_fasthealth = 0;
int CH_fastrepair = 0;
int CH_MovSpeed = 0;
int CH_nospread = 1;
int CH_norecoil = 1;
int CH_unlammo = 1;
// none standard options
char *opt_Grp[] = { "+","-" };
char *opt_OffOn[] = { "Off","On" };
char *opt_Stamina[] = { "Off","Stealth","Full" };
char *opt_Back[] = { "Off","20%","40%","60%","80%","Solid" };
char *opt_MovSpeed[] = { "Off", "0,0", "1,0", "1,5", "2,0", "2,5", "3,0", "3,5", "4,0" };
D3DMenu *pMenu=NULL;
// Change this to make your own menu
void RebuildMenu(void)
{
pMenu->AddItem("Background" , &CH_back , opt_Back, 6);
pMenu->AddText("Framerate", sFPS);
pMenu->AddGroup("[Open In Game]" , &CH_cheats, opt_Grp);
if (CH_cheats) {
pMenu->AddItem("SpeedHack" , &CH_stamina , opt_Stamina, 3);
pMenu->AddItem("Fly" , &CH_fastammo , opt_OffOn);
pMenu->AddItem("Fast health" , &CH_fasthealth, opt_OffOn);
pMenu->AddItem("Fast repair" , &CH_fastrepair, opt_OffOn);
pMenu->AddItem("Mov Speed" , &CH_MovSpeed , opt_MovSpeed, 9);
}
pMenu->AddGroup("[Weapons]", &CH_weap , opt_Grp);
if (CH_weap) {
pMenu->AddItem("No spread" , &CH_nospread , opt_OffOn);
pMenu->AddItem("No recoil" , &CH_norecoil , opt_OffOn);
pMenu->AddItem("Unlimited ammo", &CH_unlammo , opt_OffOn);
}
}
// --- simple FPS vars and function
int FPScounter = 0;
float FPSfLastTickCount = 0.0f;
float FPSfCurrentTickCount;
void FPScheck(char *str, char *format)
{
FPSfCurrentTickCount = clock() * 0.001f;
FPScounter++;
if((FPSfCurrentTickCount - FPSfLastTickCount) > 1.0f) {
FPSfLastTickCount = FPSfCurrentTickCount;
sprintf(str,format,FPScounter);
FPScounter = 0;
}
}
// Draw a background
void DrawGui(pD3DdeviceX pDevice, DWORD col)
{
if (CH_back==5) // solid
col|=0xff000000;
else
col|=CH_back*0x30000000; // transparency
DrawBox(pDevice,pMenu->x-3,pMenu->y-2,pMenu->totwidth+6,pMenu->totheight+4 ,col);
DrawBox(pDevice,pMenu->x-3,pMenu->y-2,pMenu->totwidth+6,pMenu->titleheight+1,col|0xff000000);
}
void MovSpeed(speedVal)
{
DWORD Addy1 = *(DWORD*)Base_Pointer; //I read the value of the base pointer
DWORD Addy1 = *(DWORD*)(addy1+Ofs_MovSpeed_1) + Ofs_MovSpeed_2; //I read the value of the value of base pointer + the first offset addy + the second offset
*(DWORD*)Addy1 = speedVal; //Change the address of the speed with the value "speedVal" which will be defined by using the function
}
void MovSpeed(speedVal)
{
DWORD Addy1 = *(DWORD*)Base_Pointer;
DWORD Addy1 = *(DWORD*)(addy1+Ofs_MovSpeed_1) + Ofs_MovSpeed_2;
*(long*)Addy1 = (16226 + (speedVal * 0,5 * 60));
}
// called with every EndScene
void DoMenu(pD3DdeviceX pDevice)
{
if (pMenu==0) { // first time , create the menu
pMenu = new D3DMenu("== HackersElite.eu ==",100,160); // title, maxitems,width
pMenu->visible=1; // make it visible
pMenu->col_title=0xffffffff; // change title color to white
} else {
FPScheck(sFPS,"%d Fps");
if (pMenu->noitems==0) RebuildMenu();
if (pMenu->visible && CH_back) DrawGui(pDevice,0x000000); // black background
pMenu->Show(pFont);
pMenu->Nav();
}
}
// Seperate thread for making hacks
DWORD WINAPI HACKthread( LPVOID param )
{
// --- hack loop
while (1) {
// ..if (CH_stamina) ....
// ..
// ..
// ..
Sleep(50);
}
return 0;
}
// Seperate thread for making hacks
DWORD WINAPI HACKthread( LPVOID param )
{
// --- hack loop
while (1) {
if (CH_MovSpeed != 0)
{
MovSpeed(CH_MovSpeed);
}
Sleep(50);
}
return 0;
}
Errors :
C:\Users\Jirkus\Documents\Visual Studio 2010\Projects\Hnas\hackbase.cpp(96) : error C2182: 'MovSpeed' : illegal use of type 'void'
C:\Users\Jirkus\Documents\Visual Studio 2010\Projects\Hnas\hackbase.cpp(96) : error C2239: unexpected token '{' following declaration of 'MovSpeed'
C:\Users\Jirkus\Documents\Visual Studio 2010\Projects\Hnas\hackbase.cpp(101) : error C2065: 'speedVal' : undeclared identifier
C:\Users\Jirkus\Documents\Visual Studio 2010\Projects\Hnas\hackbase.cpp(102) : error C2448: '<Unknown>' : function-style initializer appears to be a function definition
C:\Users\Jirkus\Documents\Visual Studio 2010\Projects\Hnas\hackbase.cpp(142) : error C2084: function 'unsigned long __stdcall HACKthread(void *)' already has a body
Error executing cl.exe.