Thread: [Help] Menu

Page 2 of 2 FirstFirst 12
Results 16 to 22 of 22
  1. #16
    NOOB's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    3,863
    Reputation
    425
    Thanks
    8,598
    made dis the other day. in b4 leachers . ez add items just by adding strings to array. grr dumb highlight messes it up.

    Code:
    struct Items 
    {
    	char *Name;
    	int Val;
    }Hack[100];
    
    struct MenuSettings
    {
    	int CurrentIndex;
    	bool show;
    }nMenu;
    
    RECT Text;
    
    cMenu Menu;
    
    char *OnOff[] = { "0", "1" };
    
    char *MenuItems[] = { 
    					"Aimbot" ,
    					"Telekill",
    					"Name ESP" ,
    					"Box ESP" ,
    					"Weapon ESP"
    					};
    
    void cMenu::DrawMenu( int x, int y, LPD3DXFONT g_pFont, LPDIRECT3DDEVICE9 pDevice )
    {
    	if(GetAsyncKeyState(VK_INSERT)&1) nMenu.show =! nMenu.show;
    	
    	if(nMenu.show)
    	{
    		if(GetAsyncKeyState(VK_UP)&1) if(nMenu.CurrentIndex > 0) nMenu.CurrentIndex--;
    		if(GetAsyncKeyState(VK_DOWN)&1) if(nMenu.CurrentIndex < sizeof( MenuItems ) / sizeof( MenuItems[0] ) - 1) nMenu.CurrentIndex++;
    		if(GetAsyncKeyState(VK_LEFT)&1) if(Hack[nMenu.CurrentIndex].Val > 0) Hack[nMenu.CurrentIndex].Val--;
    		if(GetAsyncKeyState(VK_RIGHT)&1) if(Hack[nMenu.CurrentIndex].Val < 1) Hack[nMenu.CurrentIndex].Val++;
    	
    		for( int i = 0; i < sizeof( MenuItems ) / sizeof( MenuItems[0] ); i++ )
    		{
    			Hack[i].Name = MenuItems[i];
    			DWORD FontColor;
    			SetRect( &Text, x, y + (i * 20), x+150 , y + 20 + (i * 20) );
    
    			if(i != nMenu.CurrentIndex)
    				if(Hack[i].Val > 0)
    					FontColor = Green;
    				else
    					FontColor = Red;
    			else
    				FontColor = White;
    
    			g_pFont->DrawTextA(NULL, Hack[i].Name, -1, &Text, DT_NOCLIP, FontColor);
    			g_pFont->DrawTextA(NULL, OnOff[Hack[i].Val], -1, &Text, DT_RIGHT, FontColor);
    		}
    
    		SetRect( &Text, x, y - 20, x+150 , y );
    		g_pFont->DrawTextA(NULL, ("NOOB MENU"), -1, &Text, DT_CENTER, White);
    	}
    }
    Last edited by NOOB; 03-04-2011 at 10:45 PM.

  2. #17
    flameswor10's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    12,528
    Reputation
    981
    Thanks
    10,404
    My Mood
    In Love
    Quote Originally Posted by Nubzgetkillz View Post
    if(Hack.Chams == 0){
    Hack.Chams ++;
    }else{
    Hack.Chams --;
    }

    you can do

    if(Hack.Chams) {
    Hack.Chams = !Hack.Chams;
    }
    I'm using
    Code:
    int Chams;
    No I do not make game hacks anymore, please stop asking.


    Been MPGH Minion: 6 July 2011 - 1 August 2012

  3. #18
    NOOB's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Posts
    3,863
    Reputation
    425
    Thanks
    8,598
    Quote Originally Posted by flameswor10 View Post
    I'm using
    Code:
    int Chams;
    Still would work. True = 1, False = 0. It seems kind of redundant if you are going to do that for every hack in your menu.

  4. #19
    flameswor10's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Posts
    12,528
    Reputation
    981
    Thanks
    10,404
    My Mood
    In Love
    Quote Originally Posted by ᴺᴼᴼᴮ View Post


    Still would work. True = 1, False = 0. It seems kind of redundant if you are going to do that for every hack in your menu.
    It doesn't bother me.
    No I do not make game hacks anymore, please stop asking.


    Been MPGH Minion: 6 July 2011 - 1 August 2012

  5. #20
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,324
    Reputation
    382
    Thanks
    3,007
    My Mood
    Amazed
    Quote Originally Posted by flameswor10 View Post
    @NextGen1
    C++ help in Programming Section takes too long for answers
    That's cause the developers here should be caving over there as well.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  6. #21
    whit's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    7,170
    Reputation
    490
    Thanks
    2,252
    Quote Originally Posted by NextGen1 View Post


    That's cause the developers here should be caving over there as well.
    C/C++ , Reverse Engineering <- best sections yet

  7. #22
    kotentopf's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Posts
    602
    Reputation
    26
    Thanks
    251
    Quote Originally Posted by Grim View Post
    GetSystemMetrics(SM_CXSCREEN) < width
    GetSystemMetrics(SM_CYSCREEN) < height
    nothing other than (0) and (1), just defined allready
    why not use the Viewport?

    Code:
    D3DVIEWPORT9 pViewport;
    pDevice->GetViewport(&Viewport);
    
    void cDraw::Crosshair(LPDIRECT3DDEVICE9 pDevice, int size, int strong,  D3DCOLOR xcolor)
    {
    	int iCenterX = (int)D3D.Settings.pViewport.Width/2;
    	int iCenterY = (int)D3D.Settings.pViewport.Height/2;
    
    	D3DRECT rec2 = { iCenterX- size, iCenterY, iCenterX+ size, iCenterY+ strong};
    	D3DRECT rec3 = { iCenterX, iCenterY- size, iCenterX+ strong,iCenterY+ size};
    	pDevice->Clear(1, &rec2, D3DCLEAR_TARGET, xcolor, 1000,  0);
    	pDevice->Clear(1, &rec3, D3DCLEAR_TARGET, xcolor, 100,  0);
    }
    The Internet SHOULD Be Illegal

    When you say
    "Java is a great programming language because it works on all platforms"
    it is just like
    "anal sex is great because it works on all genders"

    Are YOU a Troll?

Page 2 of 2 FirstFirst 12