Results 1 to 8 of 8
  1. #1
    hanyali2012's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Location
    Crossfire
    Posts
    556
    Reputation
    14
    Thanks
    3,391
    My Mood
    Happy

    Lightbulb Plzz Help Me I Get Error When I Make A D3D Menu ? Look !

    Hey All Look At This Error ?? What Can I Do I Have DXSDK_Jun10 What Is This ?

    See
    dllmain.cpp(4): fatal error C1083: Cannot open include file: 'd3dx9.h': No such file or directory
    This Is The Code I Use It
    Code:
    #include <windows.h>
    #include <stdio.h>
    #include <d3d9.h>
    #include <d3dx9.h>
    
    #pragma comment(lib, "d3d9.lib")
    #pragma comment(lib, "d3dx9.lib")
    
    #define PresentEngine 0x004C41AF
    DWORD retPresentEngine = ( PresentEngine + 0x5 );
    
    #define Red     D3DCOLOR_ARGB( 255, 255, 255, 000 )
    #define Green   D3DCOLOR_ARGB( 255, 000, 255, 000 )
    #define Blue    D3DCOLOR_ARGB( 255, 000, 000, 255 )
    #define Yellow  D3DCOLOR_ARGB( 255, 255, 255, 000 )
    #define Black   D3DCOLOR_ARGB( 255, 000, 000, 000 )
    
    typedef struct{
    	int index;
    	char * title;
    	int *hack;
    	int hackmaxval;
    	int hacktype;
    	DWORD HCOLOR;
    }ITEM;
    
    int hackcount;
    int selector;
    int x,y,w,h;
    DWORD COLOR;
    
    ITEM HACKITEM[99];
    char hackrval[256];
    
    int xFontOffSet = 15;
    int hackopt1;
    int MenuHeight = 10;
    int show = 0;
    int hack1, hack2, hack3;
    
    LPDIRECT3DDEVICE9 pDevice;
    LPD3DXFONT Font;
    
    VOID StartFont( LPDIRECT3DDEVICE9 pDevice )
    {
        if( Font )
        {
            Font->Release();
            Font = NULL;
        }
    
        if( !Font )
        {
            D3DXCreateFont( pDevice,
                            14,
                            0,
                            FW_BOLD,
                            1,
                            0,
                            DEFAULT_CHARSET,
                            OUT_DEFAULT_PRECIS,
                            DEFAULT_QUALITY,
                            DEFAULT_PITCH | FF_DONTCARE,
                            "Arial",
                            &Font );
        }
    }
    
    VOID WriteText(char pString[], INT x, INT y, DWORD color )
    {    
        RECT rect;
        SetRect( &rect, x, y, x, y );
        Font->DrawText( NULL, pString, -1, &rect, DT_NOCLIP | DT_LEFT, color );
    }
    
    void CreateItem(int index, char * title, int *hack, int hackmaxval,int hacktype)
    {
    	hackcount++;
    	HACKITEM[hackcount].index = index;
    	HACKITEM[hackcount].hack = hack;
    	HACKITEM[hackcount].hackmaxval = hackmaxval;
    	HACKITEM[hackcount].hacktype = hacktype;
    	WriteText(title, xFontOffSet, index*15,HACKITEM[hackcount].HCOLOR); //If you want to move the menu opts down do something like this (index*15)+20 and to move it left or right just add/subtract from font offset.
    }
    
    void RenderMenu()
    {
    	if(GetAsyncKeyState(VK_DOWN)&1) 
    			selector++;
    
    	if(GetAsyncKeyState(VK_UP)&1)
    		if(selector > 1)
    			selector--;
    
    	if (GetAsyncKeyState(VK_RIGHT)<0)
    	{
    		for(int i=0;i < (hackcount+1);i++)
    		{
               if(selector == HACKITEM[i].index)
    		   {
    			   if(*HACKITEM[i].hack < HACKITEM[i].hackmaxval)
    					*HACKITEM[i].hack += 1;
    		   }
    		}
    	}
    
    	if (GetAsyncKeyState(VK_LEFT)<0)
    	{
    		for(int i=0;i < (hackcount+1);i++)
    		{
               if(selector == HACKITEM[i].index)
    		   {
    			   *HACKITEM[i].hack = 0;
    			   Sleep(20);
    		   }
    		}
    	}
    	
    	for(int i=0;i < (hackcount+1);i++)
    	{
    		if(selector == HACKITEM[i].index)
    			HACKITEM[i].HCOLOR = Green;
    		else
    			HACKITEM[i].HCOLOR = Red;
    	}
    
    	for(int i=1; i<(hackcount+1); i++)
    	{
    		if(HACKITEM[i].hacktype == 0)
    		{
    			if(*HACKITEM[i].hack == 1)  //to move the opts down do something like this (HACKITEM[i].index*15)+20 
    				WriteText("On", xFontOffSet+100, HACKITEM[i].index*15,Yellow);
    			else 
    				WriteText("Off", xFontOffSet+100, HACKITEM[i].index*15,Red);
    		}
    	}
    
    	for(int i=1; i<(hackcount+1); i++)
    	{
    		if(HACKITEM[i].hackmaxval >1 && HACKITEM[i].hacktype == 1)
    		{
    			sprintf_s(hackrval, "%i", *HACKITEM[i].hack);
    			WriteText(hackrval, xFontOffSet+100, HACKITEM[i].index*15,Red);
    		}
    	}
    
    	if(selector < 1)
    		selector = 1;
    
    	if(selector > hackcount)
    		selector = 1;
    
    	hackcount = 0;
    }
    
    void BuildMenu(char * menuname, int x, int y, int h, int w, DWORD TITLECOL, DWORD BACKCOLOR, DWORD BORDERCOLOR, LPDIRECT3DDEVICE9 pDevice)
    {
    	if(GetAsyncKeyState(VK_INSERT)&1) show=(!show);
    	
    	if(!show) 
    	{
    		WriteText(menuname, 5, 2, TITLECOL);
    		return;
    	}
    
    	WriteText(menuname, x+10, y+2, TITLECOL);
    	
    	CreateItem(1,"Hack 1", &hack1, 1, 0);
    	CreateItem(2,"Hack 2", &hack2, 1, 0); 
    	CreateItem(3,"Hack 3", &hack3, 1, 0);
    
    	RenderMenu();
    }
    
    /*void MemoryHackHere()
    {
    	//load modules & continue with hacks
    
    	if(hack1)
    	{
    
    	}
    
    	//do not put sleep()
    }
    */
    
    __declspec( naked ) HRESULT WINAPI PresentMidfunction( )
    {
        static LPDIRECT3DDEVICE9 pDevice;
    
        __asm
        {
            MOV ECX, DWORD PTR DS:[EAX]
            MOV EDX, DWORD PTR DS:[ECX + 0x44]
            MOV DWORD PTR DS:[pDevice], EAX
            PUSH 0
            PUSHAD
        }
    
    	//================================================================================== font
        StartFont( pDevice );
    
    	//================================================================================== menu
    	BuildMenu("Avene D3D Menu Crossfire 6/9/2012",0,0,180,200,Red,Black,Green,pDevice);
        
    	//================================================================================== hack
    	//MemoryHackHere();
    
        __asm
        {
            POPAD
            JMP retPresentEngine
        }
    }
    
    VOID *DetourCreate( BYTE *src, CONST BYTE *dst, CONST INT len )
    {
        BYTE *jmp =( BYTE * ) malloc( len + 5 );
        DWORD dwBack;
    
        VirtualProtect( src, len, PAGE_READWRITE, &dwBack );
        memcpy( jmp, src, len );    
        jmp += len;
        jmp[0] = 0xE9;
        *( DWORD * )( jmp + 1 ) = ( DWORD )( src + len - jmp ) - 5;
    
        src[0] = 0xE9;
        *( DWORD * )( src + 1 ) = ( DWORD )( dst - src ) - 5;
        for( INT i = 5; i < len; i++ )
            src[i] = 0x90;
        VirtualProtect( src, len, dwBack, &dwBack );
    
        return( jmp - len );
    }
    
    DWORD WINAPI StartRoutine( LPVOID )
    {
        while( TRUE )
        {
            if( memcmp( ( VOID * )PresentEngine, ( VOID * )( PBYTE )"\x8B\x51", 2 ) == 0 )
            {
                Sleep( 100 );
                DetourCreate( ( PBYTE )PresentEngine, ( PBYTE )PresentMidfunction, 5 );
            }
            Sleep( 50 );
        }
     
        return 0;
    }
    
    BOOL WINAPI DllMain( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
    { 
        if( dwReason == DLL_PROCESS_ATTACH )
        {
            DisableThreadLibraryCalls( hDll );
            //MessageBox( 0, "Avene D3D Menu", "Crossfire", 0 );
            CreateThread( 0, 0, (LPTHREAD_START_ROUTINE)StartRoutine, 0, 0, 0 );
        }
     
        return TRUE;
    }
    In This Theard : https://www.mpgh.net/forum/242-crossf...-9-2012-a.html

    Pic ::


  2. #2
    justinsswagga's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    49
    Reputation
    10
    Thanks
    148
    My Mood
    Confused
    You have to download the direct X sdk, here is the link.
    Download: DirectX SDK - (June 2010) - Microsoft Download Center - Download Details
    Then go to project properties, and include the sdk in "Includes" , and "Lib".

  3. #3
    hanyali2012's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Location
    Crossfire
    Posts
    556
    Reputation
    14
    Thanks
    3,391
    My Mood
    Happy
    But How To include the sdk in "Includes" , and "Lib". Sorry I Am New ?

    ---------- Post added at 06:31 PM ---------- Previous post was at 05:26 PM ----------

    Plz Any Buddy Help Me Where Is The Coders ?

  4. #4
    loadgamers4's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Posts
    18
    Reputation
    10
    Thanks
    0
    go to project <properties <vc + + directories <include directories <edit <then i paste to include & lib

  5. #5
    hanyali2012's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Location
    Crossfire
    Posts
    556
    Reputation
    14
    Thanks
    3,391
    My Mood
    Happy
    Plz Any 1 Explaine It To Me With A Photos ?

  6. #6
    justinsswagga's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Posts
    49
    Reputation
    10
    Thanks
    148
    My Mood
    Confused

  7. #7
    hanyali2012's Avatar
    Join Date
    Jul 2012
    Gender
    male
    Location
    Crossfire
    Posts
    556
    Reputation
    14
    Thanks
    3,391
    My Mood
    Happy
    Thx Man But Is That Code Working ?

  8. #8
    Flengo's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    /admincp/banning.php
    Posts
    20,591
    Reputation
    5180
    Thanks
    14,178
    My Mood
    Inspired
    Quote Originally Posted by hanyali2012 View Post
    Thx Man But Is That Code Working ?
    His thread is correct.

    Try compiling your source after following that thread and test your hack.
    I Read All Of My PM's & VM's
    If you need help with anything, just let me know.

     


     
    VM | PM | IM
    Staff Administrator Since 10.13.2019
    Publicist Since 04.04.2015
    Middleman Since 04.14.2014
    Global Moderator Since 08.01.2013
    Premium Since 05.29.2013

    Minion+ Since 04.18.2013

    Combat Arms Minion Since 12.26.2012
    Contributor Since 11.16.2012
    Member Since 05.11.2010


Similar Threads

  1. [Solved] Error when I make base
    By SteamAss in forum CrossFire Help
    Replies: 8
    Last Post: 11-05-2011, 01:41 AM
  2. [HELP] Can make a d3d menu base with VB?
    By xSniperAngel in forum Visual Basic Programming
    Replies: 1
    Last Post: 02-15-2011, 11:37 AM
  3. [Help] CA Crashed after 3 min. when i used my d3d menu
    By Houston in forum Combat Arms EU Hack Coding/Source Code
    Replies: 3
    Last Post: 01-26-2011, 02:14 AM
  4. Help me with this error when compiling
    By Beatz in forum Combat Arms Help
    Replies: 3
    Last Post: 07-09-2010, 01:36 AM
  5. I keep getting error when opening hack[HELP!!!!!!]
    By Cagamer in forum Combat Arms Hacks & Cheats
    Replies: 18
    Last Post: 12-18-2008, 09:19 PM