Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    Nubzgetkillz's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    hacktown
    Posts
    838
    Reputation
    13
    Thanks
    411
    My Mood
    Amazed

    A way to Code Tabs in D3D Menu.

    TITLE ^^

    First, Credits: Solify(Used his base but not his checkboxes function .. Similar but not exact), Rusty, IcySeal(Sealione), Seeplusplus, Everyone!! i mean it lol..., Whoever created drawbox, draw text, etc! You know what I mean.
    Minimal Credits to me

    Necessary(YOU WILL NEED) Functions:

    Code:
    bool isMouseinRegion(int x1, int y1, int x2, int y2)
    {
        POINT cPos;
        GetCursorPos(&cPos);
        if(cPos.x > x1 && cPos.x < x2 && cPos.y > y1 && cPos.y < y2){
            return true;
        } else {
            return false;
        }
    }
    Code:
    //Draw box Function
    void FillRGB( int x, int y, int w, int h, D3DCOLOR color, IDirect3DDevice9* pDevice )
    {
    	D3DRECT rec = { x, y, x + w, y + h };
    	pDevice->Clear( 1, &rec, D3DCLEAR_TARGET, color, 0, 0 );
    }
    
    //Draw Border Function
    void DrawBorder( int x, int y, int w, int h, int px, D3DCOLOR BorderColor, IDirect3DDevice9* pDevice )
    {
    	FillRGB( x, (y + h - px), w, px,	BorderColor, pDevice );
    	FillRGB( x, y, px, h,				BorderColor, pDevice );
    	FillRGB( x, y, w, px,				BorderColor, pDevice );
    	FillRGB( (x + w - px), y, px, h,	BorderColor, pDevice );
    }
    
    void DrawBox( int x, int y, int w, int h, D3DCOLOR BoxColor, D3DCOLOR BorderColor, IDirect3DDevice9* pDevice )
    {
    	FillRGB( x, y, w, h,		BoxColor, pDevice );
    	DrawBorder( x, y, w, h, 1,	BorderColor, pDevice );
    }
    Code:
    void DrawText(int x,int y,DWORD color,char *text, LPDIRECT3DDEVICE9 pDevice){
    RECT rect;
    SetRect( &rect, x, y, x, y );
    Directx_Font->DrawTextA(NULL,text,-1,&rect, DT_LEFT|DT_NOCLIP, color);
    }
    Now Drawing the Tabs:

    Declarations:
    Code:
    Tab1 = false;
    Tab2 = false;
    Code:
    //If Tab1 is chosen then Tab2 will be false(off) .. must add all tabs that you have.
    if(isMouseinRegion(100,274,100+100,274+25)){
    	if(GetAsyncKeyState(VK_LBUTTON)&1){
    		Tab1 = true; 
                    Tab2 = false;
    	}
    }
    
    if(isMouseinRegion(50,300,50+50,300+25)){
    	if(GetAsyncKeyState(VK_LBUTTON)&1){
    		Tab1 = false; 
                    Tab2 = true;
    	}
    }
    How to use the code:

    Tab1x = X coord. Tab1y = Y coord, Tab1x+width = Xcoord+width... last one self explanatory
    Code:
    if(isMouseinRegion(Tab1x, Tab1y,Tab1x+width, Tab1y+height)
    Actually drawing the Tabs visually:

    Code:
    //Tab1 
    DrawBox(50,200,50,25,Grey,White,pDevice);
    DrawText(60,205,White,"Tab1 Text", pDevice);
    //Tab2 
    DrawBox(100,200,50,25,Grey,White,pDevice);
    DrawText(110,205,White,"Tab2 Text", pDevice);
    For the Text I suggest you add too X and Y coord because it can be centered, Do this depending on Text Size

    Explanation of the codes.. These are using the functions posted above.
    Code:
    DrawBox(Xcoord,Ycoord,Width,Height,Background Color,Border Color,pDevice);
    DrawText(Xcoord,Ycoord,Text Color,"Tab1 Text", pDevice);
    Declare Hacks. Depends I used bool not int.
    Code:
    hack1 = false;
    hack2 = false;
    Now for when you activate hacks.
    Code:
    if(Tab1 == true)
    {
    	DrawBox(50,226,170,100,Grey,White,pDevice);//Main box with hacks, Change Size to your liking
    	DrawBox(55,240,10,10,TGrey,White,pDevice);//hack1 checkbox
    	DrawText(70,237,White,"hack1",pDevice);//hack1 text
    	//This checks if The checkbox is checked
    	if(isMouseinRegion(55,240,55+10,240+10)){
    		if(GetAsyncKeyState(VK_LBUTTON)&1){
    			hack1 =! hack1; 
    		}
    	}
    	//If checkbox is checked then the hack will be activated and the checkbox will be filled/checked/whatever
    	if(chams) {
    	DrawBox(55,240,10,10,Grey,Cyan,pDevice);//hack1 checkbox checked
    	}
    }
    if(Tab2 == true)
    {
    	DrawBox(50,226,170,100,Grey,White,pDevice);//Main box with hacks
    	DrawBox(55,240,10,10,Grey,White,pDevice);//hack2 checkbox DrawText(70,237,White,"hack2",pDevice);//hack2 text
    	//This checks if The checkbox is checked
    	if(isMouseinRegion(55,240,55+10,240+10)){ //inside same as activating tabs
    		if(GetAsyncKeyState(VK_LBUTTON)&1){
    			hack2 =! hack2; 
    		}
    	}
    	//If checkbox is checked then the hack will be activated and the checkbox will be filled/checked/whatever
    	if(nametags) {
    	DrawBox(55,240,10,10,Grey,Cyan,pDevice);//hack2 box filled
    	}
    }
    Now to Make the checkboxes do something. not just get filled.

    Code:
    if(hack1) {
    PushToConsole("Ptc 1");
    } else {
    PushToConsole("Ptc 0");
    }
    
    if(hack2) {
        PushToConsole("Ptc2 1");
    } else {
        PushToConsole("Ptc2 0");
    }
    HERE IS SCREENSHOT OF MY VERSION..



    And if you need help on any of this just ask.. and anything needed to be added/edited/revised just post and say!

    ok bye thanks if you liked!

    Member since September 25, 2010

    Current Objectives:
    • Graduate college with a degree in Computer Science
    • Find a decent job in the Computer Science Field
    • Learn more programming languages

    Looking for Elo Boosting Job - League of Legends
    Looking for Bronze -> Gold Jobs


    Skype: whatthedream

  2. The Following 6 Users Say Thank You to Nubzgetkillz For This Useful Post:

    CoderDream (11-22-2010),fvestrgenrl (11-21-2010),iMelo~* (08-17-2012),MrSkafighter (11-21-2010),o-o (11-21-2010),Sydney (11-21-2010)

  3. #2
    ac1d_buRn's Avatar
    Join Date
    Aug 2009
    Gender
    female
    Location
    CA Source Section
    Posts
    3,406
    Reputation
    157
    Thanks
    3,991
    My Mood
    Flirty
    You can do it like that, but it is very messy and sloppy. you can create a struct/class for that that could draw each tab and get coords for it.

    Other than that, Gj

  4. #3
    dean-wingess's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Posts
    409
    Reputation
    29
    Thanks
    212
    My Mood
    Stressed
    Quote Originally Posted by ac1d_buRn View Post
    You can do it like that, but it is very messy and sloppy. you can create a struct/class for that that could draw each tab and get coords for it.

    Other than that, Gj
    Agreed, it's also faster and easier to create a tab|button|checkbox with it.

    My only problem might be the Change Console Value reset thingy..(100% Unlaggy)

    I won't release it since ****** and DC use it :/

    Someone knows how to slow down a reset without sleeping my whole Present and Reset? /
    [YOUTUBE]e89lqiE0wi0[/YOUTUBE]

  5. #4
    freedompeace's Avatar
    Join Date
    Jul 2010
    Gender
    female
    Posts
    3,035
    Reputation
    340
    Thanks
    2,784
    My Mood
    Sad
    Holy shit that looks great. I don't personally care how you did it - if it looks good and doesn't lag then it passes my tests.

  6. #5
    seeplusplus's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    Massachusetts
    Posts
    329
    Reputation
    8
    Thanks
    85
    Quote Originally Posted by ac1d_buRn View Post
    You can do it like that, but it is very messy and sloppy. you can create a struct/class for that that could draw each tab and get coords for it.

    Other than that, Gj
    That's what I do...
    This is messy...
    Goals:
    Green = Done
    Blue = Getting Somewhere
    Red = Not Done
    • Mouse Grid
    • PTC Method
    • Trigger Bot

    I'm trying to think of more stuff!

  7. #6
    GodHack2's Avatar
    Join Date
    May 2010
    Gender
    male
    Posts
    645
    Reputation
    38
    Thanks
    762
    My Mood
    Amused
    i have another way to do it but thanks for sharing





    beat this bitches ^^^^^^^

    Current Stats : Bored :/


    Respect list :
    Crash !
    Gordon'
    Markoj

  8. #7
    iShockYouuu's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Posts
    129
    Reputation
    10
    Thanks
    27
    Give credits!!

  9. #8
    seeplusplus's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    Massachusetts
    Posts
    329
    Reputation
    8
    Thanks
    85
    HE DID! THERE'S NO CREDITS TO YOU GTM!
    HEY, I WONDER...
    MAYBE GTM IS CORYSTER!
    xD
    JK!
    Last edited by seeplusplus; 11-21-2010 at 07:44 AM.
    Goals:
    Green = Done
    Blue = Getting Somewhere
    Red = Not Done
    • Mouse Grid
    • PTC Method
    • Trigger Bot

    I'm trying to think of more stuff!

  10. #9
    GodHack2's Avatar
    Join Date
    May 2010
    Gender
    male
    Posts
    645
    Reputation
    38
    Thanks
    762
    My Mood
    Amused
    No he is not





    beat this bitches ^^^^^^^

    Current Stats : Bored :/


    Respect list :
    Crash !
    Gordon'
    Markoj

  11. #10
    seeplusplus's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    Massachusetts
    Posts
    329
    Reputation
    8
    Thanks
    85
    Quote Originally Posted by GodHack2 View Post
    No he is not
    It's a joke...
    But iShockyouuu is GTM!
    Goals:
    Green = Done
    Blue = Getting Somewhere
    Red = Not Done
    • Mouse Grid
    • PTC Method
    • Trigger Bot

    I'm trying to think of more stuff!

  12. #11
    Nubzgetkillz's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    hacktown
    Posts
    838
    Reputation
    13
    Thanks
    411
    My Mood
    Amazed
    Lol, Thanks but yeah it is messy, This is just a simple way of doing it, ac1d_buRn I was going to do it that way but yeah... I will eventually.

    Member since September 25, 2010

    Current Objectives:
    • Graduate college with a degree in Computer Science
    • Find a decent job in the Computer Science Field
    • Learn more programming languages

    Looking for Elo Boosting Job - League of Legends
    Looking for Bronze -> Gold Jobs


    Skype: whatthedream

  13. #12
    NOOB's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    3,863
    Reputation
    425
    Thanks
    8,598
    All I do is:

    Code:
    void DrawTab( int x, int y, int w, int h, char *text, bool &tab, int num )

  14. #13
    Nubzgetkillz's Avatar
    Join Date
    Sep 2010
    Gender
    male
    Location
    hacktown
    Posts
    838
    Reputation
    13
    Thanks
    411
    My Mood
    Amazed
    Quote Originally Posted by ᴺᴼᴼᴮ View Post
    All I do is:

    Code:
    void DrawTab( int x, int y, int w, int h, char *text, bool &tab, int num )
    -.- good one Lol I can never talk to you because you always hiding in your basement working on your incognito... and never actually adding me on MSN.

    Member since September 25, 2010

    Current Objectives:
    • Graduate college with a degree in Computer Science
    • Find a decent job in the Computer Science Field
    • Learn more programming languages

    Looking for Elo Boosting Job - League of Legends
    Looking for Bronze -> Gold Jobs


    Skype: whatthedream

  15. #14
    fvestrgenrl's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Posts
    172
    Reputation
    9
    Thanks
    26
    works great, no extra lag. thanks
    Quote Originally Posted by fallon View Post
    hi i have make a hack and with hot keys but when i start it combat arms close down


    i use this code



    Code:
    PushToConsole("SkelModelStencil (V_F9)1");
    PushToConsole("ShowFps (V_INSERT");
    PushToConsole("ActivationDistance 999999(V_F6)" );
    PushToConsole("DisableCrosshair (V_NUMPAD 1" );
    PushToConsole("CrossHairR 255(V_NUMPAD 2) ");
    PushToConsole("ReloadSpeed 0.000000(V_F5) ");
    }
    Learning C++
    Pg 33/1225
    2.7%

  16. #15
    o-o's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    who reading that ? T_T
    Posts
    682
    Reputation
    10
    Thanks
    307
    My Mood
    Cold
    it's works but how can i do when the mouse is on the box and clicking the Tab is opening ? just do the same positons? (x,y....)

    Happy Hanukkah For All Of MPGH !


    The Real Life Are Better Then A Game !


    Song :[YOUTUBE]vgKBOkvO5N0&feature=player_embedded[/YOUTUBE]
    Best Friends :

    Hax4Life!

    Solify

    [MPGH]Drake`

    Respect Them Or I'll Kill You ...



Page 1 of 2 12 LastLast