• Amused
  • Angry
  • Annoyed
  • Awesome
  • Bemused
  • Cocky
  • Cool
  • Crazy
  • Crying
  • Down
  • Drunk
  • Embarrased
  • Enraged
  • Friendly
  • Geeky
  • Godly
  • Happy
  • Hateful
  • Hungry
  • Innocent
  • Meh
  • Piratey
  • Poorly
  • Sad
  • Secret
  • Shy
  • Sneaky
  • Tired
  • Wtf
  • At Work
  • CodenzHub
  • Coding
  • Deejaying
  • Donating
  • Drinking
  • Eating
  • Editing
  • Hacking
  • Hate Mailing
  • Jamin'
  • Lagging
  • Live Streaming
  • Lurking
  • No Status
  • Pawning
  • PC Gaming
  • PS Gaming
  • Raging
  • Reversing
  • Sleeping
  • Steam Gaming
  • Trolling
  • TwitchStreamer
  • Vodka!
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Results 1 to 8 of 8
    1. #1
      Newbie
      Trollin IRL
       
      Amused
       
      Brackston's Avatar
      Join Date
      Dec 2013
      Posts
      9
      Thanks (-->)
      0
      Thanks (<--)
      1

      Direct X menu Tutorial C++

      John Kittz
      Hi everyone again. I decided to tackle the DX Menu tutorial and everything seemed successful, but I am having this issue where the menu decides to work randomly. I have been running this in the d3d9test environment. I am not sure how else to describe this in words so I made a video showing how it behaves. I am one of the users running on Win7 x64 Ultimate .

      failed at embedding =(

      here is link

      https://www.youtube.com/watch?v=43ORE2C3xzc

      nvm...looks like linking is how you embed here.
      Last edited by Brackston; 12-04-2013 at 04:42 PM.

    2. #2
      Kim Kong Trasher
      I don't have status.
       
      Raging
       
      c5's Avatar
      Join Date
      Jul 2012
      Location
      Mankei Iland
      Posts
      1,221
      Thanks (-->)
      97
      Thanks (<--)
      491
      Iirc it hooks createdevice so the dll has to be injected before createdevice gets called. I can't watch yout vid atm tho
      Direct X menu Tutorial C++

    3. #3
      Hacker
      ^.^
       
      Eating
       
      NTvalk's Avatar
      Join Date
      Jul 2013
      Location
      Your RAM
      Posts
      512
      Thanks (-->)
      176
      Thanks (<--)
      145
      We cant really help you if you dont show your source and methods you are using.

    4. #4
      Newbie
      Trollin IRL
       
      Amused
       
      Brackston's Avatar
      Join Date
      Dec 2013
      Posts
      9
      Thanks (-->)
      0
      Thanks (<--)
      1
      Thanks for the response. Here is the hacks.cpp and hacks.h that I followed along with fleep in his video.Everything else would have come from the precompiled files with the tutorial. Let's see if I can get these tags right.

      Hacks.cpp:


      #include "hacks.h";



      int MenuIndex = 0;


      D3DCOLOR fontRed = D3DCOLOR_ARGB(255, 255, 0, 0);
      D3DCOLOR fontGreen = D3DCOLOR_ARGB(255, 0, 255, 0);
      D3DCOLOR fontBlue = D3DCOLOR_ARGB(255, 0, 0, 255);
      D3DCOLOR fontWhite = D3DCOLOR_ARGB(255, 255, 255, 255);
      D3DCOLOR fontBlack = D3DCOLOR_ARGB(255, 0, 0, 0);


      void Hacks::CreateFont(IDirect3DDevice9 *d3dDevice, std::string choiceFont)
      {
      D3DXCreateFont( d3dDevice, 20, 0, FW_BOLD, 0, FALSE, DEFAULT_CHARSET,
      OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE,
      choiceFont.c_str(), &font );
      }


      void Hacks::InitializeMenuItems()
      {
      hack[WALLHACK].name = "Feature 1";
      hack[CUSTOM_CROSSHAIR].name = "Features 2";
      hack[NO_RECOIL].name = "Features 3";
      hack[UNLIM_AMMO].name = "Features 4";
      hack[AUTO_FIRE].name = "Features 5";
      hack[HIDE_MENU].name = "Hide hack [INSERT]";
      hack[HIDE_MENU].on = false; //Makes the hack show on startup
      }

      void Hacks::DrawText(LPCSTR TextToDraw, int x, int y, D3DCOLOR Colour)
      {

      RECT rct = { x - 120, y, x + 120, y + 15 };
      font->DrawText(NULL, TextToDraw, -1, &rct, DT_NOCLIP, Colour);
      }

      void Hacks::DrawMenu(IDirect3DDevice9 *d3dDevice)
      {
      if(!hack[HIDE_MENU].on)
      {
      DrawFilledRectangle( 55, 20, 200, 50, fontBlue, d3dDevice );
      DrawBorderBox(55, 20, 200, 50, 4, fontBlack, d3dDevice );
      DrawText("DX Menu TUT", 190, 30, fontWhite);


      DrawFilledRectangle( 30, 55, 250, (62*MAX_MENU_ITEMS),fontBlue, d3dDevice );
      DrawBorderBox(30, 55, 250, (62*MAX_MENU_ITEMS), 6, fontBlack, d3dDevice );

      int y = 40;
      for(int i = 0; i < MAX_MENU_ITEMS; i ++)
      {

      DrawFilledRectangle( 45, 30+y, 220, 40, hack[i].on ? fontGreen : fontRed, d3dDevice );
      DrawBorderBox(45, 30+y, 220, 40, 4, fontBlack, d3dDevice );

      if(MenuIndex == i)
      {
      DrawBorderBox(41, 26+y, 228, 48, 4, fontWhite, d3dDevice );
      }


      DrawText(hack[i].name.c_str(), 170 , 39+y, fontBlack);

      y+= 50;
      }
      DrawText("Select using arrow keys", 170, ((62*MAX_MENU_ITEMS)+7), fontWhite);
      DrawText("Turn ON/OFF [END] key", 170, ((62*MAX_MENU_ITEMS)+27), fontWhite);
      }
      }


      void Hacks::DrawFilledRectangle(int x, int y, int w, int h, D3DCOLOR color, IDirect3DDevice9* d3dDevice)
      {
      D3DRECT rec = { x, y, x + w, y + h };
      d3dDevice->Clear(1, &rec, D3DCLEAR_TARGET | D3DCLEAR_TARGET, color, 0, 0);
      }




      void Hacks::DrawBorderBox( int x, int y, int w, int h, int thickness, D3DCOLOR Colour, IDirect3DDevice9 *d3dDevice)
      {

      DrawFilledRectangle( x, y, w, thickness, Colour, d3dDevice );

      DrawFilledRectangle( x, y, thickness, h, Colour, d3dDevice );

      DrawFilledRectangle( (x + w), y, thickness, h, Colour, d3dDevice );

      DrawFilledRectangle( x, y + h, w+thickness, thickness, Colour, d3dDevice );
      }



      void Hacks::KeyboardInput()
      {
      if(GetAsyncKeyState(VK_UP)&1)
      {
      if(MenuIndex > 0)
      {
      MenuIndex--;
      }
      }

      if(GetAsyncKeyState(VK_DOWN)&1)
      {
      if(MenuIndex < MAX_MENU_ITEMS-1)
      {
      MenuIndex++;
      }
      }

      if(GetAsyncKeyState(VK_END)&1)
      {
      hack[MenuIndex].on = !hack[MenuIndex].on;

      }

      if(GetAsyncKeyState(VK_INSERT)&1)
      {

      hack[HIDE_MENU].on = !hack[HIDE_MENU].on;
      }
      }


      Hacks.h:


      #pragma once

      #include <Windows.h>
      #include "d3d9.h"
      #include <ctime>
      #include <iostream>

      #define D3DHOOK_TEXTURES
      #define MAX_MENU_ITEMS 6



      #define WALLHACK 0
      #define CUSTOM_CROSSHAIR 1
      #define NO_RECOIL 2
      #define UNLIM_AMMO 3
      #define AUTO_FIRE 4
      #define HIDE_MENU 5

      // definition for our chams

      class Hacks
      {
      public:
      int m_Stride;

      void Hacks::CreateFont(IDirect3DDevice9 *d3dDevice, std::string choiceFont);
      void Hacks::InitializeMenuItems();
      void Hacks::DrawText(LPCSTR TextToDraw, int x, int y, D3DCOLOR Colour);
      void Hacks::DrawMenu(IDirect3DDevice9 *d3dDevice);
      void Hacks::DrawFilledRectangle(int x, int y, int w, int h, D3DCOLOR color, IDirect3DDevice9* d3dDevice);
      void Hacks::DrawBorderBox( int x, int y, int w, int h, int thickness, D3DCOLOR Colour, IDirect3DDevice9 *d3dDevice);
      void Hacks::KeyboardInput();


      LPDIRECT3DTEXTURE9 texRed;
      LPDIRECT3DTEXTURE9 texGreen;


      LPDIRECT3DTEXTURE9 texBlue;
      LPDIRECT3DTEXTURE9 texWhite;


      D3DVIEWPORT9 ViewPort;


      LPD3DXFONT font;


      struct d3dMenuHack
      {
      bool on;
      std::string name;
      };

      d3dMenuHack hack[MAX_MENU_ITEMS];
      };



      Hrm. I put the tags around like how my last post was edited, but they don't seem to be working for me. Sorry for the unreadable mess.
      Last edited by Brackston; 12-04-2013 at 10:56 PM.

    5. #5
      Hacker
      ^.^
       
      Eating
       
      NTvalk's Avatar
      Join Date
      Jul 2013
      Location
      Your RAM
      Posts
      512
      Thanks (-->)
      176
      Thanks (<--)
      145
      hmm for me it looks like there is nothing wrong with your Hacks class but im not 100% sure, i personally think it has something to do with the hook.

    6. #6
      Newbie
      Trollin IRL
       
      Amused
       
      Brackston's Avatar
      Join Date
      Dec 2013
      Posts
      9
      Thanks (-->)
      0
      Thanks (<--)
      1
      Ok, thanks for the reply. I am still very new at this stuff. Only been studying c++ and game hacking for about 3 weeks now . I finished the antiRTFM C++ spoonfeed tutorials on youtube recently and followed along just fine , but a lot of the stuff on this site is still foreign language. I am gonna go hang out in this thread https://guidedhacking.com/showthread...UNIX-etc%29-10 and see what I can come up with.

      Looks like the tags do work, Just gotta refresh the page after posting

    7. Thanks NTvalk thanked for this post
    8. #7
      Global Moderator
      give me my colorz back
      FeelsBadMan
       
      Coding
       
      till0sch's Avatar
      Join Date
      Oct 2012
      Location
      Germany.
      Posts
      1,168
      Thanks (-->)
      179
      Thanks (<--)
      340
      Show us your hook, not the menu code please . Seems like you forgot something small like refonting?

      For me this menu has never worked and I just used VTable because you can inject when you want and you can hook those functions easier.

    9. #8
      Kim Kong Trasher
      I don't have status.
       
      Raging
       
      c5's Avatar
      Join Date
      Jul 2012
      Location
      Mankei Iland
      Posts
      1,221
      Thanks (-->)
      97
      Thanks (<--)
      491
      Cheats'n'Trainers
      The hook used was crap indeed, think it originated from some starter kit.

      Attach a debugger, see where it crashes.
      Direct X menu Tutorial C++

    Similar Game Hacker Threads

    1. [Help] The Mod Menu Tutorial does not work for me
      By hypexk in forum Call of Duty Cheating
      Replies: 5
      Last Post: 04-18-2016, 09:28 PM
    2. [Help] Direct X 10/11/12 SDK C++
      By LOOTPACK in forum Direct-X, OpenGL
      Replies: 8
      Last Post: 11-19-2015, 06:31 AM
    3. [Help] Direct X 11 Attaching A Menu Base *Help*
      By LOOTPACK in forum Direct-X, OpenGL
      Replies: 2
      Last Post: 11-17-2015, 12:22 PM
    4. Replies: 6
      Last Post: 01-31-2014, 07:56 AM
    5. [Help] Yet Another DX Menu tutorial question
      By itsrumsey in forum GH Tutorials Help
      Replies: 2
      Last Post: 09-22-2013, 03:46 PM

    Tags for this Thread