google-site-verification: googlebaca44933768a824.html Menu ProBlem :(. .. - Old Royal Hack Forum

Announcement

Collapse
No announcement yet.

Menu ProBlem :(. ..

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Menu ProBlem :(. ..

    Hi,

    im new with Coding ... but i know a lot now "Thx Ballin" o.o

    i have a problem with the Royal Base Menu By "Fum1n" ...

    when i compile it i get error with "Menu_TEXT" "MENU_SELECTION" "MENU_BG"

    whats wrong :

    Can someone add me in msn or xfire pls :P ?

    xfire "hitmanundead"
    msn "[email protected]"

    Code:
    #include <windows.h>
    #include "cMenu.h"
    #include "gui.h"
    
    //******************************
    
    float menu1;//menu sections
    float DrawEsp;
    float GetWeaponID;
    float CrossHairByLix;
    
    bool bKeyPressed[256];
    bool IsKeyPressed(int iKey)
    {
    	//used for menu toggle
    	if (GetAsyncKeyState(iKey))
    	{
    		if (!bKeyPressed[iKey])
    		{
    			bKeyPressed[iKey] = true;
    			return true;
    		}
    	}
    	else
    		bKeyPressed[iKey] = false;
    
    	return false;
    }
    
    bool bMenu =false;
    
    struct a_menu{char title[1000];float* value;float min;float max;float step;};
    int menuIndex = 0;int menuItems = 0;
    a_menu amenu[150];
    cMenu gMenu;
    
    //******************************
    int cMenu::AddMenuEntry(int n, char title[1000], float* value, float min, float max, float step)
    {
    	strcpy( amenu[n].title,title);
    	amenu[n].value = value;
    	amenu[n].min = min;
    	amenu[n].max = max;
    	amenu[n].step = step;
    	return (n+1);
    }
    
    //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    void cMenu::InitializeMenu()
    {
    	int i = 0;
    	i = AddMenuEntry(i, ">ESP", &menu1, 0, 1, 1);
    	if(menu1==1)
    	{
        i = AddMenuEntry(i, "  Esp",&DrawEsp, 0, 3, 1);
    	i = AddMenuEntry(i, "  NoSpread",&GetWeaponID, 0, 1, 1);
    	i = AddMenuEntry(i, "  Crosshair",&CrossHairByLix, 0, 1, 1);
    	}
    
    
    	menuItems = i;
    }
    //******************************
    //Graphical
    //******************************
    
    void cMenu::MenuDrawing()
    {
    	if (IsKeyPressed(VK_INSERT)) bMenu = !bMenu;
    
    
        gMenu.KeyMenuEvent();
    
    	if (!bMenu) return;
    
    
       int i = menuItems;
        gGui.blackBorder(90,500,146, (16*i)+1);
    	
    	HalFLife2.m_pNeeded->FillRGBA( 90, 480,145,20, Menu_BG);
    	gGui.blackBorder(90,480,146, 20);
    	HalFLife2.m_pNeeded->DrawString( 100,484,120,"            BP-ESP");
    	HalFLife2.m_pNeeded->FillRGBA( 90, 500,145,(16*i), Menu_BG);
    	
    	//{
        
    	for(int i=0;i<menuItems;i++)
    		if( i!=menuIndex)
    		{	
    			
    			HalFLife2.m_pNeeded->DrawString( 100,500 + (16*i),120,amenu[i].title);
    			HalFLife2.m_pNeeded->DrawString( 150,500 + (16*i),lol,"               %2.2f", amenu[i].value[0] );
    			
    
    		}
    		else
    		{
    			HalFLife2.m_pNeeded->FillRGBA( 90, 500+(16*i),145,16, Menu_Selection);//make a black background
    			HalFLife2.m_pNeeded->DrawString( 100,500 + (16*i),lol,amenu[i].title);
    			HalFLife2.m_pNeeded->DrawString( 150,500 + (16*i),lol,"               %2.2f", amenu[i].        value[0] );
    			}
    		}
    
    //Menu movement
    
    bool cMenu::KeyMenuEvent()
    {
    	if( GetAsyncKeyState(VK_UP) & 1) 
    	{
    		if( menuIndex>0 ) menuIndex--;
    		else menuIndex = menuItems - 1;
    		return 0;
    	}
    	else if( GetAsyncKeyState(VK_DOWN) & 1) 
    	{
    		if( menuIndex<menuItems-1 ) menuIndex++;
    		else menuIndex = 0;
    		return 0;
    	}
    	else if( GetAsyncKeyState(VK_LEFT) & 1) 
    	{
    		if( amenu[menuIndex].value )
    		{
    			amenu[menuIndex].value[0] -= amenu[menuIndex].step;
    			if( amenu[menuIndex].value[0] < amenu[menuIndex].min )
    				amenu[menuIndex].value[0] = amenu[menuIndex].max;
    		}
    		return 0;
    	}
    	else if( GetAsyncKeyState(VK_RIGHT) & 1) 
    	{
    		if( amenu[menuIndex].value )
    		{
    			amenu[menuIndex].value[0] += amenu[menuIndex].step;
    			if( amenu[menuIndex].value[0] > amenu[menuIndex].max )
    				amenu[menuIndex].value[0] = amenu[menuIndex].min;
    		}
    		return 0;
    	}
    	return 1;
    }
    [EDIT]- Fixed :P

    #2
    Just by looking at the code you posted. It's obvious you know nothing about the language. Why don't you pick up a book, or find a proper tutorial that will teach you how to program in C++. I don't understand how you expect to actually learn the language by copying and pasting together code, and then when it doesn't work, you ask for help...

    Comment


      #3
      you need to add some more color defines into the SDK.h file

      PHP Code:
      #define MENU_BG COLORCODE( 10,10,10,100 )
      #define MENU_SELECTION COLORCODE (10,10,10,255 )
      #define MENU_TEXT COLORCODE ( 255,255,255,255 ) 

      sigpic

      -=[ http://kaos.99k.org ]=-

      czkb: yay but for now i still understand half of the half of the quarter of the half of what i must know.
      [email protected] (E-mail Address Not Verified) says:
      http://www.youtube.com/user/ka0s99k#p/f/70/iK9bhyl6B_E
      J says:
      can we please accomplish something

      Comment


        #4
        THANKS it works :) :D

        but now when i start the game and join a server, i open the menu and try to make "esp" ON ... i dont see esp O.o

        Were can i get the Functions like "if(Esp){ DrawPlayerESP(); }"

        "DrawPlayerESP"

        The Esp from the Players O.o ... were can i get this function , just for Roy@l hack src. ?

        btw i use [src]Royal Base Hook.

        The menu .
        Code:
        #include <windows.h>
        #include "cMenu.h"
        #include "gui.h"
        
        //******************************
        
        float menu1;//menu sections
        float BunnyHop;
        float Crosshair;
        float Esp
        
        
        bool bKeyPressed[256];
        bool IsKeyPressed(int iKey)
        {
        	//used for menu toggle
        	if (GetAsyncKeyState(iKey))
        	{
        		if (!bKeyPressed[iKey])
        		{
        			bKeyPressed[iKey] = true;
        			return true;
        		}
        	}
        	else
        		bKeyPressed[iKey] = false;
        
        	return false;
        }
        
        bool bMenu =false;
        
        struct a_menu{char title[1000];float* value;float min;float max;float step;};
        int menuIndex = 0;int menuItems = 0;
        a_menu amenu[150];
        cMenu gMenu;
        
        //******************************
        int cMenu::AddMenuEntry(int n, char title[1000], float* value, float min, float max, float step)
        {
        	strcpy( amenu[n].title,title);
        	amenu[n].value = value;
        	amenu[n].min = min;
        	amenu[n].max = max;
        	amenu[n].step = step;
        	return (n+1);
        }
        
        //>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
        void cMenu::InitializeMenu()
        {
        	int i = 0;
        	i = AddMenuEntry(i, ">Menu", &menu1, 0, 1, 1);
        	if(menu1==1)
        	{
            i = AddMenuEntry(i, "  BunnyHop",&Bunnyhop, 0, 1, 1);
        	i = AddMenuEntry(i, "  CrossHair",&Crosshair, 0, 1, 1);
        	i = AddMenuEntry(i, "  Esp", &Esp, 0, 1, 1);
        	if(Esp){ DrawPlayerESP(); }
        	}
        
        
        	menuItems = i;
        }
        //******************************
        //Graphical
        //******************************
        
        void cMenu::MenuDrawing()
        {
        	if (IsKeyPressed(VK_INSERT)) bMenu = !bMenu;
        
        
            gMenu.KeyMenuEvent();
        
        	if (!bMenu) return;
        
        
           int i = menuItems;
            gGui.blackBorder(90,500,146, (16*i)+1);
        	
        	HalFLife2.m_pNeeded->FillRGBA( 90, 480,145,20, MENU_BG);
        	gGui.blackBorder(90,480,146, 20);
        	HalFLife2.m_pNeeded->DrawString( 100,484,MENU_TEXT,"          (P3-Hack)  ");
        	HalFLife2.m_pNeeded->FillRGBA( 90, 500,145,(16*i), MENU_BG);
        	
        	//{
            
        	for(int i=0;i<menuItems;i++)
        		if( i!=menuIndex)
        		{	
        			
        			HalFLife2.m_pNeeded->DrawString( 100,500 + (16*i),MENU_TEXT,amenu[i].title);
        			HalFLife2.m_pNeeded->DrawString( 150,500 + (16*i),MENU_TEXT,"               %2.2f", amenu[i].value[0] );
        			
        
        		}
        		else
        		{
        			HalFLife2.m_pNeeded->FillRGBA( 90, 500+(16*i),145,16, MENU_SELECTION);//make a black background
        			HalFLife2.m_pNeeded->DrawString( 100,500 + (16*i),MENU_TEXT,amenu[i].title);
        			HalFLife2.m_pNeeded->DrawString( 150,500 + (16*i),MENU_TEXT,"               %2.2f", amenu[i].        value[0] );
        			}
        		}
        
        //Menu movement
        
        bool cMenu::KeyMenuEvent()
        {
        	if( GetAsyncKeyState(VK_UP) & 1) 
        	{
        		if( menuIndex>0 ) menuIndex--;
        		else menuIndex = menuItems - 1;
        		return 0;
        	}
        	else if( GetAsyncKeyState(VK_DOWN) & 1) 
        	{
        		if( menuIndex<menuItems-1 ) menuIndex++;
        		else menuIndex = 0;
        		return 0;
        	}
        	else if( GetAsyncKeyState(VK_LEFT) & 1) 
        	{
        		if( amenu[menuIndex].value )
        		{
        			amenu[menuIndex].value[0] -= amenu[menuIndex].step;
        			if( amenu[menuIndex].value[0] < amenu[menuIndex].min )
        				amenu[menuIndex].value[0] = amenu[menuIndex].max;
        		}
        		return 0;
        	}
        	else if( GetAsyncKeyState(VK_RIGHT) & 1) 
        	{
        		if( amenu[menuIndex].value )
        		{
        			amenu[menuIndex].value[0] += amenu[menuIndex].step;
        			if( amenu[menuIndex].value[0] > amenu[menuIndex].max )
        				amenu[menuIndex].value[0] = amenu[menuIndex].min;
        		}
        		return 0;
        	}
        	return 1;
        }
        Edit:
        sry for dobble post -.-

        i have do now this


        Menu.cpp

        Code:
        void cMenu::InitializeMenu()
        {
          	int i = 0;
        	i = AddMenuEntry(i, "-Misc", &menu1, 0, 1, 1);
        	if(menu1==1)
        	{
            i = AddMenuEntry(i, "   CrossHair",&CH, 0, 1, 1);
        	if(CH) { HalFLife2.m_pEsp->CrossHairByLix(); }
        	}
        
        	menuItems = i;
        }
        hmm still dont work :(
        Last edited by Guest; 11-05-2007, 03:27 PM.

        Comment


          #5
          sry for dobble post -.-

          i have do now this


          Menu.cpp

          Code:
          void cMenu::InitializeMenu()
          {
            	int i = 0;
          	i = AddMenuEntry(i, "-Misc", &menu1, 0, 1, 1);
          	if(menu1==1)
          	{
              i = AddMenuEntry(i, "   CrossHair",&CH, 0, 1, 1);
          	if(CH) { HalFLife2.m_pEsp->CrossHairByLix(); }
          	}
          
          	menuItems = i;
          }
          hmm still dont work :(

          Comment


            #6
            ???

            Originally posted by Punisher View Post
            sry for dobble post -.-

            i have do now this


            Menu.cpp

            Code:
            void cMenu::InitializeMenu()
            {
              	int i = 0;
            	i = AddMenuEntry(i, "-Misc", &menu1, 0, 1, 1);
            	if(menu1==1)
            	{
                i = AddMenuEntry(i, "   CrossHair",&CH, 0, 1, 1);
            	if(CH) { HalFLife2.m_pEsp->CrossHairByLix(); }
            	}
            
            	menuItems = i;
            }
            hmm still dont work :(
            ok, firstly. you dont call esp from there,

            PHP Code:

            void cMenu
            ::InitializeMenu()
            {
                  
            int i 0;
                
            AddMenuEntry(i"-Misc", &menu1011);
                if(
            menu1==1)
                {
                    
            AddMenuEntry(i"   CrossHair",&CH011);
                }

                
            menuItems i;

                    if(
            CH) { HalFLife2.m_pEsp->CrossHairByLix(); }


            this will help, you want to keep declarations/calls seperate from block code, so its easyer to maintain and understand!

            secondly, have you prepped the code for this crosshair call to work? when i added a menu into my hack, i had to sort aspects like the crosshair into its own "void"

            void Esp::Cross1( void )

            if you havent done this then you will struggle without a doubt. all other functions like aimbot / flash removals ect can be ran the exact same way as you are doing with crosshiars, you just need to prep each funtion into its own void.

            sigpic

            -=[ http://kaos.99k.org ]=-

            czkb: yay but for now i still understand half of the half of the quarter of the half of what i must know.
            [email protected] (E-mail Address Not Verified) says:
            http://www.youtube.com/user/ka0s99k#p/f/70/iK9bhyl6B_E
            J says:
            can we please accomplish something

            Comment


              #7
              Dont forget, if u do like this :

              Code:
              void Esp::CrossGreen( void )
              {
              
              	//CROSS
              	HalFLife2.m_pNeeded->FillRGBA( (sScreenSize.m_iWidth / 2), (sScreenSize.m_iHeight / 2) - 5, 1,11, CHEAT_GREEN );
              	HalFLife2.m_pNeeded->FillRGBA( (sScreenSize.m_iWidth / 2) - 5, (sScreenSize.m_iHeight / 2), 11,1, CHEAT_GREEN );
              
              }
              Then u have to add in esp.h

              Code:
              	void CrossGreen( void );
              Example of esp.h :

              Code:
              #ifndef __ESP_H__
              #define __ESP_H__
              
              #include "sdk.h"
              
              class Esp
              {
              public:
              	void CrossBlue( void );
              	void CrossRed( void );
              	void DrawBoxes( void );
              	void CrossGreen( void );
              	void DrawEsp( void );
              	void DrawCircle( void );
              
              };
              
              #endif

              Comment


                #8
                if i wanted to draw the esp name what else do i need to add

                Code:
                	if (esp_name) { HalFLife2.m_pNeeded->DrawString(); }

                Comment


                  #9
                  Originally posted by Taco112 View Post
                  if i wanted to draw the esp name what else do i need to add

                  Code:
                  	if (esp_name) { HalFLife2.m_pNeeded->DrawString(); }
                  Lol....Your calling the DrawString function, yet your not telling it to 'draw' anything.

                  Comment


                    #10
                    i got it to work

                    Comment


                      #11
                      hm can someone help me?

                      Code:
                      void cMenu::InitializeMenu()
                      {
                      	 
                      	int i = 0;
                      	i = AddMenuEntry(i, "Misc", &menu1, 0, 1, 1);
                      	if(menu1==1)
                      	{
                          i = AddMenuEntry(i, "No Flash/Smoke",&NoFlashSmoke, 0, 3, 1);
                      	}
                      
                      	menuItems = i;
                      
                      	if (NoFlashSmoke) 
                      	{
                      		HalFLife2.m_pEsp->NoFlashSmoke();
                      	}
                      	
                      }
                      Code:
                      error C2065: 'NoFlashSmoke' : undeclared identifier
                      error C3861: 'NoFlashSmoke': identifier not found, even with argument-dependent lookup
                      what did i do wrong?

                      esp.h:
                      Code:
                      #ifndef __ESP_H__
                      #define __ESP_H__
                      
                      #include "sdk.h"
                      
                      class Esp
                      {
                      public:
                      	void DrawEsp( void );
                      	void NoFlashSmoke ( void );
                      };
                      
                      #endif
                      and without the menu noflash/smoke works perfect

                      help?

                      Comment


                        #12
                        If you do not understand that error, I HIGHLY suggets you pick up a C++ Book as you will get nowhere, slow, otherwise.

                        Its saying you have not declared what 'NoFlashSmoke' is, IIRC that menu uses float values,

                        Just define, NoFlashSmoke.

                        float NoFlashSmoke;

                        Simple as,

                        Comment


                          #13
                          oh,,,
                          thanks ;]
                          and im currently learning c++ i didnt notice that
                          thanks again =]

                          edit:
                          where do I add gMenu.initialize and drawing
                          and believe me, I spent some time trying to find where to put it
                          thanks in advance
                          Last edited by Guest; 11-20-2007, 04:46 PM.

                          Comment


                            #14
                            I presume your using the Royal Hack base, so you will want to add it to your CDrawPanel (Panels.cpp)


                            In the function CDrawPanel::Paint, put the Initialise and MenuDrawing Call after the Checks to make sure your ingame, etc.

                            Comment


                              #15
                              I tryed putting it there, I get an error in the compilation saying "gMenu, undeclared identifier"..
                              I'm sure I missed something stupid as always
                              Thanks again for your time =]

                              Comment


                                #16
                                Originally posted by n0n3 View Post
                                "gMenu, undeclared identifier"..
                                ....In panels.cpp...
                                #include "cMenu.h"

                                Comment


                                  #17
                                  *cough* no *cough*

                                  Comment


                                    #18
                                    another problem
                                    Code:
                                    void cMenu::InitializeMenu()
                                    {
                                    	int i = 0;
                                    
                                    	if (nohands)
                                    	{
                                    		Private.m_pEsp->nohands();
                                    	}
                                    
                                    
                                    	i = AddMenuEntry(i, "Features", &menu1, 0, 1, 1);
                                    	if(menu1==1)
                                    	{
                                    	i = AddMenuEntry(i, "Wallhack/ESP", &menu2, 0, 1, 1);
                                    	if(menu2==1)
                                    	{
                                    	i = AddMenuEntry(i, " No Hands",&nohands, 0, 1, 1);
                                    	}
                                    	i = AddMenuEntry(i, "Misc", &menu3, 0, 1, 1);
                                    	}
                                    
                                    	menuItems = i;
                                    }
                                    it says
                                    nohands unresolved external

                                    i found some explanations on google but nothing that helps in this "situtation"
                                    anyways
                                    help? :D

                                    Comment


                                      #19
                                      float nohands;

                                      Comment


                                        #20
                                        i did that already
                                        still doesnt work
                                        i tryed everything already

                                        Comment


                                          #21
                                          i = AddMenuEntry(i, " No Hands",&Private.nohands, 0, 1, 1);

                                          Comment


                                            #22
                                            Originally posted by n0n3 View Post
                                            another problem
                                            Code:
                                            void cMenu::InitializeMenu()
                                            {
                                            	int i = 0;
                                            
                                            	if (nohands)
                                            	{
                                            		Private.m_pEsp->nohands();
                                            	}
                                            
                                            
                                            	i = AddMenuEntry(i, "Features", &menu1, 0, 1, 1);
                                            	if(menu1==1)
                                            	{
                                            	i = AddMenuEntry(i, "Wallhack/ESP", &menu2, 0, 1, 1);
                                            	if(menu2==1)
                                            	{
                                            	i = AddMenuEntry(i, " No Hands",&nohands, 0, 1, 1);
                                            	}
                                            	i = AddMenuEntry(i, "Misc", &menu3, 0, 1, 1);
                                            	}
                                            
                                            	menuItems = i;
                                            }
                                            it says
                                            nohands unresolved external

                                            i found some explanations on google but nothing that helps in this "situtation"
                                            anyways
                                            help? :D
                                            i like how you spent all that time renameing HalFLife2 into Private, and not understand how VS ties everything together...

                                            your problem is either;
                                            -- you've not created a ' float nohands '
                                            -- or you've not thought about the consequence and renamed your base from RH public to your own "private" name...

                                            [/sarcasm]

                                            ka0s?:single fuck:
                                            Last edited by ( oO' ); 03-25-2008, 09:31 PM. Reason: the grass is greener on the other side

                                            sigpic

                                            -=[ http://kaos.99k.org ]=-

                                            czkb: yay but for now i still understand half of the half of the quarter of the half of what i must know.
                                            [email protected] (E-mail Address Not Verified) says:
                                            http://www.youtube.com/user/ka0s99k#p/f/70/iK9bhyl6B_E
                                            J says:
                                            can we please accomplish something

                                            Comment


                                              #23
                                              i should better explain the issue for you.

                                              somewhere in your program there used to be
                                              HalFLife2.m_pEsp->DrawEsp();

                                              but because you've renamed HalFLife2 into private, you've prolly missed something out.
                                              your linker error could be down to the way that the files are linked,
                                              you prolly do have a NoHands(); somewhere in the program, but its not gonna be linked into it properally

                                              the best way to fix this is to edit your header file that contains the nohands code,
                                              within most the hack that i create, i put them into cRemovals.cpp and cRemovals.h.

                                              within your header file it should look like this
                                              Code:
                                              class cRemovals
                                              {
                                              public:
                                                       void NoHands( void );
                                              };
                                              at the end of this you need to add
                                              Code:
                                              extern cRemovals gRemovals;
                                              now in your menu add the header file that you edited, and call nohands via
                                              gRemovals.

                                              as i stated, i put noHands in removals, in your hack things might be layed out differently

                                              sry for the earlyer post

                                              peace ka0s?

                                              sigpic

                                              -=[ http://kaos.99k.org ]=-

                                              czkb: yay but for now i still understand half of the half of the quarter of the half of what i must know.
                                              [email protected] (E-mail Address Not Verified) says:
                                              http://www.youtube.com/user/ka0s99k#p/f/70/iK9bhyl6B_E
                                              J says:
                                              can we please accomplish something

                                              Comment

                                              Working...
                                              X