Solved Menu ON | OFF help (Fleep Source)

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

waked war

Newbie
Full Member
Oct 6, 2013
12
182
0
Hello,

I finally got a cross hair to work but it will not start turned off.
As well it WILL NOT turn off if I select it.

View attachment 2055

Most of this is in the d3d9dev.cpp

GLOBAL:

C++:
#include <iostream>
#include <windows.h>
#include "main.h"
#include "d3d9.h"
#include <ctime> //for the clock
#include "Hacks.h"
Hacks hacks;

// FOR CROSSHAIR -- GLOBAL-----------------
float ScreenCenterX = 0.0f;
float ScreenCenterY = 0.0f;
D3DCOLOR redt = D3DCOLOR_XRGB( 255, 0, 0 );
//-----------------------------------------
END SCENE: For the original coding I had to put " == " or i would get Errors

C++:
HRESULT APIENTRY hkIDirect3DDevice9::EndScene()
{
	hacks.KeyBoardInput();
	hacks.DrawMenu(m_pD3Ddev);
			// ON | OFF?
	hacks.hack[CROSSHAIR].on; // CROSSHAIR --------------------------------------------
	{
	if (CROSSHAIR == CROSSHAIR)
{   
   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();
}
}

ORIGINAL: Crosshair code

C++:
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};  
   psyDevice->Clear( 1, &rec1, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), 0,  0 );//red
   psyDevice->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};  
   psyDevice->Clear( 1, &rec3, D3DCLEAR_TARGET, D3DXCOLOR(0.0, 0.0, 0.0, 0.0), 0,  0 );// black
   psyDevice->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};  
   psyDevice->Clear( 1, &rec5, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), 0,  0 );// black
   psyDevice->Clear( 1, &rec6, D3DCLEAR_TARGET, D3DXCOLOR(1.0, 0.0, 0.0, 1.0), 0,  0 );

}
Hacks.h @ End of Header

C++:
	struct Fall_Options
	{
		bool crosshair;
	};

Hacks.cpp | HotKeys:


C++:
void Hacks::KeyBoardInput()
{
	//      SELECTION UP+DOWN
	if(GetAsyncKeyState(VK_UP)&1)
	{
		if(MenuIndex > 0)
		{
			MenuIndex--;
		}
	}

		if(GetAsyncKeyState(VK_DOWN)&1)
		{
			if(MenuIndex < MAX_MENU_ITEMS-1)
			{
			MenuIndex++;
			}
		}
		//     HIDE+SHOW MENU | Enable hack
		if(GetAsyncKeyState(VK_RIGHT)&1)
		{
			hack[MenuIndex].on = !hack[MenuIndex].on;
			if(MenuIndex == CROSSHAIR);
		}

		if(GetAsyncKeyState(VK_LEFT)&1)
		{
			hack[MenuIndex].on = !hack[MenuIndex].on;
			if(MenuIndex == CROSSHAIR);//////////////////////////////
		}

		if(GetAsyncKeyState(VK_INSERT)&1)
		{
			hack[HIDE_MENU].on = !hack[HIDE_MENU].on;
		}
}
Virus Scan 1
Virus Scan 2
Fleeps Source edited by me:
 
Last edited:

till0sch

Respected Hacker
Dank Tier VIP
Dank Tier Donator
Oct 14, 2012
1,104
12,593
51
if (CROSSHAIR == CROSSHAIR)

This makes no sense because crosshair will obviously always be crosshair. I think

if (hacks.hack[CROSSHAIR].on)

Makes more sense.
 
Last edited:

NTvalk

Hacker
Meme Tier VIP
Jul 6, 2013
499
3,108
8
C++:
if (GetAsyncKeyState (VK_INSERT)&1)
{
xhair = !xhair;
}
maybe try xhair = NULL?
 

waked war

Newbie
Full Member
Oct 6, 2013
12
182
0
if (CROSSHAIR == CROSSHAIR)

This makes no sense because crosshair will obviously always be crosshair. I think

if (hacks.hack[CROSSHAIR].on)

Makes more sense.
thanks man it worked :) ,

Its the simplest things, I guess I didn't try if (hacks.hack[CROSSHAIR].on) in the EndScene I was kinda worried more about the hotkeys in hacks.cpp

also if (CROSSHAIR == CROSSHAIR) would always be on but the crosshair was always on even if this was different but thanks a bunch
 
Last edited:
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Similar threads

Community Mods