i have a wallhack ,it workd well but chams dosen't work . and this wallhack seems very crappy
.i want to know how to distinguish what model is a player and what's the others?
i try to find this ,but I failed. so does anyone can give me a way to do it. my idea may be wrong ,because I 've been looking for rendering differences between the characters and scenes.
HRESULT WINAPI HkDrawIndexedPrimitive(LPDIRECT3DDEVICE9 m_Device, D3DPRIMITIVETYPE type,INT BaseVertexIndex,UINT MinVertexIndex,UINT NumVertices,UINT startIndex,UINT primCount)
{
HRESULT result = S_OK;
IDirect3DVertexBuffer9* pStreamData = NULL;
UINT iOffsetInBytes,iStride;
if (m_Device->GetStreamSource(0, &pStreamData, &iOffsetInBytes, &iStride) == D3D_OK)
pStreamData->Release();
if (ModleConfirm == TRUE)
{
m_Device->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
}
return Orginal_DrawIndexedPrimitive(m_Device, type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
return result;
}
ULONG_PTR GetDrawIndexedPrimitiveaddss()
{
HANDLE Is_hwnd = GetModuleHandle(L"d3d9.dll");
if (Is_hwnd != INVALID_HANDLE_VALUE)
return NULL;
return (ULONG_PTR)Is_hwnd + 0x27651; // just windows server 2008
}
bool HookDrawIndexedPrimitive()
{
ULONG_PTR addss = GetDrawIndexedPrimitiveaddss();
jmpback = addss + 5;
DWORD odProtect = 0;
if (VirtualProtect((LPVOID)address, 5, PAGE_EXECUTE_READWRITE, &odProtect))
{
DWORD value = (DWORD)HkDrawIndexedPrimitive - addss - 5;
_asm
{
mov eax, addss
mov byte ptr[eax], 0xe9
add eax, 1
mov ebx, value
mov dword ptr[eax], ebx
}
VirtualProtect((LPVOID)addss, 5, odProtect, &odProtect);
}
return true;
this is part of my code , it can work in windows 2008 , bool ModleConfirm is used to identify the player model ,so can you help me how to do it . thank you