Results 1 to 10 of 10

Hybrid View

  1. #1
    XXkillerFin1's Avatar
    Join Date
    Nov 2012
    Gender
    male
    Location
    Finland
    Posts
    125
    Reputation
    10
    Thanks
    81
    My Mood
    Confused

    Need help in D3D Menu!

    So,I need little help in D3D Menu.

    Error on d3d9dev.cpp. #include "Hacks.h". Error:cannot open source file "Hacks.h"
    Error on d3d9dev.cpp. Hacks hacks; Error:identifier "Hacks" is undefined

    Someone help me to fix these? I really need help.

    Code:
    d3d9dev.cpp Include source:
    
    #include <iostream>
    #include <windows.h>
    #include "main.h"
    #include "d3d9.h"
    #include "d3dx9.h"
    #include <ctime>
    #include "Hacks.h"
    Hacks hacks;
    Code:
    Hacks.h source:
    
    #pragma once
    
    #include <Windows.h>
    #include "d3d9.h"
    #include <ctime> //for the clock
    #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
    
    class Hacks
    {
    public:
    	int m_Stride;
    
    	void Hacks::CreateFont(IDirect3DDevice9 *d3dDevice, std::string choiceFont);
    	void Hacks::InitializeMenuItems();
    	void Hacks::Draw_Text(LPCSTR TextToDraw, int x, int y, D3DCOLOR Colour);
    	void Hacks::DrawMenu(IDirect3DDevice9 *d3dDevice);
    	void Hacks::DrawFilledRect(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 g_ViewPort;
    
    	LPD3DXFONT m_font;
    
    	struct d3dMenuHack
    	{
    		bool on;
    		std::string name;
    	};
    
    	d3dMenuHack hack[MAX_MENU_ITEMS];
    };


    ---------- Post added at 12:14 PM ---------- Previous post was at 10:57 AM ----------

    Comments? :P

  2. #2
    ngoctanip23's Avatar
    Join Date
    May 2013
    Gender
    male
    Posts
    1
    Reputation
    10
    Thanks
    0
    Tour du lich da nang giá tốt nhất cho tất cả mọi người, cùng sẻ chia những cảm xúc vui buồn qua những chuyến đi

  3. #3
    XXkillerFin1's Avatar
    Join Date
    Nov 2012
    Gender
    male
    Location
    Finland
    Posts
    125
    Reputation
    10
    Thanks
    81
    My Mood
    Confused
    English please?

    ---------- Post added at 04:38 AM ---------- Previous post was at 04:29 AM ----------

    Code:
    #include <iostream>
    #include <windows.h>
    #include <ctime>
    #include "Hacks.h"
    #include "main.h"
    #include "d3d9.h"
    #include "d3dx9.h"
    
    Hacks hacks;
    Didn't fix the errors, I got 3 folders: Header Files,Resource Files and Source Files.

    In Header Files I got: d3d9_h(folder),d3d9.h,Hacks.h And main.h
    In d3d9_h I got: d3d9dev.h,d3d9int.h And d3d9tex.h
    In Source Files I got: d3d9_c(fodler),d3d9.cpp,Hacks.cpp,main.cpp
    In d3d9_c I got: d3d9dev.cpp,d3d9int.cpp And d3d9tex.cpp

    I think the problem is in Hacks.h but I dont really know what the problem is?

  4. #4
    Kenshin13's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    Cloud 9
    Posts
    3,470
    Reputation
    564
    Thanks
    6,172
    My Mood
    Psychedelic
    Make sure hacks.h is in the same folder as the rest and try this:

    Code:
    #include <iostream>
    #include <windows.h>
    #include <ctime>
    #include "Hacks.h"
    #include "main.h"
    #include "d3d9.h"
    #include "d3dx9.h"
    
    Hacks hacks;

  5. The Following User Says Thank You to Kenshin13 For This Useful Post:

    XXkillerFin1 (05-24-2013)

  6. #5
    Kenshin13's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    Cloud 9
    Posts
    3,470
    Reputation
    564
    Thanks
    6,172
    My Mood
    Psychedelic
    Try removing the #pragma once ?

  7. #6
    XXkillerFin1's Avatar
    Join Date
    Nov 2012
    Gender
    male
    Location
    Finland
    Posts
    125
    Reputation
    10
    Thanks
    81
    My Mood
    Confused
    I tried to remove #pragma once, But still not working :/

    I am not sure but something is wrong in:
    Code:
    class Hacks
    {
    public:
    	int m_Stride;
    
    	void Hacks::CreateFont(IDirect3DDevice9 *d3dDevice, std::string choiceFont);
    	void Hacks::InitializeMenuItems();
    	void Hacks::Draw_Text(LPCSTR TextToDraw, int x, int y, D3DCOLOR Colour);
    	void Hacks::DrawMenu(IDirect3DDevice9 *d3dDevice);
    	void Hacks::DrawFilledRect(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 g_ViewPort;
    
    	LPD3DXFONT m_font;
    
    	struct d3dMenuHack
    	{
    		bool on;
    		std::string name;
    	};
    
    	d3dMenuHack hack[MAX_MENU_ITEMS];
    };

  8. #7
    Kenshin13's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    Cloud 9
    Posts
    3,470
    Reputation
    564
    Thanks
    6,172
    My Mood
    Psychedelic
    Try instead of using the custom D3D headers, link directly to the SDK.

  9. #8
    XXkillerFin1's Avatar
    Join Date
    Nov 2012
    Gender
    male
    Location
    Finland
    Posts
    125
    Reputation
    10
    Thanks
    81
    My Mood
    Confused
    I got this error fixed,And D3D is working like a Dream.I didn't really know what I did but It worked. Thx for Reply.

  10. #9
    AeroMan's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    Hell
    Posts
    3,291
    Reputation
    189
    Thanks
    3,049
    My Mood
    Busy
    Inside the class you should not use the classname after a void
    for example: void Hacks::Item();
    Remove the class name so it becomes void Item();

  11. #10
    XXkillerFin1's Avatar
    Join Date
    Nov 2012
    Gender
    male
    Location
    Finland
    Posts
    125
    Reputation
    10
    Thanks
    81
    My Mood
    Confused
    Moderators? Close this thread please.Because this is SOLVED
    Helping newbies in coding
    Skype:aksuli21

Similar Threads

  1. [Help Request] I need help with a menu fast
    By simmo5159 in forum DayZ Help & Requests
    Replies: 3
    Last Post: 04-29-2013, 10:24 AM
  2. [Help Request] Need Help with Wiglegs Menu
    By Blachhowski in forum DayZ Help & Requests
    Replies: 3
    Last Post: 04-02-2013, 01:11 PM
  3. [HELP] Undetected D3D Menu
    By jeff00 in forum Combat Arms Coding Help & Discussion
    Replies: 2
    Last Post: 10-20-2010, 04:31 PM
  4. Need help with Admin Menu
    By Yamato in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 0
    Last Post: 10-02-2010, 04:43 AM
  5. I need help With no menu warrock hack!(teamviewer)
    By wadwad in forum C++/C Programming
    Replies: 1
    Last Post: 09-22-2009, 04:18 PM

Tags for this Thread