Jump to content
Welcome, Guest
Existing user? Sign In

Sign In



Sign Up
The MatriX
  • Welcome To Ghbsys
  • CS GO Streaming Version is released. Have fun streaming while cheating!
  • Have a Payment Issue? Send us a Support ticket.
  • Make a thread if you need support or join our discord for live support.
  • Have Suggestions? Make a thread and you'll earn Ghbsys Points for implemented suggestions.
  • Join our discord to stay well connected! Don't forget to integrate your discord to the site
  • Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum

    Welcome to [GHB] - GAmEhAcKbAsTaRdS Forum, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information for you to signup. Be apart of [GHB] - GAmEhAcKbAsTaRdS Forum by signing in or creating an account.
    • Start new topics and reply to others
    • Subscribe to topics and forums to get email updates
    • Get your own profile page and make new friends
    • Send personal messages to other members.

    D3D9 Draw 2D Esp Box Source


    Zexiii
     Share

    Recommended Posts

    I was fucking with some d3d9 code and i created this:

    void DrawESPBox( D3DXVECTOR3 Head, D3DXVECTOR3 Foot, DWORD dwColor, LPDIRECT3DDEVICE9 pDevice )
    {
    
    	D3DXVECTOR3 Box =  Head - Foot;
    
     	if( Box.y  < 0 )
     		Box.y *= -1;
    
    	int BoxWidth    = (int)Box.y / 2;
    	int DrawX		= (int)Head.x - ( BoxWidth / 2 );
    	int DrawY		= (int)Head.y;
    
    	DrawBorder( DrawX, DrawY, BoxWidth, (int)Box.y, 2, dwColor, pDevice );
    	DrawBorder( DrawX, DrawY, BoxWidth, (int)Box.y, 1, 0xFF000000, pDevice );
    }
    

    I could t test it because some reasons but be happy and i works.

    • Upvote 2
    • Downvote 1
    Link to comment
    Share on other sites

    The original code is from: luis3232, C0der.DisOwnedII, Azorbix, ChaosMagician, luizimloko, gellin, Pasha, mmbob, fatboy88, NeoIII, zerocool

     

    http://www.webcheats.com.br/forum/showthread.php?t=2417661


    check credits

    Edited by Kazbah
    • Upvote 1
    Link to comment
    Share on other sites

    this is mine

     

     

    cBoxInfo cEngine::DrawBoundingBox( Vector vHead, Vector vFoot, DWORD color, int edge, bool CalcOnly )//edge == 1 edge only, edge == 2 box + edge box
    {
        CVector2i iHead, iFoot;
        cBoxInfo m_Box = {0};
    
        //center boxes & add correction's
        vFoot.x = vHead.x;
        vFoot.z = vHead.z;
    
        if( WorldToScreen( vHead, iHead ) && WorldToScreen( vFoot, iFoot ) )
        {
            m_Box.iHead = iHead;
            m_Box.iFoot = iFoot;
    
            iFoot.y += 5;//some corrections
            iHead.y -= 7;//some corrections
            int w = ( iFoot.y - iHead.y ) / 4;
    
            if( CalcOnly == false )
            {
                if( edge == 1 )
                {
                    DrawEdgeBoundingBox( ( iHead.x - w ), iHead.y, ( w * 2 ), ( iFoot.y - iHead.y ), color, 8 );
                } else if( edge == 2 ) {
                    m_pDx11Renderer.DrawBorder( ( iHead.x - w ), iHead.y, ( w * 2 ), ( iFoot.y - iHead.y ), 1, color );
                    DrawEdgeBoundingBox( ( iHead.x - w - 3 ), iHead.y - 3, ( w * 2 ) + 6, ( iFoot.y - iHead.y ) + 6, txtYellow, 6 );//draw 3 px bigger
                } else {
                    m_pDx11Renderer.DrawBorder( ( iHead.x - w ), iHead.y, ( w * 2 ), ( iFoot.y - iHead.y ), 1, color );
                }
    
            }
    
            m_Box.x = ( iHead.x - w );
            m_Box.y = iHead.y;
            m_Box.w = ( w * 2 );
            m_Box.h = ( iFoot.y - iHead.y );
            m_Box.middle_x = iHead.x;
        }
        return m_Box;
    }
    
    void cEngine::DrawEdgeBoundingBox( int x, int y, int w, int h, DWORD BorderColor, int override_le, bool midpoint, bool center )
    {
        //draw circle on center of box
        if( midpoint )
            m_pDx11Renderer.DrawCircle( x, y, 2, txtGreen );
    
        //center x y in the box
        if( center )
        {
            x -= ( w / 2 );
            y -= ( h / 2 );
        }
    
        int le = w / 4;
    
        if( le > ( h / 4 ) )
            le = ( h / 4 );
    
        if( override_le > 0 )
            le = override_le;
    
        m_pDx11Renderer.DrawLine( x, y, x + le, y, BorderColor );
        m_pDx11Renderer.DrawLine( x, y, x, y + le, BorderColor );
        m_pDx11Renderer.DrawLine( x + w, y, x + w - le, y, BorderColor );
        m_pDx11Renderer.DrawLine( x + w, y, x + w, y + le, BorderColor );
        m_pDx11Renderer.DrawLine( x, y + h, x, y + h - le, BorderColor );
        m_pDx11Renderer.DrawLine( x, y + h, x + le, y + h, BorderColor );
        m_pDx11Renderer.DrawLine( x + w, y + h, x +w - le, y + h, BorderColor );
        m_pDx11Renderer.DrawLine( x + w, y + h, x + w, y + h - le, BorderColor );
    }
    
    • Upvote 2
    Link to comment
    Share on other sites

    Where i paste the code to get 2d esp box working?

    we are not supporting "copy & paste """coders""""

    • Upvote 1
    Link to comment
    Share on other sites

    That this kind of """coders"""" still excists, i didnt know this -.-

    Link to comment
    Share on other sites

    That this kind of """coders"""" still excists, i didnt know this -.-

     

    There will always be those types of people who try to take credit for others work.

    Link to comment
    Share on other sites

    • 2 weeks later...
    • 1 month later...
    • 8 months later...

    this is mine

     

     

    cBoxInfo cEngine::DrawBoundingBox( Vector vHead, Vector vFoot, DWORD color, int edge, bool CalcOnly )//edge == 1 edge only, edge == 2 box + edge box
    {
        CVector2i iHead, iFoot;
        cBoxInfo m_Box = {0};
    
        //center boxes & add correction's
        vFoot.x = vHead.x;
        vFoot.z = vHead.z;
    
        if( WorldToScreen( vHead, iHead ) && WorldToScreen( vFoot, iFoot ) )
        {
            m_Box.iHead = iHead;
            m_Box.iFoot = iFoot;
    
            iFoot.y += 5;//some corrections
            iHead.y -= 7;//some corrections
            int w = ( iFoot.y - iHead.y ) / 4;
    
            if( CalcOnly == false )
            {
                if( edge == 1 )
                {
                    DrawEdgeBoundingBox( ( iHead.x - w ), iHead.y, ( w * 2 ), ( iFoot.y - iHead.y ), color, 8 );
                } else if( edge == 2 ) {
                    m_pDx11Renderer.DrawBorder( ( iHead.x - w ), iHead.y, ( w * 2 ), ( iFoot.y - iHead.y ), 1, color );
                    DrawEdgeBoundingBox( ( iHead.x - w - 3 ), iHead.y - 3, ( w * 2 ) + 6, ( iFoot.y - iHead.y ) + 6, txtYellow, 6 );//draw 3 px bigger
                } else {
                    m_pDx11Renderer.DrawBorder( ( iHead.x - w ), iHead.y, ( w * 2 ), ( iFoot.y - iHead.y ), 1, color );
                }
    
            }
    
            m_Box.x = ( iHead.x - w );
            m_Box.y = iHead.y;
            m_Box.w = ( w * 2 );
            m_Box.h = ( iFoot.y - iHead.y );
            m_Box.middle_x = iHead.x;
        }
        return m_Box;
    }
    
    void cEngine::DrawEdgeBoundingBox( int x, int y, int w, int h, DWORD BorderColor, int override_le, bool midpoint, bool center )
    {
        //draw circle on center of box
        if( midpoint )
            m_pDx11Renderer.DrawCircle( x, y, 2, txtGreen );
    
        //center x y in the box
        if( center )
        {
            x -= ( w / 2 );
            y -= ( h / 2 );
        }
    
        int le = w / 4;
    
        if( le > ( h / 4 ) )
            le = ( h / 4 );
    
        if( override_le > 0 )
            le = override_le;
    
        m_pDx11Renderer.DrawLine( x, y, x + le, y, BorderColor );
        m_pDx11Renderer.DrawLine( x, y, x, y + le, BorderColor );
        m_pDx11Renderer.DrawLine( x + w, y, x + w - le, y, BorderColor );
        m_pDx11Renderer.DrawLine( x + w, y, x + w, y + le, BorderColor );
        m_pDx11Renderer.DrawLine( x, y + h, x, y + h - le, BorderColor );
        m_pDx11Renderer.DrawLine( x, y + h, x + le, y + h, BorderColor );
        m_pDx11Renderer.DrawLine( x + w, y + h, x +w - le, y + h, BorderColor );
        m_pDx11Renderer.DrawLine( x + w, y + h, x + w, y + h - le, BorderColor );
    }
    
    Neo this a D3d9 menu ? with what yoi ha make it c++ or c#.

    i have try it to create one with visual c++ 2016 for assault cube buti have some errors. can you help?

    • Downvote 2
    Link to comment
    Share on other sites

     

    Neo this a D3d9 menu ? with what yoi ha make it c++ or c#.

    i have try it to create one with visual c++ 2016 for assault cube buti have some errors. can you help?

     

     

    seems that u are not the smartest guy :D

     

    D3D9 Draw 2D Esp Box Source

     

    example:

    0630d-c4f8afe0-bf7f-4819-bbf7-38de3fbe8e

    • Upvote 1
    Link to comment
    Share on other sites

    • 1 month later...
    • 3 months later...
    • 1 month later...
    Guest
    This topic is now closed to further replies.
     Share

    • Recently Browsing   0 members

      • No registered users viewing this page.
    ×
    ×
    • Create New...