Results 1 to 8 of 8
  1. #1
    phoenixraider's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Posts
    37
    Reputation
    10
    Thanks
    21

    [Source] Checkbox Menu by Str1k3r21 *D3D8*

    If you use my source, please give me credits for making it.
    P.S: this is my first Mouse D3D I ever made.

    Picture: https://i212.photobucke*****m/albums/c...ESTversoin.jpg
    Mine has more Features in it.
    But it would basically look like that .

    Code:
    /*
    	Project Name : Mouse GUI
    	Author       : Str1k3r21
    	Date	     : 26-03-09
    
    	Credits      : Enigma.h4x
    	Information  : This Menu was made for any D3D8 Games, but can easily be changed to D3D9.
    		       Call Menu(pDevice); in your EndScene/BeginScene for this to work.
    */
    
    bool bMenu=false; // Declare globally.
    tagPOINT Pos; // Declare globally.
    
    // Lets create some int variables so we can set our GUI position
    int MenuPosX = 15; // GUI Position X on the screen
    int MenuPosY = 30; // GUI Position Y on the screen
    
    void DrawOption (int PosX, int PosY, char Text,bool bOption, IDirect3DDevice8* pDevice) // Lets define out params.
    {
    	DrawText(Text, PosX, PosY, D3DCOLOR_ARGB(255, 255, 255, 255)); 
    	DrawRect(pDevice, PosX - 21, PosY + 1, 12, 12, D3DCOLOR_ARGB(255, 255, 255, 255));
    	
    	if (bOption) // If our selected bool is turned on
    	{
    		DrawRect(pDevice, PosX - 20, PosY + 2, 10, 10, D3DCOLOR_ARGB(255, 0, 255, 0)); // If turned on it will turn green
    	}
    	else
    	{
    		DrawRect(pDevice, PosX - 20, PosY + 2, 10, 10, D3DCOLOR_ARGB(255, 255, 0, 0)); // If off then turn red. So you know when its on/off.
    	}
    }
    
    void DrawMouse (IDirect3DDevice8* pDevice, int PosX, int PosY)
    {
            DrawRect(pDevice, PosX, PosY, 10, 10, D3DCOLOR_ARGB(255, 255, 255, 0));
    }
    
    void DrawBox (IDirect3DDevice8* pDevice,int PosX, int PosY, int Width, int Height) // Lets define out params. Param 1. Defines Postion X on our screen, Param 2. Defines Position Y on our screen. Param 3. Defines the Width of the box, Param 4. Defines the Height of the box.
    {
    	DrawRect(pDevice, PosX, PosY, Width, Height, D3DCOLOR_ARGB(255, 69, 139, 116)); // Lets draw our main box. 
    
    	// Lets draw a border shall we? :)
    	DrawRect(pDevice, PosX, PosY, Width, 1, D3DCOLOR_ARGB(255, 120, 120, 120)); // Line on the left side of the box
    	DrawRect(pDevice, PosX, PosY, 1, Height, D3DCOLOR_ARGB(255, 120, 120, 120)); // Line on the top box
    	DrawRect(pDevice, PosX + Width, PosY, 1, Height, D3DCOLOR_ARGB(255, 120, 120, 120)); // Line on the right side of the box
    	DrawRect(pDevice, PosX, PosY + Height, Width, 1, D3DCOLOR_ARGB(255, 120, 120, 120)); // Line on the bottom of the box
    }
    
    
    void Menu ( IDirect3DDevice8* pDevice )
    {
    	int PosX, PosY;
    	GetCursorPos( &Pos );
    	PosX = Pos.x;
    	PosY = Pos.y;
    	
    	if ( GetAsyncKeyState(VK_INSERT) &1 ) // If we press Insert it will turn on. When pressed again it will turn off
    		bMenu = !bMenu;
    
    	if ( !bMenu )
    		return;
    
    		// Lets write out math equation for our checkboxes to allow input :|
    	
    	if ( GetAsyncKeyState(VK_LBUTTON) &1 ) // If Left Moues button is clicked bool is on again and its off. 
    	{
    
    		if ( (Pos.x > MenuPosX + 10 ) && (Pos.x < MenuPosX + 30) && (Pos.y > MenuPosY + 10) && (Pos.y < MenuPosY + 30) ) 
    		{
    			CH_Hack = !CH_Hack;
    		}
    
    	}
    
    	DrawBox(pDevice,MenuPosX, MenuPosY, 100, 300); // Lets call our Box function as our main GUI function.
    	DrawBox(pDevice,MenuPosX, MenuPosY - 22, 100, 20); // Lets draw a title bar :p.
    
    	DrawText("iNoob Hook", MenuPosX + 20, MenuPosY - 20, D3DCOLOR_ARGB(255, 255, 255, 255)); // Lets draw some text on our title bar.
    	
    	DrawOption(MenuPosX + 30, MenuPosY + 10, "Hack", CH_Hack, pDevice); // Lets call some bools in our GUI so we can turn them on/off.
    	DrawText("[*By Str1k3r21*]", MenuPosX + 9, MenuPosY + 285, D3DCOLOR_ARGB(255,255,255,255));
    
    	DrawMouse(pDevice, PosX, PosY); // Draws the mouse by fetching the X and Y of the mouse .
    	Sleep(2); // Reduces lagg
    }
    
    
    
    // Draw Rect Function for those who don't have it //
    
    void DrawRect(IDirect3DDevice8* Unidade, int baseX, int baseY, int baseW, int baseH, D3DCOLOR Cor)
    {
    	D3DRECT BarRect = { baseX, baseY, baseX + baseW, baseY + baseH }; 
    	Unidade->Clear(1, &BarRect, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, Cor, 0,  0); 
    }
    My private D3D

    [img]https://i279.photobucke*****m/albums/kk147/crusher233/PR.png[/img]

    X-Mas Hook in Action (version 1.0)
    [YOUTUBE]XET-y-2PZig[/YOUTUBE]

  2. #2
    napalmo0's Avatar
    Join Date
    Mar 2009
    Posts
    3
    Reputation
    10
    Thanks
    0
    Which program did u use mate ?
    Thanks

  3. #3
    phoenixraider's Avatar
    Join Date
    Aug 2008
    Gender
    male
    Posts
    37
    Reputation
    10
    Thanks
    21
    Quote Originally Posted by napalmo0 View Post
    Which program did u use mate ?
    Thanks
    If it's in the C++ section, must be because I used C++ .
    :P
    My private D3D

    [img]https://i279.photobucke*****m/albums/kk147/crusher233/PR.png[/img]

    X-Mas Hook in Action (version 1.0)
    [YOUTUBE]XET-y-2PZig[/YOUTUBE]

  4. #4
    tednugent's Avatar
    Join Date
    Mar 2007
    Gender
    male
    Location
    /bin/src
    Posts
    3,592
    Reputation
    17
    Thanks
    610
    Kinda makes me miss the old days of playing WR with hacks.

  5. #5
    maximo's Avatar
    Join Date
    Aug 2008
    Posts
    88
    Reputation
    10
    Thanks
    16
    dude, wow thats very cool. I tried learning c++ loads of times. I dont understand functions parameters and I didnt wanted to go any further withut understanding it as the rest of tutorials they used it.... And BTW what is D3D?

  6. #6
    maximo's Avatar
    Join Date
    Aug 2008
    Posts
    88
    Reputation
    10
    Thanks
    16
    Ok.... call me a noob, but what exactly does this do and how do I compile it, cause i get a bunch of errors.

  7. #7
    daoudtourcoing's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    0
    wenn i compile it i have an error can u help me ?


    I have this error

    ------ Build started: Project: d3dmouse, Configuration: Debug Win32 ------
    Compiling...
    mouse.cpp
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(12) : error C2146: syntax error : missing ';' before identifier 'Pos'
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(12) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(12) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(18) : error C2061: syntax error : identifier 'IDirect3DDevice8'
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(20) : error C3861: 'DrawText': identifier not found
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(20) : error C3861: 'D3DCOLOR_ARGB': identifier not found
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(21) : error C2065: 'pDevice' : undeclared identifier
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(21) : error C3861: 'DrawRect': identifier not found
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(21) : error C3861: 'D3DCOLOR_ARGB': identifier not found
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(25) : error C2065: 'pDevice' : undeclared identifier
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(25) : error C3861: 'DrawRect': identifier not found
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(25) : error C3861: 'D3DCOLOR_ARGB': identifier not found
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(29) : error C2065: 'pDevice' : undeclared identifier
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(29) : error C3861: 'DrawRect': identifier not found
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(29) : error C3861: 'D3DCOLOR_ARGB': identifier not found
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(33) : error C2065: 'IDirect3DDevice8' : undeclared identifier
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(33) : error C2065: 'pDevice' : undeclared identifier
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(33) : error C2062: type 'int' unexpected
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(34) : error C2143: syntax error : missing ';' before '{'
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(34) : error C2447: '{' : missing function header (old-style formal list?)
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(38) : error C2065: 'IDirect3DDevice8' : undeclared identifier
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(38) : error C2065: 'pDevice' : undeclared identifier
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(38) : error C2062: type 'int' unexpected
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(39) : error C2143: syntax error : missing ';' before '{'
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(39) : error C2447: '{' : missing function header (old-style formal list?)
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(50) : error C2065: 'IDirect3DDevice8' : undeclared identifier
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(50) : error C2065: 'pDevice' : undeclared identifier
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(51) : error C2448: 'Menu' : function-style initializer appears to be a function definition
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(91) : error C2065: 'IDirect3DDevice8' : undeclared identifier
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(91) : error C2065: 'Unidade' : undeclared identifier
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(91) : error C2062: type 'int' unexpected
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(92) : error C2143: syntax error : missing ';' before '{'
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(92) : error C2447: '{' : missing function header (old-style formal list?)
    c:\users\takenint\documents\visual studio 2008\projects\d3dmouse\d3dmouse\mouse.cpp(95) : fatal error C1004: unexpected end-of-file found
    Build log was saved at "file://c:\Users\takenint\Documents\Visual Studio 2008\Projects\d3dmouse\d3dmouse\Debug\BuildLog.htm "
    d3dmouse - 34 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    Edit/Delete Message

  8. #8
    Synns's Avatar
    Join Date
    May 2007
    Gender
    male
    Posts
    5,174
    Reputation
    170
    Thanks
    2,557
    My Mood
    Bitchy
    Quote Originally Posted by tednugent View Post
    Kinda makes me miss the old days of playing WR with hacks.
    Yea dude srsly .

Similar Threads

  1. [Help] ERRO Source base menu combined
    By franpanpan in forum Combat Arms Coding Help & Discussion
    Replies: 4
    Last Post: 11-13-2010, 03:19 PM
  2. [Tutorial] Warrock Source For Menu
    By Gh0sts~l1f3 in forum WarRock Hack Source Code
    Replies: 7
    Last Post: 11-11-2010, 03:15 PM
  3. [Source]Simple menu class
    By Void in forum C++/C Programming
    Replies: 44
    Last Post: 10-04-2010, 08:21 PM
  4. [Source] Keyboard Menu 2.0
    By phoenixraider in forum C++/C Programming
    Replies: 5
    Last Post: 12-31-2009, 06:02 PM
  5. My D3D menu closes :| ! Source attached
    By Jammy122333 in forum C++/C Programming
    Replies: 1
    Last Post: 06-15-2008, 01:38 PM

Tags for this Thread