• 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 9 of 9
    1. #1
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      -Tek's Avatar
      Join Date
      Sep 2012
      Location
      France
      Posts
      30
      Thanks (-->)
      1
      Thanks (<--)
      1

      Problem with my crosshair :(

      Silent VPN
      I used Azorbix starterkit and made a crosshair, here's the part i changed to make a crosshair :

      Variable n stuff :

      Code:
      float ScreenCenterX = 0.0f;//Horizontal Position
      float ScreenCenterY = 0.0f;//Vertical Position
      bool xhair = false;
      D3DCOLOR redt = D3DCOLOR_XRGB( 255, 0, 0 );
      In Setviewport :
      Code:
      HRESULT APIENTRY hkIDirect3DDevice9::SetViewport(CONST D3DVIEWPORT9 *pViewport) 
      {
      	ScreenCenterX = ( float )pViewport->Width / 2;
      	ScreenCenterY = ( float )pViewport->Height / 2;
      	return m_pD3Ddev->SetViewport(pViewport);
      }

      In Endscene :
      Code:
      HRESULT APIENTRY hkIDirect3DDevice9::EndScene()
      {	
      	
      if (GetAsyncKeyState (VK_INSERT)&1)
      {
      xhair = !xhair;
      }
      
      if (xhair)
      { 
      D3DRECT rec1 = {ScreenCenterX-25, ScreenCenterY, ScreenCenterX+ 25, ScreenCenterY+1};
      D3DRECT rec2 = {ScreenCenterX, ScreenCenterY-25, ScreenCenterX+ 1,ScreenCenterY+25};
      m_pD3Ddev->Clear( 1, &rec1, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), 0, 0 );//red
      m_pD3Ddev->Clear( 1, &rec2, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), 0, 0 );
      
      
      D3DRECT rec3 = {ScreenCenterX-15, ScreenCenterY, ScreenCenterX+ 15, ScreenCenterY+1};
      D3DRECT rec4 = {ScreenCenterX, ScreenCenterY-15, ScreenCenterX+ 1,ScreenCenterY+15};
      m_pD3Ddev->Clear( 1, &rec3, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 0.0, 0.0, 0.0), 0, 0 );// black
      m_pD3Ddev->Clear( 1, &rec4, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 0.0, 0.0, 0.0), 0, 0 );
      
      D3DRECT rec5 = {ScreenCenterX-3, ScreenCenterY, ScreenCenterX+ 3, ScreenCenterY+1};
      D3DRECT rec6 = {ScreenCenterX, ScreenCenterY-3, ScreenCenterX+ 1,ScreenCenterY+3};
      m_pD3Ddev->Clear( 1, &rec5, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), 0, 0 );// black
      m_pD3Ddev->Clear( 1, &rec6, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), 0, 0 );
      
      }
      	return m_pD3Ddev->EndScene();
      }

      I can inject it , but nothing is showing up, can you help me understanding what's the problem ?

    2. #2
      Coder
      Learning to hack games!
       
      Feeling Normal
       
      brinkz's Avatar
      Join Date
      Sep 2012
      Posts
      213
      Thanks (-->)
      5
      Thanks (<--)
      74
      Code:
      void GetCenter( LPDIRECT3DDEVICE9 pDevice )
      {
      	float CenterX, CenterY;
      	D3DVIEWPORT9 g_ViewPort;
      	pDevice->GetViewport(&g_ViewPort);
      	ScreenCenterX = ( float )g_ViewPort.Width / 2;
      	ScreenCenterY = ( float )g_ViewPort.Height / 2;
      }
      
      //in EndScene before drawing:
      GetCenter( m_pD3Ddev );
      if( xhair )
      ....
      Should work fine.

    3. #3
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      -Tek's Avatar
      Join Date
      Sep 2012
      Location
      France
      Posts
      30
      Thanks (-->)
      1
      Thanks (<--)
      1
      Quote Originally Posted by siM View Post
      Code:
      void GetCenter( LPDIRECT3DDEVICE9 pDevice )
      {
      	float CenterX, CenterY;
      	D3DVIEWPORT9 g_ViewPort;
      	pDevice->GetViewport(&g_ViewPort);
      	ScreenCenterX = ( float )g_ViewPort.Width / 2;
      	ScreenCenterY = ( float )g_ViewPort.Height / 2;
      }
      
      //in EndScene before drawing:
      GetCenter( m_pD3Ddev );
      if( xhair )
      ....
      Should work fine.

      I just tried it, but nothing is showing up, and i know it inject succesfully because i have a messagebox

    4. #4
      Coder
      Learning to hack games!
       
      Feeling Normal
       
      brinkz's Avatar
      Join Date
      Sep 2012
      Posts
      213
      Thanks (-->)
      5
      Thanks (<--)
      74
      Is drawing at all working or just the Viewport problem?

    5. #5
      Coder
      Learning to hack games!
       
      Feeling Normal
       
      AlexSleyore's Avatar
      Join Date
      Oct 2012
      Location
      http://fadedengine.wordpress.com/
      Posts
      101
      Thanks (-->)
      3
      Thanks (<--)
      10
      how about you put a message box here

      Code:
      if (GetAsyncKeyState (VK_INSERT)&1)
      {
      xhair = !xhair;
      MessageBoxA(NULL,"Wasnt Kidding O.o","Yo Hook Really works congrats",MB_OK);
      }

    6. #6
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      -Tek's Avatar
      Join Date
      Sep 2012
      Location
      France
      Posts
      30
      Thanks (-->)
      1
      Thanks (<--)
      1
      Yea good idea will try out when i'm in my house

    7. #7
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      -Tek's Avatar
      Join Date
      Sep 2012
      Location
      France
      Posts
      30
      Thanks (-->)
      1
      Thanks (<--)
      1
      Okay so the hook isn't working as you stated it, the messagebox isn't showing

      I used azorbix starter kit, what should i do to make a undetected hook ?

    8. #8
      Coder
      Learning to hack games!
       
      Feeling Normal
       
      AlexSleyore's Avatar
      Join Date
      Oct 2012
      Location
      http://fadedengine.wordpress.com/
      Posts
      101
      Thanks (-->)
      3
      Thanks (<--)
      10
      The best way ive found is to learn a little on mid function hooking and code caves. It all depends though on what you know, and what game your hacking.

    9. #9
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      -Tek's Avatar
      Join Date
      Sep 2012
      Location
      France
      Posts
      30
      Thanks (-->)
      1
      Thanks (<--)
      1
      Silent VPN
      I'm trying to hack the war z

    Similar Game Hacker Threads

    1. [Help] [HELP] D3D CrossHair in d3d8 ??
      By longkuteno3qb in forum Direct-X, OpenGL
      Replies: 0
      Last Post: 04-21-2016, 10:30 AM
    2. [Help] Custom crosshair
      By Asserio16 in forum Visual Basic
      Replies: 1
      Last Post: 04-08-2014, 02:23 PM
    3. GDI Drawing Crosshair
      By bzh in forum C/C++
      Replies: 10
      Last Post: 07-02-2013, 04:02 PM
    4. Crosshair
      By pogz080 in forum C/C++
      Replies: 4
      Last Post: 09-09-2012, 06:34 AM
    5. Help with creating D3D Crosshair
      By pogz080 in forum Direct-X, OpenGL
      Replies: 4
      Last Post: 09-05-2012, 06:40 AM