D3D Player Return Address / Chams by string

Posts 1–3 of 3 · Page 1 of 1
D3D Player Return Address / Chams by string
Code Below does wallhack the players and some wiring / random models, but doesn't cham them with Textures, so i'd suggest trying pixels.

However the return address is correct which leads back to the function at 0x7546D0 which parses player models. I'm pretty sure the struct is at [ esp + 0x14 ] but where the model names are from there i haven't looked yet!

Code:
extern "C" LPVOID _ReturnAddress( );
typedef HRESULT	(WINAPI *DrawIndexedPrimitive_t)( LPDIRECT3DDEVICE9 lpDevice, D3DPRIMITIVETYPE PrimitiveType, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT StartIndex, UINT PrimCount );
DrawIndexedPrimitive_t orig_DrawIndexedPrimitive = NULL;
HRESULT	WINAPI DrawIndexedPrimitive_Hook( LPDIRECT3DDEVICE9 lpDevice, D3DPRIMITIVETYPE PrimitiveType, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount )
{
	if( _ReturnAddress( ) == (void *)0x75474C )//Players and some wires etc...
	{
		lpDevice->SetRenderState( D3DRS_ZENABLE, FALSE );
		lpDevice->SetRenderState( D3DRS_LIGHTING, TRUE );
		lpDevice->SetTexture( 0, EnemyTextureVisible );
		orig_DrawIndexedPrimitive( lpDevice, PrimitiveType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
		lpDevice->SetRenderState( D3DRS_FOGENABLE, FALSE );
		lpDevice->SetRenderState( D3DRS_ZENABLE, TRUE );
		lpDevice->SetRenderState( D3DRS_LIGHTING, FALSE );
		lpDevice->SetTexture( 0, FriendTextureVisible );
	}

	return orig_DrawIndexedPrimitive( lpDevice, PrimitiveType, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount );
}
Credits:
Decor911
Thanks for sharing ;D
Quote Originally Posted by JamesA1994 View Post
Thanks for sharing ;D
Your welcome .
Posts 1–3 of 3 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Talk with us