Results 1 to 3 of 3
  1. #1
    xbeatsszzx's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Behind a dumpster jerking off. xD jks
    Posts
    2,520
    Reputation
    13
    Thanks
    1,494
    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)

  3. #2
    JamesA1994's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    The dark side
    Posts
    1,703
    Reputation
    271
    Thanks
    529
    My Mood
    Psychedelic
    Thanks for sharing ;D
    CoD Minion: Jan 13th 2011 to April 11 2011
    MMORPG Minion Since: March 28th 2011 to April 11 2011

    Don't be afraid to rep, you aren't loosing anything!
    Don't forget your P&Q's. Press the thanks button if someone has helped.
    jamesa1994@hotmail.com

  4. #3
    xbeatsszzx's Avatar
    Join Date
    Feb 2010
    Gender
    male
    Location
    Behind a dumpster jerking off. xD jks
    Posts
    2,520
    Reputation
    13
    Thanks
    1,494
    My Mood
    Asleep
    Quote Originally Posted by JamesA1994 View Post
    Thanks for sharing ;D
    Your welcome .
    I Am on this site for the mods for mw2 ONLY. Not hacks.