
Originally Posted by
supercarz1991
i'm not entirely new to this although i'm about a year out of practice. I took an old detected source, updated it and got it to not crash after being in game for an hour. Although the DIP Hook doesn't seem to let the hacks activate
i've tried message boxes on my hook, and DIP and they showed up fine, i know they work. But when i hit NUMPAD1 in game to activate something, it never seems to activate
Code:
#include <Windows.h>
#include <d3d9.h>
#include "XOR.h"
#include "main.h"
DWORD retMyDIP;
// Full Credits to Crash
#define smPlayer (my_Stride == 44)
#define smHeads (my_Stride == 36)
#define smGuns (my_Stride == 32)
#define Hands (my_Stride == 40 /*&& nNumVertices == 18 && nPrimitiveCount == 11)*/)
void D3DDIP (LPDIRECT3DDEVICE9 pDevice)
{
IDirect3DVertexBuffer9* my_StreamData = NULL;
UINT my_OffsetInBytes,my_Stride;
pDevice->GetStreamSource(0,&my_StreamData,&my_OffsetInBytes,&my_Stride);
if(GetAsyncKeyState(VK_NUMPAD1)&1) //does not seem to activate
{
if(smPlayer || smHeads || smGuns || Hands)
{
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);//WallHack
//MessageBox(NULL, NULL, NULL, NULL);
} else {
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);
}
}
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
}
i'd rather not post my hook as its the first time i've made a hook that didn't crash me and i'm kind of proud of that... lol
realy dude -_- this isnt even a drawindex hook
XD all you show is
the small bit of code that doesnt matter it could be alot of stuff
your hook may not be working correctly
maybe look at the sticky post of CodeDemons ?
with all the info on the D3D -_-
here if you know how to use vtable then use this
Code:
typedef HRESULT (WINAPI* oDIP)(LPDIRECT3DDEVICE9 pDevice,D3DPRIMITIVETYPE,int,UINT,UINT,UINT,UINT);
oDIP pDIP;
Code:
HRESULT WINAPI DIP(LPDIRECT3DDEVICE9 pDevice,D3DPRIMITIVETYPE Type,int BaseVertexIndex,UINT MinIndex,UINT NumVertices,UINT StartIndex,UINT PrimCount)
{
return pDIP(pDevice, Type, BaseVertexIndex, MinIndex, NumVertices, StartIndex, PrimCount);
}
Code:
Credits to codeDemon for his post i guess ?
btw
Dip is vtable number