Results 1 to 3 of 3
  1. #1
    glawieking's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Posts
    13
    Reputation
    13
    Thanks
    6

    Please help me about D3D

    I want to form a simple chams-only hack, but there is no tut about it, so please help me...

  2. #2
    Wolf's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    666
    Posts
    12,427
    Reputation
    286
    Thanks
    1,158
    google is your friend

  3. #3
    glawieking's Avatar
    Join Date
    Feb 2009
    Gender
    male
    Posts
    13
    Reputation
    13
    Thanks
    6
    I wrote, many alternatives, but I couldn't find a tut about chams hack aha I think i found one
    Tutorial On Chams
    By Thimo


    Requirments:
    -D3D Starter Kit V3.0B
    -Generatetexture Function
    -Microsoft Visual C++/ Studio
    -Brain
    -Knowledge of C++
    -MSDN
    -D3D SDK

    Seting up:
    Download The starter kit to you desktop and open it.

    Coding:
    First we are going to make a Wallhack:

    In the starter kit go to d3d8dev.ccp
    Under the #defines
    Code:

    bool wallhack; //made by thimo
    UINT m_Stride; //made by thimo

    Place this in DrawIndexedPrimitive
    Code:

    if (wallhack) //If wallhack bool is called.
    {
    if(m_stride == 44) //On the players model.
    {
    m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE); //Then bring to the front
    }
    else
    {
    m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, TRUE); //Evertyhing else is normal
    }
    }

    if ((GetAsyncKeyState(VK_NUMPAD1)&1) == 1) // If get numpad 1 then
    wallhack = !wallhack; //toggle wallhack

    Chams:
    Start with the same code as above

    On top:
    Code:

    bool chams;
    UINT m_Stride;
    LPDIRECT3DTEXTURE8 texRed, texGreen; //textures

    Now in DrawIndexedPrimitive:
    Code:

    if (chams) //if cham bool is called
    {
    if (m_Stride == 44) //on the player models
    {
    m_pD3Ddev->SetRenderState(D3DRS_ZENABLE,false); //bring to front
    m_pD3Ddev->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID); //fill it with a solid color
    m_pD3Ddev->SetTexture( 0, texRed); //fill it wih red
    m_pD3Ddev->DrawIndexedPrimitive(PrimitiveType, minIndex, NumVertices, startIndex, primCount);
    m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, true);
    m_pD3Ddev->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
    m_pD3Dde->SetTexture( 0, texGreen); //fill it with green
    }

    if ((GetAsyncKeyState(VK_NUMPAD2)&1) == 1) //id numpad 2 is called then
    Chams = !Chams; //chams on and off

    Now we need to make Colors!
    The GenerateTextyure Function by Az0rbix
    Now search for
    Code:

    HRESULT CD3DManager::Release()

    Under
    Code:

    HRESULT CD3DManager::Release()
    {
    return S_OK;
    }

    Add the GenerateTexture Function
    Code:

    HRESULT GenerateTexture(IDirect3DDevice8 *pD3Ddev, IDirect3DTexture8 **ppD3Dtex, DWORD colour32)
    {
    if( FAILED(pD3Ddev->CreateTexture(8, 8, 1, 0, D3DFMT_A4R4G4B4, D3DPOOL_MANAGED, ppD3Dtex)) )
    return E_FAIL;

    WORD colour16 = ((WORD)((colour32>>28)&0xF)<<12)
    |(WORD)(((colour32>>20)&0xF)<<8)
    |(WORD)(((colour32>>12)&0xF)<<4)
    |(WORD)(((colour32>>4)&0xF)<<0);

    D3DLOCKED_RECT d3dlr;
    (*ppD3Dtex)->LockRect(0, &d3dlr, 0, 0);
    WORD *pDst16 = (WORD*)d3dlr.pBits;

    for(int xy=0; xy < 8*8; xy++)
    *pDst16++ = colour16;

    (*ppD3Dtex)->UnlockRect(0);

    return S_OK;
    }

    Now in EndScene we are going to make those funtions!

    Search for EndScene
    in endscene add:
    Code:

    GenerateTexture(m_pD3Ddev, &texRed,D3DCOLOR_ARGB(255,255,0,0));
    GenerateTexture(m_pD3Ddev, &texGreen,D3DCOLOR_ARGB(255,0,255,0));

    and in SetStreamSource we put:
    Code:

    if( StreamNumber == 0 ){m_Stride = Stride;}

    Made by thimo
    Report any Bugs

    Creditz:
    Me = Tutorial
    Cobra = Basics
    Str8Soulja = Niggah******
    Az0rbix = D3D starter kit + GenerateTexture Function
    Last edited by glawieking; 08-07-2009 at 12:52 PM.

Similar Threads

  1. [Help Request] Qmo please help .
    By SnowBlitz in forum Piercing Blow Help
    Replies: 6
    Last Post: 11-26-2011, 04:16 AM
  2. Please... Help me with this D3D Hook!
    By nukeist_ in forum C++/C Programming
    Replies: 7
    Last Post: 12-22-2007, 08:02 PM
  3. Please Help Me!!!
    By Jackal in forum General
    Replies: 4
    Last Post: 05-17-2006, 02:55 PM
  4. please help
    By jeehad in forum General Game Hacking
    Replies: 2
    Last Post: 02-07-2006, 04:04 PM

Tags for this Thread