Creating Chams

Posts 1–3 of 3 · Page 1 of 1
Creating Chams
Hello every one,

I made for a game a midhook. I hooked in DIP. But now I want to make Chams.. But I don\\\'t know mutch about D3D9.
Can some one help me how to make the chams?

I want to do chams like this:

Code:
device->SetRenderState(D3DRS_ALPHABLENDENABLE,true);
device->SetRenderState(D3DRS_DESTBLEND,D3DBLEND_INVDESTCOLOR);
device->SetRenderState(D3DRS_SRCBLEND,D3DBLEND_INVSRCCOLOR);
I have the Device pointer. And A DIP hook. But how to use it? Becouse if I use this the game will crash.
Can maby some one help me? Or give me a hint how to continue?

Thanks!
You're better off making a wallhack because it is a lot easier than chams. Then after that, you just work your way up.

wallhack is basically disabling the zbuffer so it takes one line of code.
Thanks for your replay.

Lets say I have hookt in DIP. I restored the old bytes and I make a jump back. Can I just do that command in the middel of those?
Becouse I think there is more.


So like:

Code:
//restoren in asm
//Make the device
device->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE );
device->SetRenderState(D3DRS_ZFUNC,   D3DCMP_NEVER);
//jump back in asm
Becouse I only made a hook, nothing more. I did\'t call DIP or somting else.

Edit:

I see other ppl do:
Code:
        MOV ECX, DWORD PTR DS:[EAX]
        MOV pDevice, EAX; 
        MOV EDX, DWORD PTR DS:[ECX+0x148]
        PUSHAD
        MOV ECX, [EBP + 0x18]
        MOV BaseVertexIndex, ECX 
        MOV ECX, [EBP + 0x8]
        MOV MinIndex, ECX      
        MOV ECX, [EBP + 0x10]
        MOV nNumVertices, ECX  
        MOV ECX, [EBP + 0xC]
        MOV StartIndex, ECX    
        MOV ECX, [EBP + 0x14]
        MOV nPrimitiveCount, ECX
THen they call DIP:

Code:
pDevice->DrawIndexedPrimitive(PrimType, BaseVertexIndex,  MinIndex, nNumVertices, StartIndex, nPrimitiveCount);
But I don\'t hook in the_main.exe. So I can\'t do this with the Pdev.
Or do they use this to create DIP in the dll and then hook in DIP to use this?

If that is a yes, then I need to make a hook in the main exe.
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us