Results 1 to 3 of 3

Threaded View

  1. #1
    xbeatsszzx's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Behind a dumpster jerking off. xD jks
    Posts
    2,519
    Reputation
    13
    Thanks
    1,508
    My Mood
    Asleep

    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
    I Am on this site for the mods for mw2 ONLY. Not hacks.

  2. The Following 2 Users Say Thank You to xbeatsszzx For This Useful Post:

    JamesA1994 (01-13-2011),mwxplayer (03-24-2013)