Solved Help D3D menu not appearing!

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

leang_97

Newbie
Full Member
Aug 1, 2013
7
192
0
I have builded the code successfully...... but when i inject to iw3mp.exe nothing appear. And yeah i oso used perx injector to try. But no luck...... Nothing in-game have showed up, it just like nothing. I ahve a window 7 32 bit ultimate

Hacks.cpp

C++:
#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 fontBlack = D3DCOLOR_ARGB(255 , 0 , 0, 0);
D3DCOLOR fontWhite = D3DCOLOR_ARGB(255, 255 , 255 , 255);


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, (LPCWSTR)choiceFont.c_str(), (LPD3DXFONT *)&Font);
}



void Hacks::InitializeMenuItems()
{
    hack[WALLHACK].name = "Wallhack and chams";
    hack[CUSTOM_CROSSHAIR].name = "Show Custom Corsshair";
    hack[NO_RECOIL].name = "No recoil";
    hack[UNLIM_AMMO].name = "Unlimitted Ammo";
    hack[AUTO_FIRE].name = "Auto Pistol";
    hack[HIDE_MENU].name = "Hide the menu items";
    hack[HIDE_MENU].on = false;
}


void Hacks::DrawTextA(LPCSTR TextToDraw, int x, int y, D3DCOLOR Color)
{
    RECT rct = { x- 120 , x + 120 , y + 15};
    Font->DrawTextA(NULL, TextToDraw, -1, &rct, DT_NOCLIP, Color);
}

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);
        DrawTextA("Game Name Here", 190, 30, fontWhite);

        DrawFilledRectangle(33, 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);
            }
            
            DrawTextA(hack[i].name.c_str(), 170, 30+y, fontBlack);
            y+50;
        }

        DrawTextA("Select using arrow keys",170, ((62*MAX_MENU_ITEMS)+7),fontBlack);
        DrawTextA("Turn ON/OFF Using [END]",170, ((62*MAX_MENU_ITEMS)+27), fontWhite);

    }
}


void Hacks::DrawFilledRectangle(int x, int y, int w, int h, D3DCOLOR color, IDirect3DDevice9 *d3dDevice)
{

    D3DRECT rct = {x, y, x + w, y + h};  
    d3dDevice->Clear(1, &rct, D3DCLEAR_TARGET | D3DCLEAR_TARGET, color, 0, 0);
}


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

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

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

    DrawFilledRectangle(x, y,w+thickness,thickness, color, 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


C++:
#pragma once

#include <Windows.h>
#include "d3d9.h"
#include <d3dx9.h>
#include <ctime>
#include <Unknwn.h>
#include <iostream>
#include <WinUser.h>

#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


class Hacks
{
public:
    int m_Stride;



    void Hacks::CreateFont(IDirect3DDevice9 *d3dDevice, std::string choiceFont);
    void Hacks::InitializeMenuItems();
    void Hacks::DrawTextA(LPCSTR TextToDraw, int x, int y, D3DCOLOR Color);
    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 color, IDirect3DDevice9 *d3dDevice);
    void Hacks::KeyboardInput();

    LPDIRECT3DTEXTURE9 texRed;
    LPDIRECT3DTEXTURE9 textGreen;

    LPDIRECT3DTEXTURE9 textBlue;
    LPDIRECT3DTEXTURE9 textWhite;

    D3DVIEWPORT9 VIewPort;

    LPD3DXFONT Font;

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

    d3dMenuHack hack[MAX_MENU_ITEMS];

};
 
Last edited:

Rake

Cesspool Admin
Administrator
Jan 21, 2014
12,074
78,998
2,371

TastyHorror

Coder
Dank Tier Donator
Nobleman
Oct 11, 2012
179
2,268
8
Here are some things that could get your current source code working:

https://guidedhacking.com/showthrea...CK-DIFFICULTY-3-10&p=7648&viewfull=1#post7648

I know I am not solving your question, but go ahead and look at this tutorial if you can not get the above working:

https://guidedhacking.com/showthread.php?4056-How-to-make-a-DirectX-Menu-C

Keep in mind, that my tutorial is different then fleeps usual videos. I do not go as in depth, and I comment my code a little more technical. Also, next time or even now use the CPP or CODE tags.
 

leang_97

Newbie
Full Member
Aug 1, 2013
7
192
0
Here are some things that could get your current source code working:

https://guidedhacking.com/showthrea...CK-DIFFICULTY-3-10&p=7648&viewfull=1#post7648

I know I am not solving your question, but go ahead and look at this tutorial if you can not get the above working:

https://guidedhacking.com/showthread.php?4056-How-to-make-a-DirectX-Menu-C

Keep in mind, that my tutorial is different then fleeps usual videos. I do not go as in depth, and I comment my code a little more technical. Also, next time or even now use the CPP or CODE tags.
I will give it a try thanks!
 

leang_97

Newbie
Full Member
Aug 1, 2013
7
192
0
Here are some things that could get your current source code working:

https://guidedhacking.com/showthrea...CK-DIFFICULTY-3-10&p=7648&viewfull=1#post7648

I know I am not solving your question, but go ahead and look at this tutorial if you can not get the above working:

https://guidedhacking.com/showthread.php?4056-How-to-make-a-DirectX-Menu-C

Keep in mind, that my tutorial is different then fleeps usual videos. I do not go as in depth, and I comment my code a little more technical. Also, next time or even now use the CPP or CODE tags.

Yeah, i got it all correct......
 

till0sch

Respected Hacker
Dank Tier VIP
Dank Tier Donator
Oct 14, 2012
1,104
12,593
51
I guess sth is wrong with the hook. Try another one, vtable e.g.
 
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