Thread: [Source] Chams

Page 2 of 2 FirstFirst 12
Results 16 to 27 of 27
  1. #16
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,881
    Reputation
    163
    Thanks
    3,291
    My Mood
    Sleepy
    Quote Originally Posted by anger83 View Post
    the whole idea of this was
    1. if you don't know what the actual code does do not release it.
    2. you are a human so when somebody tell you that you are shit you shouldnt thank him.

    And I’m not definitely envy you Sealionone
    You am envy my grammar though.

    BTW this won't work if you C+P it since this base has a looot of syntax errors and messed up shit.

    I fixed it somewhat, it only logs the stride to find basic strides but you can add on other stuff if you need. (this isn't for C+Pers it's a stride logger not chams!)

    I commented some lines where there was... random shit.

    Code:
    UINT m_Stride;
    LPDIRECT3DVERTEXBUFFER9 m_StreamData;
    UINT m_OffsetInBytes;
    bool Stridelogger = false;//WDF this was an int ??? This base is shit..
    int stri = 0;
    
    //Wdf ? Not using the font at all ?
    
    LPDIRECT3DTEXTURE9 texRed = NULL;//Only seems to be using texRed so you only need texRed...
    
    //Get rid of all those bytes since you can just do D3DCOLOR and use GenerateTexture which is below (Azorbix made it I think):
    
    HRESULT GenerateTexture(IDirect3DDevice9 *pD3Ddev, IDirect3DTexture9 **ppD3Dtex, DWORD colour32)
    {
        long ret = pD3Ddev->CreateTexture(8, 8, 1, 0, D3DFMT_A4R4G4B4, D3DPOOL_MANAGED, ppD3Dtex, NULL);
        if (ret != D3D_OK)
            return ret;
    
        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 D3D_OK;
    }
    
    //Get rid of those other funcs because they aren't even called -_-
    
    HRESULT WINAPI myDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE PrimType,INT BaseVertexIndex,UINT MinVertexIndex,UINT nNumVertices,UINT startIndex,UINT nPrimitiveCount)
    {//DIP det
    
    //You need to get the current stride somewhere which I assume there was a SSS hook which wasn't C+Ped
    
    if(pDevice->GetStreamSource(0, &m_StreamData, &m_OffsetInBytes, &m_Stride) == D3D_OK)//Get the current stride...
    m_StreamData->Release();
    
    if(!texRed){
    
        GenerateTexture(pDevice, &texRed, D3DCOLOR_XRGB(255, 0, 0));
    
    }
    //Get rid of all those checking for keys and put them in a thread also : it was just stri ; WTF?!?
    
    if(m_Stride == stri)
    {
        pDevice->SetTexture(0,texRed);
        oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex,  MinVertexIndex, nNumVertices, startIndex, nPrimitiveCount);//Call original func, you need a typedef at the top which you can probably find on any D3D9 hook.
    }
    
    return oDrawIndexedPrimitive(pDevice, PrimType, BaseVertexIndex,  MinVertexIndex, nNumVertices, startIndex, nPrimitiveCount);//Return original function
    
    }
    
    void main(LPVOID)//You need to create a new thread.
    {
    
        while(true){
    
            if(GetAsyncKeyState(VK_F2) < 0){
                Sleep(300);//Sleep for obvious reasons
                StrideLogger = !StrideLogger;
            }
    
            if(GetAsyncKeyState(VK_NUMPAD7)<0){
                stri++;//Had to add ++ on to this...
                Sleep(300);
            }
            if(GetAsyncKeyState(VK_NUMPAD1)<0){
                stri--;
                Sleep(300);
            }
    
            Sleep(20);//Sleep at the end to not use as much CPU
    
        }
    
    }
    I may not be ub3r at D3D but I understand enough to fix some of this.
    The code is not completely fixed but anybody who knows some D3D can probably add the rest to find the strides.

  2. #17
    amn20's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    1
    how do we use this code for hacking in Combat Arms?

  3. #18
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,881
    Reputation
    163
    Thanks
    3,291
    My Mood
    Sleepy
    Quote Originally Posted by amn20 View Post
    how do we use this code for hacking in Combat Arms?
    You don't, but coders do.

  4. #19
    whatup777's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    CA Source Code Section
    Posts
    4,025
    Reputation
    147
    Thanks
    351
    My Mood
    Dead
    Quote Originally Posted by Sealionone View Post
    You don't, but coders do.
    Dont make yourself feel better by putting others down.
    Quotes I live by.


    A foolish person learns from his mistakes, I wise person learns from others.
    Quote Originally Posted by AVGN View Post



    mhm

    i live in texas

    i was at the grocery store with my son. He saw a mexican guy, and he said "Look daddy! a mower man!"

    he's 4 yrs old

  5. #20
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,881
    Reputation
    163
    Thanks
    3,291
    My Mood
    Sleepy
    Quote Originally Posted by whatup777 View Post
    Dont make yourself feel better by putting others down.
    This is meant to be for coders not people starting on C++. =/

    He wouldn't understand how to use it. You probably do though.

    EDIT : Found the thread :

    https://www.mpgh.net/forum/207-combat...rms-chams.html
    Last edited by Crash; 06-30-2010 at 05:45 AM.

  6. #21
    AVGN's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Kekistan
    Posts
    15,566
    Reputation
    1817
    Thanks
    6,678
    Quote Originally Posted by Sealionone View Post
    This is meant to be for coders not people starting on C++. =/

    He wouldn't understand how to use it. You probably do though.

    EDIT : Found the thread :

    https://www.mpgh.net/forum/207-combat...rms-chams.html
    Quote Originally Posted by chinkboiJustin View Post
    Code:
    } #define charbody m==char Stridenum[44];
    unsigned int m_Stride;
    unsigned int NumVertices;
    unsigned int primCount;
    int Stridelogger = false;
    int stri = 0;
    int numvert = 0;
    int primcnt = 0;
    
    
    
    CD3DFont *pD3DFont;
    
    LPDIRECT3DTEXTURE9 texRed;
    LPDIRECT3DTEXTURE9 texBlue;
    LPDIRECT3DTEXTURE9 texYellow;
    LPDIRECT3DTEXTURE9 texGreen;
    LPDIRECT3DTEXTURE9 texWhite;
    LPDIRECT3DTEXTURE9 texAqua;
    //LPDIRECT3DTEXTURE9 texDarkBlue;
    //LPDIRECT3DTEXTURE9 texPink;
    //LPDIRECT3DTEXTURE9 texOrange;
    LPDIRECT3DTEXTURE9 texPurple;
    const BYTE bRed[60] =
    {
    0x42, 0x4D, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
    0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
    0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x12, 0x0B, 0x00, 0x00, 0x12, 0x0B, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0xFF, 0x00, 0x00, 0x00
    };
    const BYTE bBlue[60] =
    {
    0x42, 0x4D, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
    0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
    0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x12, 0x0B, 0x00, 0x00, 0x12, 0x0B, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xFF, 0x00, 0x00, 0x00, 0x00, 0x00
    };
    
    const BYTE bGreen[60] =
    {
    0x42, 0x4D, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
    0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
    0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
    0x00, 0x00, 0x12, 0x0B, 0x00, 0x00, 0x12, 0x0B, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x9E, 0x00, 0x00, 0x00, 0x00
    };
    const BYTE bYellow[60] =
    {
    0x42, 0x4D, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
    0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
    0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
    0x00, 0x00, 0x12, 0x0B, 0x00, 0x00, 0x12, 0x0B, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00
    };
    const BYTE bAqua[58] =
    {
    0x42, 0x4D, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
    0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
    0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xFF, 0xFF, 0x00, 0x00
    };
    const BYTE bPurple[58] =
    {
    0x42, 0x4D, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
    0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
    0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xFF, 0x00, 0xFF, 0x00
    };
    .r{}
    const BYTE bWhite[58] =
    {
    0x42, 0x4D, 0x3A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x36, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00,
    0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01,
    0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    0xFF, 0xFF, 0xFF, 0x00
    };
    
    #define D3DHOOK_TEXTURES
    HRESULT CD3DManager::Initialize()
    {
    D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bRed, 60, &texRed);
    D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bBlue, 60, &texBlue);
    D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bGreen, 60, &texGreen);
    D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bYellow, 60, &texYellow);
    D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bWhite, 60, &texWhite);
    D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bAqua, 60, &texAqua);
    D3DXCreateTextureFromFileInMemory(m_pD3Ddev, (LPCVOID)&bPurple, 60, &texPurple);
    
    pD3DFont = new CD3DFont("Comic Sans MS", 12);
    pD3DFont->InitDeviceObjects(m_pD3Ddev);
    pD3DFont->RestoreDeviceObjects();
    return S_OK;
    }
    
    
    HRESULT CD3DManager::PreReset()
    {
    
    return S_OK;
    }
    
    
    HRESULT CD3DManager::PostReset()
    {
    return S_OK;
    }
    
    HRESULT CD3DManager::Release()
    {
    delete pD3DFont;
    texRed->Release();
    texBlue->Release();
    texGreen->Release();
    texWhite->Release();
    texAqua->Release();
    texYellow->Release();
    texPurple->Release();
    return S_OK;
    }
    
    
    
    
    in DIP
    -------
    
    if(GetAsyncKeyState(VK_F1)&1)
    {
    Stridelogger=!Stridelogger;
    }
    
    if(Stridelogger)
    {
    if(GetAsyncKeyState(VK_NUMPAD7)&1)stri ;
    if(GetAsyncKeyState(VK_NUMPAD1)&1)stri--;
    if(GetAsyncKeyState(VK_NUMPAD8)&1)numvert ;
    if(GetAsyncKeyState(VK_NUMPAD2)&1)numvert--;
    if(GetAsyncKeyState(VK_NUMPAD9)&1)primcnt ;
    if(GetAsyncKeyState(VK_NUMPAD3)&1)primcnt--;
    }
    
    if(m_Stride == stri)
    {
    m_pD3Ddev->SetTexture(0,texRed);
    return m_pD3Ddev->DrawIndexedPrimitive(Type,BaseVertexIndex,
    MinVertexIndex, NumVertices, startIndex, primCount);
    }
    
    if(NumVertices == numvert)
    {
    m_pD3Ddev->SetTexture(0,texBlue);
    return m_pD3Ddev->DrawIndexedPrimitive
    (Type,BaseVertexIndex,MinVertexIndex, NumVertices, startIndex, primCount);
    }
    
    if(primCount == primcnt)
    {
    m_pD3Ddev->SetTexture(0,texGreen);
    return m_pD3Ddev->DrawIndexedPrimitive (Type,BaseVertexIndex,MinVertexIndex, NumVertices, startIndex, primCount);
    }
    
    if(GetAsyncKeyState(VK_NUMPAD0)&1)
    {
    stri=0;
    numvert=0;
    primcnt=0;
    }
    
    if(GetAsyncKeyState(VK_NUMPAD4)&1)
    {
    add_log("Player Stride:%i",stri);
    }
    
    if(GetAsyncKeyState(VK_NUMPAD5)&1)
    {
    add_log("Stride:%i",stri);
    add_log("NumVertices:%i",numvert);
    add_log("primCount:%i",primcnt);
    }

    yup, you are correct sealionone.

    /request close

  7. #22
    whatup777's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    CA Source Code Section
    Posts
    4,025
    Reputation
    147
    Thanks
    351
    My Mood
    Dead
    Would this make it chams:
    Code:
    HRESULT My_DIP(Params)
    {
             if(stride == yourstride)
             {
                        device->SetRenderState(D3DRS_ZENABLE,false);
                        device->SetTexture(&Red); //forgot the parameters
                        
                        CallRealDIP(Params);
                        
                        device->SetRenderState(D3DRS_ZENABLE,true);
                        device->SetTexture(&Blue);
             }
    }
    I take NO Credit.

    This is Void's posted in April.

    Google to the rescue
    Quotes I live by.


    A foolish person learns from his mistakes, I wise person learns from others.
    Quote Originally Posted by AVGN View Post



    mhm

    i live in texas

    i was at the grocery store with my son. He saw a mexican guy, and he said "Look daddy! a mower man!"

    he's 4 yrs old

  8. #23
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,881
    Reputation
    163
    Thanks
    3,291
    My Mood
    Sleepy
    Quote Originally Posted by whatup777 View Post
    Would this make it chams:
    Code:
    HRESULT My_DIP(Params)
    {
             if(stride == yourstride)
             {
                        device->SetRenderState(D3DRS_ZENABLE,false);
                        device->SetTexture(&Red); //forgot the parameters
                        
                        CallRealDIP(Params);
                        
                        device->SetRenderState(D3DRS_ZENABLE,true);
                        device->SetTexture(&Blue);
             }
    }
    I take NO Credit.

    This is Void's posted in April.

    Google to the rescue
    Lol you can probably find hundreds of results on Google. :P

  9. #24
    whatup777's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    CA Source Code Section
    Posts
    4,025
    Reputation
    147
    Thanks
    351
    My Mood
    Dead
    Quote Originally Posted by Sealionone View Post
    Lol you can probably find hundreds of results on Google. :P
    That is very true
    Quotes I live by.


    A foolish person learns from his mistakes, I wise person learns from others.
    Quote Originally Posted by AVGN View Post



    mhm

    i live in texas

    i was at the grocery store with my son. He saw a mexican guy, and he said "Look daddy! a mower man!"

    he's 4 yrs old

  10. #25
    amn20's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    1
    sealionone i thought your hack was patched?

  11. #26
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,881
    Reputation
    163
    Thanks
    3,291
    My Mood
    Sleepy
    Quote Originally Posted by amn20 View Post
    sealionone i thought your hack was patched?
    What does that have to do with anything ?

  12. #27
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,552
    Reputation
    127
    Thanks
    5,970
    My Mood
    Happy
    Leeched + reposted = closed
    -Rest in peace leechers-

    Your PM box is 100% full.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. [Request] How to make chams from source code [Spoonfed]
    By mutemulti in forum Combat Arms Hacks & Cheats
    Replies: 2
    Last Post: 05-26-2010, 05:10 PM
  2. [Source] Combat Arms Chams
    By scimmyboy in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 54
    Last Post: 05-22-2010, 04:31 AM
  3. [Help] Searching Chams&Wallhack (CS:S,Counter Strike: Source)
    By Freakycrit in forum CounterStrike (CS) 1.6 Hacks / Counter Strike: Source (CSS) Hacks
    Replies: 6
    Last Post: 01-05-2010, 05:00 PM
  4. Source for Combat Arms chams(wallhack)
    By bannedshow in forum C++/C Programming
    Replies: 62
    Last Post: 10-08-2009, 08:50 AM
  5. My Cham source
    By Andyklk2009 in forum Combat Arms Hacks & Cheats
    Replies: 12
    Last Post: 08-28-2008, 07:22 PM