Thread: Hans211 base

Page 1 of 2 12 LastLast
Results 1 to 15 of 24
  1. #1
    coryster2100's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    394
    Reputation
    13
    Thanks
    1,174

    Hans211 base

    hey i was trying to test out hans menu source and i dont know what i did wrong can someone tel me what they think.

    Code:
    #include "d3dmenu.h"
    #include "Font.h"
    
    char		Mtitle[81]="";	  // Some room for a title
    int 		Mpos=0;			  // current highlighted menuitem	
    int 		Mmax=0;			  // number of menu items
    float		Mxofs =160.0f;	  // offset for option text
    float		Mysize=14.0f;	  // heigh of a menuline
    int			Mvisible=1;
    
    char		*Moptfolder[] = { "+"  , "-" };	
    char		*Moptonoff[]  = { "Off", "On"};
    
    struct {
      int  typ;		  // type of menuline, folder, item
      char *txt;	  // text to show
      char **opt;	  // array of options
      int  *var;	  // variable containing current status
      int  maxvalue;  // maximumvalue,  normally 1  gives  0=off  1=on
    } MENU[MENUMAXITEMS];
    
    
    void AddItemToMenu(char *txt, char **opt, int *var, int maxvalue, int typ)
    {
      MENU[Mmax].typ=typ;
      MENU[Mmax].txt=txt;
      MENU[Mmax].opt=opt;
      MENU[Mmax].var=var;
      MENU[Mmax].maxvalue=maxvalue;
      Mmax++;
    }
    
    void MenuShow(float x, float y,	CD3DFont *pFont)
    
    {
    	 int i, val;
      DWORD color;
      char        sFPS[20]="xxx fps";
    int        CH_DirectX      = 1;
    int        CH_Players       = 1;
    
    int        CH_Chams    = 0;
    int        CH_Boxes   = 1;
    int        CH_Skeleton = 0;
    int        CH_PlayerGlow = 0;
    int        CH_Speed  = 1;
    int        CH_Fly   = 1;
    int        CH_Sway   = 1;
    
    	void RebuildMenu(void);
    {
      strcpy(Mtitle,"== D3Dmenu by Hans211 ==");
      MenuAddItem("[DirectX]", Moptfolder, &CH_DirectX, 2, MENUFOLDER);
      if (CH_DirectX) {
          MenuAddItem("Chams"     , Moptonoff , &CH_Chams   , 3, MENUITEM);
          MenuAddItem("Boxes"   , Moptonoff , &CH_Boxes  , 2, MENUITEM);
          MenuAddItem("Skeleton" , Moptonoff , &CH_Skeleton, 2, MENUITEM);
          MenuAddItem("Player Glow" , Moptonoff , &CH_PlayerGlow, 2, MENUITEM);
      }
      MenuAddItem("[Player]", Moptfolder, &CH_Players, 2, MENUFOLDER);
      if (CH_Players) {
          MenuAddItem("Speed Hack"     , Moptonoff , &CH_Speed, 2, MENUITEM);
          MenuAddItem("Fly hack"     , Moptonoff , &CH_Fly, 2, MENUITEM);
          MenuAddItem("No Sway", Moptonoff , &CH_Sway , 2, MENUITEM);
      }
      MenuAddItem("Framerate"        , (char **)sFPS , 0,0,MENUTEXT);
    }
    
    	if (!Mvisible) return;
    
      if (Mtitle[0]) {
    	 pFont->DrawText(x, y, MCOLOR_TITLE, Mtitle);
    	  y+=Mysize;
      }
      for (i=0; i<Mmax; i++) {
    	   val=(MENU[i].var)?(*MENU[i].var):0;
    	   // determine color
           if (i==Mpos)
               color=MCOLOR_CURRENT;
           else if (MENU[i].typ==MENUFOLDER)
               color=MCOLOR_FOLDER;
           else if (MENU[i].typ==MENUTEXT)
               color=MCOLOR_TEXT;
           else
    		   color=(val)?MCOLOR_ACTIVE:MCOLOR_INACTIVE;
    
           pFont->DrawText(x, y, color,MENU[i].txt,0);
           if (MENU[i].opt) {
    		   if (MENU[i].typ==MENUTEXT)
    			   pFont->DrawTextW(x+Mxofs, y, color,(char *)MENU[i].opt,D3DFONT_RIGHT);
    		   else
    			   pFont->DrawTextW(x+Mxofs, y, color,(char *)MENU[i].opt[val],D3DFONT_RIGHT);
    	   }
           y+=Mysize;
      }
    }
    
    void MenuNav(void)
    {
      if (GetAsyncKeyState(VK_INSERT)&1) Mvisible=(!Mvisible);
      if (!Mvisible) return;
    
    	if (GetAsyncKeyState(VK_UP)&1) {
    		do {
    			Mpos--;
    			if (Mpos<0)  Mpos=Mmax-1;
    		} while (MENU[Mpos].typ==MENUTEXT);		// skip textitems
      } else if (GetAsyncKeyState(VK_DOWN)&1) {
    		do {
    			Mpos++;
    		    if (Mpos==Mmax) Mpos=0;
    		} while (MENU[Mpos].typ==MENUTEXT);		// skip textitems
      } else if (MENU[Mpos].var) {
    		int dir=0;
    		// bugfix: thx to ***-Wieter20
    		if (GetAsyncKeyState(VK_LEFT )&1 && *MENU[Mpos].var > 0                      ) dir=-1;
    		if (GetAsyncKeyState(VK_RIGHT)&1 && *MENU[Mpos].var < (MENU[Mpos].maxvalue-1)) dir=1;
    		if (dir) {
    			*MENU[Mpos].var += dir;
    			if (MENU[Mpos].typ==MENUFOLDER) Mmax=0;  // change on menufolder, force a rebuild
    		}
      }
    }

  2. #2
    juggernault5's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    .....In my Computer......
    Posts
    59
    Reputation
    10
    Thanks
    2
    My Mood
    Hot
    a lot of error lol.....
    MASTER-KILLER NEW CODER



    MPGH IS THE BEST

  3. #3
    UnOwN CoD3R's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Elmo's World!
    Posts
    296
    Reputation
    14
    Thanks
    371
    hehehehehheheheeheh

  4. #4
    d00ms33k3r's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    at a party
    Posts
    225
    Reputation
    10
    Thanks
    35
    My Mood
    Buzzed
    ....i don't code... well i know a little bit and i can even tell there's stuff wrong with that








  5. #5
    UnOwN CoD3R's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Elmo's World!
    Posts
    296
    Reputation
    14
    Thanks
    371
    Quote Originally Posted by d00ms33k3r View Post
    ....i don't code... well i know a little bit and i can even tell there's stuff wrong with that
    Don't we all? Rofl....

  6. #6
    hhhjr1's Avatar
    Join Date
    Jun 2010
    Gender
    male
    Location
    i live in your room hahahah
    Posts
    415
    Reputation
    9
    Thanks
    22
    My Mood
    Confused
    you can try help him not saming there lots of errors

  7. #7
    ^...,^'s Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    New Zealand,Auckland
    Posts
    699
    Reputation
    4
    Thanks
    89
    My Mood
    Lonely
    #include "d3dmenu.h"
    #include "Font.h"

    is that all your "#include's" Lol?

  8. #8
    Zoom's Avatar
    Join Date
    May 2009
    Gender
    male
    Location
    Your going on my 24/7 DDoS hit list.
    Posts
    8,561
    Reputation
    127
    Thanks
    5,912
    My Mood
    Happy
    Try include those.

    #include "d3dbase.h"
    #include "base.h"
    -Rest in peace leechers-

    Your PM box is 100% full.

  9. #9
    ^...,^'s Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    New Zealand,Auckland
    Posts
    699
    Reputation
    4
    Thanks
    89
    My Mood
    Lonely
    Quote Originally Posted by Zoom View Post
    Try include those.

    #include "d3dbase.h"
    #include "base.h"
    No Shit XD

  10. #10
    zmansquared's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    Kickin it at Microsoft
    Posts
    2,088
    Reputation
    36
    Thanks
    221
    My Mood
    Cheerful
    did you define your int's in menu.h?
    Need Help With Coding or Something??? MSN me
    zmansquared@hotmail.com


    I am the one and only Microsoft Fag!!!

    Quote:
    Originally Posted by Arhk
    All games should be hacked, if we don't do it someone else will. Hackers force the progress, of better programming methods.
    ~


    Take this Pic everyone!



    next-

  11. #11
    coryster2100's Avatar
    Join Date
    Jan 2010
    Gender
    male
    Posts
    394
    Reputation
    13
    Thanks
    1,174
    Quote Originally Posted by ^...,^ View Post
    #include "d3dmenu.h"
    #include "Font.h"

    is that all your "#include's" Lol?
    It is the menu.cpp noob

  12. #12
    MugNuf's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Posts
    792
    Reputation
    9
    Thanks
    160
    My Mood
    Goofy
    Uh, isn't what you posted suppose to look like:

    Code:
    #include "d3dmenu.h"
    
    char		Mtitle[81]="";	  // Some room for a title
    int 		Mpos=0;			  // current highlighted menuitem	
    int 		Mmax=0;			  // number of menu items
    int			Mxofs =160;	  // offset for option text
    int			Mysize=15;	  // heigh of a menuline
    int			Mvisible=1;
    
    // predifine some basic options
    char		*Moptfolder[]	 = { "+"  , "-" };	
    char		*Moptonoff[]	 = { "Off", "On"};
    	 RECT rect;
    	 RECT rect2;
    	 RECT rect3;
    struct {
      int  typ;		  // type of menuline, folder, item
      char *txt;	  // text to show
      char **opt;	  // array of options
      int  *var;	  // variable containing current status
      int  maxvalue;  // maximumvalue,  normally 1  gives  0=off  1=on
    } MENU[MENUMAXITEMS];
    
    
    void MenuAddItem(char *txt, char **opt, int *var, int maxvalue, int typ)
    {
      MENU[Mmax].typ=typ;
      MENU[Mmax].txt=txt;
      MENU[Mmax].opt=opt;
      MENU[Mmax].var=var;
      MENU[Mmax].maxvalue=maxvalue;
      Mmax++;
    }
    
    void MenuShow(int x, int y,	ID3DXFont *pFont)
    {
    
      int i, val;
      DWORD color;
        SetRect( &rect, x+Mxofs/2, y, x+Mxofs /2 , y );
      if (!Mvisible) return;
    
      if (Mtitle[0]) {
    	  pFont->DrawText(NULL,Mtitle,-1,&rect,DT_NOCLIP | DT_CENTER, MCOLOR_TITLE);
    
    	  y+=Mysize;
      }
      for (i=0; i<Mmax; i++) {
    	   val=(MENU[i].var)?(*MENU[i].var):0;
    	   // determine color
           if (i==Mpos)
               color=MCOLOR_CURRENT;
           else if (MENU[i].typ==MENUFOLDER)
               color=MCOLOR_FOLDER;
           else if (MENU[i].typ==MENUTEXT)
               color=MCOLOR_TEXT;
           else
    		   color=(val)?MCOLOR_ACTIVE:MCOLOR_INACTIVE;
         SetRect( &rect3, x, y, x , y );
         SetRect( &rect2, x+Mxofs, y, x+Mxofs , y );
    	   pFont->DrawText(NULL,MENU[i].txt,-1,&rect3, DT_NOCLIP,color);
           if (MENU[i].opt) {
    		   if (MENU[i].typ==MENUTEXT)
    		   	   pFont->DrawText(NULL,(char *)MENU[i].opt,-1,&rect2, DT_NOCLIP | DT_RIGHT, color);
    		   else
    			   pFont->DrawText(NULL,(char *)MENU[i].opt[val],-1,&rect2, DT_NOCLIP | DT_RIGHT, color);
    	   }
           y+=Mysize;
      }
    }
    
    void MenuNav(void)
    {
      if (GetAsyncKeyState(VK_INSERT)&1) Mvisible=(!Mvisible);
      if (!Mvisible) return;
    
      if (GetAsyncKeyState(VK_UP)&1) {
    		do {
    			Mpos--;
    			if (Mpos<0)  Mpos=Mmax-1;
    		} while (MENU[Mpos].typ==MENUTEXT);		// skip textitems
      } else if (GetAsyncKeyState(VK_DOWN)&1) {
    		do {
    			Mpos++;
    		    if (Mpos==Mmax) Mpos=0;
    		} while (MENU[Mpos].typ==MENUTEXT);		// skip textitems
      } else if (MENU[Mpos].var) {
    		int dir=0;
    		// bugfix: thx to ***-Wieter20
    		if (GetAsyncKeyState(VK_LEFT )&1 && *MENU[Mpos].var > 0                      ) dir=-1;
    		if (GetAsyncKeyState(VK_RIGHT)&1 && *MENU[Mpos].var < (MENU[Mpos].maxvalue-1)) dir=1;
    		if (dir) {
    			*MENU[Mpos].var += dir;
    			if (MENU[Mpos].typ==MENUFOLDER) Mmax=0;  // change on menufolder, force a rebuild
    		}
      }
    }
    If you want to define your menu, do it in a different .cpp. Like in "hackbase.cpp".

    Credit to Im V!rus:
    Code:
    #include <d3d9.h>
       #include <d3dx9.h>
       #pragma comment (lib, "d3d9.lib")
       #pragma comment( lib, "d3dx9.lib" )
      
       int        CH_cheats      = 1;
       int        CH_weap       = 1;
      
       int        CH_stamina    = 0;
       int        CH_fastammo   = 1;
       int        CH_fasthealth = 0;
       int        CH_fastrepair = 0;
       int        CH_fastflag   = 1;
       int        CH_nospread   = 1;
       int        CH_norecoil   = 1;
       int        CH_unlammo    = 0;
       int test =0;
       // none standard options
       char *sStamina[] = { "Off","Stealth","Full" };
       char *Ctest[] = { "GoD" };
       void RebuildMenu(void)
       {
         strcpy(Mtitle,"== D3Dmenu by Hans211 ==");
         MenuAddItem("[V!rus]", Moptfolder, &CH_cheats, 2, MENUFOLDER);
         if (CH_cheats) {
             MenuAddItem("Skill Hack"     , sStamina  , &CH_stamina   , 3, MENUITEM);
             MenuAddItem("GoD Mode"   , Moptonoff , &CH_fastammo  , 2, MENUITEM);
             MenuAddItem("Zombie Mode" , Moptonoff , &CH_fasthealth, 2, MENUITEM);
             MenuAddItem("Ghost Mode" , Moptonoff , &CH_fastrepair, 2, MENUITEM);
         }
         MenuAddItem("[Test]", Moptfolder, &CH_weap, 2, MENUFOLDER);
         if (CH_weap) {
             MenuAddItem("Test"     , Moptonoff , &CH_nospread, 2, MENUITEM);
             MenuAddItem("Test"     , Moptonoff , &CH_norecoil, 2, MENUITEM);
             MenuAddItem("Test", Moptonoff , &CH_unlammo , 2, MENUITEM);
         }
         MenuAddItem("[V!rus]"        , Ctest , &test,1,MENUFOLDER);
       }
      
       ID3DXFont* m_pFont;
       void PreReset(void)
       {
           if(m_pFont){
            if(m_pFont->Release())
                m_pFont = NULL;
           }
       }
       void Release( LPDIRECT3DDEVICE9 m_pD3Ddev)
       {
       // Look definition if u want edit it for make better text :D
         D3DXCreateFont(m_pD3Ddev, 15, 0, FW_BOLD, 0, 0, DEFAULT_CHARSET, OUT_TT_ONLY_PRECIS, PROOF_QUALITY, DEFAULT_PITCH | FF_DONTCARE, TEXT("Arials"), &m_pFont );
       }
    You can add more custom menu options, i did it in d3dmenu.h,

    Just add them below
    Code:
    extern char		*Moptfolder[];		// "+"  , "-"
    extern char		*Moptonoff[];		// "Off", "On"
    If you want a base with all of that done, and you can just edit it, PM me.

  13. #13
    zmansquared's Avatar
    Join Date
    Oct 2008
    Gender
    male
    Location
    Kickin it at Microsoft
    Posts
    2,088
    Reputation
    36
    Thanks
    221
    My Mood
    Cheerful
    you can pm me also. ive worked with this base before
    Need Help With Coding or Something??? MSN me
    zmansquared@hotmail.com


    I am the one and only Microsoft Fag!!!

    Quote:
    Originally Posted by Arhk
    All games should be hacked, if we don't do it someone else will. Hackers force the progress, of better programming methods.
    ~


    Take this Pic everyone!



    next-

  14. #14
    kody1206's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Location
    British Columbia
    Posts
    104
    Reputation
    33
    Thanks
    5
    My Mood
    Psychedelic
    Thanks ill check it out

  15. #15
    Crash's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    JAville
    Posts
    2,889
    Reputation
    163
    Thanks
    3,289
    My Mood
    Sleepy
    Quote Originally Posted by kody1206 View Post
    Thanks ill check it out
    Spammers these days

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 5
    Last Post: 08-31-2010, 08:55 AM
  2. Hans211's Base?
    By mastermods in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 10
    Last Post: 08-23-2010, 05:19 PM
  3. [Help]Finding the Hans211 base..
    By God601 in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 24
    Last Post: 06-21-2010, 11:27 PM
  4. What is wrong with Hans211 base??
    By Mr.Magicman in forum Combat Arms Hack Coding / Programming / Source Code
    Replies: 29
    Last Post: 06-15-2010, 09:38 AM
  5. Web-based game hacking..
    By Krilliam in forum General Game Hacking
    Replies: 7
    Last Post: 02-20-2006, 02:12 PM