my hack dcing

Posts 1–7 of 7 · Page 1 of 1
my hack dcing
hello

I made a hack but when game running its d/c
i got new addies, and every thing its ok

Im using Prix injector?!

/// may I know why? \\\
You won't get any help, cuz we haven't got enough informations.


You could also just Post parts of your source, or maybe which base you are using,
Your PushToConsole, Your Memory hacks, everything just give use informations, you think we could figure the problem out with.

When is it exactly DC'ing?
LoginScreen? A: Hook, vTable Error (Information may not be right it can variate)
Loading Man? A: Mostly PTC (Information may not be right it can variate)
Before Game Start? A: "alliased Resolution error" <- Means your Menu got problems with the chaning of the Game Res. while game starting, Memory Hacks enabled(disable them or use Gamestatus to let deactive 'em automaticly)
Ingame? A: Wrong Bytes, Values , Detected Hook.(Information may not be right it can variate)
i don't remember when dc, but i think , before the white man walking
before i put my user+password
================================================== =
#include <windows.h>
bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll" ) != NULL
&& GetModuleHandleA( "ClientFX.fxd" ) != NULL
&& GetModuleHandleA( "CShell.dll" ) != NULL )
return true;
return false;
}
void __cdecl PushToConsole(const char* szCommand )
{
DWORD dwCShell = (DWORD)GetModuleHandleA("CShell.dll");
if( dwCShell != NULL )
{
DWORD *LTClient = ( DWORD* )( 0x00485E10 );
void* CONoff = ( void* )*( DWORD* )( *LTClient + 0x208 );
__asm
{
push szCommand;
call CONoff;
add esp, 4;
}
}
}

void main()
{
bool chams = false;
bool Spread = false;
while(true)
{
if(GetAsyncKeyState(VK_NUMPAD1)&1){
}
if(chams){
PushToConsole("SkelModelStencil 0");
chams = false;
} else {
PushToConsole("SkelModelStencil 1");
chams = true;
}

if(GetAsyncKeyState(VK_NUMPAD2)&1){
}
if(Spread){
PushToConsole("PerturbRotationEffect 3.000000");
PushToConsole("PerturbIncreaseSpeed 3.000000");
PushToConsole("PerturbDecreaseSpeed 9.000000");
PushToConsole("PerturbWalkPercent 0.500000");
PushToConsole("PerturbRecoil 9.000000");
PushToConsole("FireMovePerturb 9.000000");
PushToConsole("ZoomedFireMoveDuckPerturb 9.000000");
PushToConsole("ZoomedFireMovePerturb 9.000000");
PushToConsole("ZoomedFireDuckPerturb 9.000000");
Spread = false;
} else {
PushToConsole("PerturbRotationEffect 0.000000");
PushToConsole("PerturbIncreaseSpeed 0.000000");
PushToConsole("PerturbWalkPercent 0.000000");
PushToConsole("PerturbFiringIncreaseSpeed 0.000000");
PushToConsole("PerturbRecoil 0.000000");
PushToConsole("FireMovePerturb 0.000000");
PushToConsole("ZoomedFireMoveDuckPerturb 0.000000");
PushToConsole("ZoomedFireMovePerturb 0.000000");
PushToConsole("ZoomedFireDuckPerturb 0.000000");
Spread = true;
}


PushToConsole("ShowFps 1");//fps

}
}
DWORD WINAPI dwHackThread(LPVOID) {
while( !IsGameReadyForHook() )
Sleep(300);
main();
return 0;
}
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
CreateThread(NULL, NULL, dwHackThread, NULL, NULL, NULL);
}
return TRUE;
}
Code:
#include <windows.h>
#include <stdio.h>
#include <d3d9.h>
#include <d3dx9.h>
#pragma comment (lib, "d3dx9.lib")
#pragma comment (lib, "d3d9.lib")
#pragma warning( disable : 4244 )

void CreateDev(DWORD * dwVTable){
LPDIRECT3D9 pD3d9 = NULL;
LPDIRECT3DDEVICE9 pD3DDevice = NULL;
pD3d9 = Direct3DCreate9(D3D_SDK_VERSION);
if(pD3d9 == NULL){
return;
}
D3DPRESENT_PARAMETERS pPresentParms;
ZeroMemory(&pPresentParms,sizeof(pPresentParms));
pPresentParms.Windowed = TRUE;
pPresentParms.BackBufferFormat = D3DFMT_UNKNOWN;
pPresentParms.SwapEffect = D3DSWAPEFFECT_DISCARD;
if(FAILED(pD3d9->CreateDevice(D3DADAPTER_DEFAULT,D3DDEVTYPE_HAL,GetDesktopWindow(),D3DCREATE_SOFTWARE_VERTEXPROCESSING,&pPresentParms,&pD3DDevice))){
return;
}
DWORD * dwTable = ( DWORD* )pD3DDevice;
dwTable = ( DWORD* ) dwTable[0];
dwVTable[0] = dwTable[16];
dwVTable[1] = dwTable[17];
dwVTable[2] = dwTable[82];
}


bool IsGameReadyForHook()
{
if( GetModuleHandleA( "d3d9.dll" ) != NULL
&& GetModuleHandleA( "ClientFX.fxd" ) != NULL
&& GetModuleHandleA( "CShell.dll" ) != NULL )
return true;
return false;
}
typedef int (__cdecl* RunConsoleCommand_t)(char* cmd);
RunConsoleCommand_t RUN = (RunConsoleCommand_t)0x00485E10;
LPDIRECT3DDEVICE9 pDevice;

typedef HRESULT (WINAPI* tPresent)(LPDIRECT3DDEVICE9 pDevice,CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion);
tPresent oPresent;

void *MBDetour(BYTE *src,const BYTE *dst,const int len){
BYTE *jmp = (BYTE*)malloc(len+5);
DWORD dwback;
VirtualProtect(src, len, PAGE_READWRITE, &dwback);
memcpy(jmp, src, len); jmp += len;
jmp[0] = 0xE9;
*(DWORD*)(jmp+1) = (DWORD)(src+len - jmp) - 5;
src[0] = 0xE9;
*(DWORD*)(src+1) = (DWORD)(dst - src) - 5;
VirtualProtect(src, len, dwback, &dwback);
return (jmp-len);
}



HRESULT WINAPI hkPresent(LPDIRECT3DDEVICE9 pDevice,CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion){
	while(!IsGameReadyForHook){
		Sleep(20);
	}

bool chams = false;
bool Spread = false;
while(true)
{
if(GetAsyncKeyState(VK_NUMPAD1)&1){
}
if(chams){
RUN("SkelModelStencil 0");
chams = false;
} else {
RUN("SkelModelStencil 1");
chams = true;
}

if(GetAsyncKeyState(VK_NUMPAD2)&1){
}
if(Spread){
RUN("PerturbRotationEffect 3.000000");
RUN("PerturbIncreaseSpeed 3.000000");
RUN("PerturbDecreaseSpeed 9.000000");
RUN("PerturbWalkPercent 0.500000");
RUN("PerturbRecoil 9.000000");
RUN("FireMovePerturb 9.000000");
RUN("ZoomedFireMoveDuckPerturb 9.000000");
RUN("ZoomedFireMovePerturb 9.000000");
RUN("ZoomedFireDuckPerturb 9.000000");
Spread = false;
} else {
RUN("PerturbRotationEffect 0.000000");
RUN("PerturbIncreaseSpeed 0.000000");
RUN("PerturbWalkPercent 0.000000");
RUN("PerturbFiringIncreaseSpeed 0.000000");
RUN("PerturbRecoil 0.000000");
RUN("FireMovePerturb 0.000000");
RUN("ZoomedFireMoveDuckPerturb 0.000000");
RUN("ZoomedFireMovePerturb 0.000000");
RUN("ZoomedFireDuckPerturb 0.000000");
Spread = true;

}

RUN("ShowFps 1");

//fps

}return oPresent(pDevice, pSourceRect,  pDestRect,  hDestWindowOverride,  pDirtyRegion);
}

DWORD WINAPI Wait(LPVOID lpArgs){
DWORD dwD3D9 = NULL;
while(!dwD3D9){
Sleep(25);
dwD3D9 = (DWORD)GetModuleHandleA("D3d9.dll");
}
DWORD dwVTable[3] = {0};

CreateDev( dwVTable );
oPresent = ( tPresent )MBDetour(( PBYTE ) dwVTable[1], ( PBYTE ) &hkPresent ,5);
return FALSE;
}

BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if ( dwReason == DLL_PROCESS_ATTACH )
{
CreateThread(NULL, NULL, Wait, NULL, NULL, NULL);
}
return TRUE;
}
Try this one, you need the DirectX9 Sdk!
If you search around the internet you could easily draw a menu with this one xD
"EDITED BY ME"
Credits: UC, Solify, MSDN, System32, Windows, Dx9 SDK xD
d3dx9.h

======= Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Quote Originally Posted by mn7os View Post
d3dx9.h

======= Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
How should I help you hmm let me guess..

Oh yeah right DOWNLOAD THE DIRECTX9 SDK!

Download details: DirectX Software Development Kit

Include it in into your Visual Studio
I have it,
but what did i do with it?

i'll contact with you at messenger.. i added you
Posts 1–7 of 7 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Talk with us