Results 1 to 1 of 1
  1. #1
    Mike Shinoda's Avatar
    Join Date
    May 2008
    Gender
    male
    Location
    127.0.0.1
    Posts
    1,177
    Reputation
    67
    Thanks
    165
    My Mood
    Amazed

    D3D Functions Source

    Well i found this little source in other forum and i want it to share(copy/paste) with you guys
    Simple D3D function, Easy to insert to an hack ,without any address.

    WallHack:
    if(m_Stride == 44)
    {
    m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    }
    No Fog:
    if (nofog)
    {
    m_pD3Ddev->SetRenderState(D3DRS_FOGENABLE, false);
    }
    WireFrame:
    if (m_Stride == 44)
    m_pD3Ddev->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME);
    }
    Glass Wall:
    if(m_Stride == 40)
    {
    m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
    }
    FullBright:
    if (fullbright)
    {
    m_pD3Ddev->SetRenderState(D3DRS_LIGHTING, false);
    m_pD3Ddev->SetRenderState(D3DRS_AMBIENT,D3DCOLOR_ARGB(255, 255,255,255));
    }
    else
    {
    m_pD3Ddev->SetRenderState(D3DRS_AMBIENT, false);
    }
    Point Mode:
    if(CH_Pointmode==1)
    {
    if(m_Stride == 44)
    {
    pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_POINT);
    }
    }
    Color Fog:
    if(CH_Fog==1) pDevice->SetRenderState(D3DRS_FOGCOLOR,D3DCOLOR_ARGB(0,0,0 ,255));
    if(CH_Fog==2) pDevice->SetRenderState(D3DRS_FOGCOLOR,D3DCOLOR_ARGB(0,0,2 55,0));
    if(CH_Fog==3) pDevice->SetRenderState(D3DRS_FOGCOLOR,D3DCOLOR_ARGB(0,255 ,0,0));
    if(CH_Fog==4) pDevice->SetRenderState(D3DRS_FOGCOLOR,D3DCOLOR_ARGB(0,160 ,0,255));
    if(CH_Fog==5) pDevice->SetRenderState(D3DRS_FOGCOLOR,D3DCOLOR_ARGB(0,255 ,255,255));
    if(CH_Fog==6) pDevice->SetRenderState(D3DRS_FOGCOLOR,D3DCOLOR_ARGB(0,0,0 ,0));
    if(CH_Fog==7) pDevice->SetRenderState(D3DRS_FOGENABLE, false);
    Crossair:
    if(Crossx==1)
    {
    int x = ( GetSystemMetrics( 0 ) / 2);
    int y = ( GetSystemMetrics( 1 ) / 2);
    D3DRECT rec = { x - 10, y, x + 10, y + 1};
    D3DRECT rec2 = { x, y - 10, x + 1, y + 10};
    pDevice->Clear(1, &rec, D3DCLEAR_TARGET, D3DCOLOR_ARGB(255, 255, 0, 0), 0, 0);
    pDevice->Clear(1, &rec2, D3DCLEAR_TARGET, D3DCOLOR_ARGB(255, 255, 0, 0), 0, 0);
    }

    if(Crossx== 2)
    {
    int x = ( GetSystemMetrics( 0 ) / 2);
    int y = ( GetSystemMetrics( 1 ) / 2);
    D3DRECT rec = { x - 10, y, x + 10, y + 1};
    D3DRECT rec2 = { x, y - 10, x + 1, y + 10};
    pDevice->Clear(1, &rec, D3DCLEAR_TARGET, D3DCOLOR_ARGB(255,0,0,255), 0, 0);
    pDevice->Clear(1, &rec2, D3DCLEAR_TARGET, D3DCOLOR_ARGB(255,0,0,255), 0, 0);
    }

    if(Crossx==3)
    {
    int x = ( GetSystemMetrics( 0 ) / 2);
    int y = ( GetSystemMetrics( 1 ) / 2);
    D3DRECT rec = { x - 10, y, x + 10, y + 1};
    D3DRECT rec2 = { x, y - 10, x + 1, y + 10};
    pDevice->Clear(1, &rec, D3DCLEAR_TARGET, D3DCOLOR_ARGB(255, 255, 255, 255), 0, 0);
    pDevice->Clear(1, &rec2, D3DCLEAR_TARGET, D3DCOLOR_ARGB(255, 255, 255, 255), 0, 0);
    }

    if(Crossx==4)
    {
    int x = ( GetSystemMetrics( 0 ) / 2);
    int y = ( GetSystemMetrics( 1 ) / 2);
    D3DRECT rec = { x - 10, y, x + 10, y + 1};
    D3DRECT rec2 = { x, y - 10, x + 1, y + 10};
    pDevice->Clear(1, &rec, D3DCLEAR_TARGET, D3DCOLOR_ARGB(255, 0, 255, 0), 0, 0);
    pDevice->Clear(1, &rec2, D3DCLEAR_TARGET, D3DCOLOR_ARGB(255, 0, 255, 0), 0, 0);
    }
    Chams:
    if (Chams==0)
    {
    if(m_Stride==44)
    {
    pDevice->SetTexture(1,0);
    pDevice->SetRenderState(D3DRS_ZENABLE,TRUE);
    pDevice->SetRenderState(D3DRS_AMBIENT,D3DCOLOR_ARGB(0,0,0, 0));
    }
    }
    if (Chams==1)
    {
    if(m_Stride==44)
    {
    pDevice->SetRenderState(D3DRS_ZENABLE,false);
    pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
    pDevice->SetRenderState(D3DRS_AMBIENT,txtGreen);
    pDevice->SetTexture(0,NULL);
    pDrawIndexedPrimitive( pDevice,pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);
    pDevice->SetRenderState(D3DRS_ZENABLE, true);
    pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
    pDevice->SetRenderState(D3DRS_AMBIENT, txtBlack);
    }
    }
    if (Chams==2)
    {
    if(m_Stride==44)
    {
    pDevice->SetRenderState(D3DRS_ZENABLE,false);
    pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
    pDevice->SetRenderState(D3DRS_AMBIENT,txtBlue);
    pDevice->SetTexture(0,NULL);
    pDrawIndexedPrimitive( pDevice,pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);
    pDevice->SetRenderState(D3DRS_ZENABLE, true);
    pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
    pDevice->SetRenderState(D3DRS_AMBIENT, txtYellow);
    }
    }
    if (Chams==3)
    {
    if(m_Stride==44)
    {
    pDevice->SetRenderState(D3DRS_ZENABLE,false);
    pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
    pDevice->SetRenderState(D3DRS_AMBIENT,txtOrange);
    pDevice->SetTexture(0,NULL);
    pDrawIndexedPrimitive( pDevice,pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);
    pDevice->SetRenderState(D3DRS_ZENABLE, true);
    pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
    pDevice->SetRenderState(D3DRS_AMBIENT, txtRed);
    }
    }
    and Credits to:

    AlbertoX
    Hans211
    It always starts with one thing...

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

    Kenseikuriomas (07-12-2012),Wizzup (09-16-2011)

Similar Threads

  1. [Request] Working d3d base (source code)
    By ii LeDgEnz x in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 5
    Last Post: 11-23-2010, 12:46 PM
  2. Some Useful D3D Functions ( Must have someknowledge )
    By gcflames12 in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 22
    Last Post: 08-19-2010, 08:28 AM
  3. Some Useful D3D Functions ( Must have someknowledge )
    By gcflames12 in forum CrossFire Hack Coding / Programming / Source Code
    Replies: 3
    Last Post: 08-19-2010, 07:22 AM
  4. [REQUEST] Combat Arms D3D Functions
    By iKalliko in forum Combat Arms Hacks & Cheats
    Replies: 0
    Last Post: 03-19-2009, 02:37 PM