This site is no longer active, all members have migrated to devotedcheating.com . Thankyou
This site is no longer active, all members have migrated to devotedcheating.com . Thankyou
Would you like to react to this message? Create an account in a few clicks or log in to continue.



 
Actionhacks.netHomeLatest imagesRegisterLog in

 

 [Source] Direct3D Keyboard Menu

Go down 
3 posters
AuthorMessage
str1k3r21
General Member
General Member



Posts : 6
Reputation : 0
Join date : 2009-09-22

[Source] Direct3D Keyboard Menu Empty
PostSubject: [Source] Direct3D Keyboard Menu   [Source] Direct3D Keyboard Menu EmptyTue Sep 29, 2009 9:24 am

I don't feel like explaining but I took some old code from Cobra back in the day and made it good.
I used Floats instead of Ints as much as I could because in VS2008 Express, converting from Int to Float might lead in a memory loss.
- Enjoy

Code:
//////////////////////////////////////////////////////////////////////////
//  Title  : Direct3D Keyboard Menu                                    //
//  Author : Str1k3r21                                                //
//  Date  : 29.08.2009                                                //
//  Credit : Cobra                                                    //
//  Info  : Set the hacks on the top 'int highlight[#] = {..}        //
//            Declare your hacks as boolians and not integers.          //
//            Set the title on the top 'TCHAR* MenuTitle = L" ... ";'  //
//            The menu's, X & Y are declared in 'DrawMenu'              //
//            Call 'SetHighlights(#);' replace # with number of hacks  //
//            Read the parameters on 'AddItem' and carry on            //
//            Call 'DrawMenu' where ever you initialise your fonts      //
//            Use Insert key to Show/Hide everything in 'CH_Menu'      //
//            Please put my name in the credits.                        //
//////////////////////////////////////////////////////////////////////////

void AddItem( TCHAR* string2, bool hack, int i );
void SetHighlights(int menusize);

TCHAR* MenuTitle = L"  DirtySecret"; // The Actual Title

struct positions{
   float x;
   float y;
}Menu;

int highlight[5] = {1,0,0,0,0};

bool CH_Menu   = false;
bool CH_Chams   = false;
bool CH_Cross   = false;
bool CH_Wallhack= false;
bool CH_Wwalls   = false;
bool CH_MoveMenu= false;

void DrawMenu(LPDIRECT3DDEVICE8 pDevice)
{
   Menu.x = 10;
   Menu.y = 70;

if (GetAsyncKeyState(VK_INSERT)&1)
{
   CH_Menu = !CH_Menu;
}

if (CH_Menu)
{
   // How Many Hacks //
   SetHighlights(5);

   // Menu Background + Border //
   DrawTransBox(pDevice, Menu.x, Menu.y - 10, 100, 100, 0x30000000);
   DrawTransBox(pDevice, Menu.x, Menu.y - 10, 100, 20, 2*0x30000000);
   DrawTransBox(pDevice, Menu.x - 3, Menu.y - 10, 3, 100, 2*0x30000000);
   DrawTransBox(pDevice, Menu.x + 100, Menu.y - 10, 3, 100, 2*0x30000000);
   DrawTransBox(pDevice, Menu.x - 3, Menu.y + 100 - 10, 106, 3, 2*0x30000000);

   // Menu Title //
   Font12->DrawTextW(Menu.x, Menu.y - 10, TITLE, MenuTitle, D3DFONT_SHADOW);

   // Menu Items //
   AddItem(L"Chams",   CH_Chams,    1 );
   AddItem(L"Crosshair",   CH_Cross,    2 );
   AddItem(L"Wallhack",   CH_Wallhack,    3 );
   AddItem(L"White Walls", CH_Wwalls,    4 );
   AddItem(L"Move Menu",   CH_MoveMenu,    5 );

   // Meny Items Activation/De-activation //
   if(highlight[1] == 1 && (GetAsyncKeyState(VK_RIGHT)&1)) CH_Chams    = !CH_Chams;
   if(highlight[2] == 1 && (GetAsyncKeyState(VK_RIGHT)&1)) CH_Cross    = !CH_Cross;
   if(highlight[3] == 1 && (GetAsyncKeyState(VK_RIGHT)&1)) CH_Wallhack  = !CH_Wallhack;
   if(highlight[4] == 1 && (GetAsyncKeyState(VK_RIGHT)&1)) CH_Wwalls    = !CH_Wwalls;
   if(highlight[5] == 1 && (GetAsyncKeyState(VK_RIGHT)&1)) CH_MoveMenu  = !CH_MoveMenu;
}
}


void AddItem( TCHAR* string2, bool hack, int i )
{
float Equation = i * 15;
float x = Menu.x + 5;
float xs = Menu.x + 88;
float y = Menu.y + Equation;

if(highlight[i]==1)
Font8->DrawTextW( x, y, D3DCOLOR_XRGB(158,151,151), string2, NULL );
else
Font8->DrawTextW( x, y, D3DCOLOR_XRGB(255,255,255), string2, NULL );

if(hack){
if(highlight[i]==1)
Font8->DrawTextW( xs, y, D3DCOLOR_XRGB(158,151,151), L"1", NULL );
else
Font8->DrawTextW( xs, y, D3DCOLOR_XRGB(255,255,255), L"1", NULL );}
else if(!hack){
if(highlight[i]==1)
Font8->DrawTextW( xs, y, D3DCOLOR_XRGB(158,151,151), L"0", NULL );
else
Font8->DrawTextW( xs, y, D3DCOLOR_XRGB(255,255,255), L"0", NULL );}

}

void SetHighlights(int menusize)
{
if(GetAsyncKeyState(VK_UP)&1)
{
   for(int i=0; i < menusize+1; i++)
   {
      if (highlight[i] == 1)
      {
         int a = i-1;

         if(a < 0)
         break;

      else
      {
         highlight[a]=1;
         highlight[i]=0;
         break;
      }
      }
   }
}

if(GetAsyncKeyState(VK_DOWN)&1)
{
   for(int i=0; i < menusize+2; i++)
   {
      if (highlight[i] == 1)
      {
         int a = i+1;

         if(a > menusize)
         break;

      else
      {
         highlight[a]=1;
         highlight[i]=0;
         break;
      }
      }
   }
}
}
Back to top Go down
Flyindingo
Admin
Admin
Flyindingo


Posts : 160
Reputation : 8
Join date : 2009-09-19

[Source] Direct3D Keyboard Menu Empty
PostSubject: Re: [Source] Direct3D Keyboard Menu   [Source] Direct3D Keyboard Menu EmptyTue Sep 29, 2009 9:44 am

mmm SEXY
Back to top Go down
http://www.ActionHacks.net
str1k3r21
General Member
General Member



Posts : 6
Reputation : 0
Join date : 2009-09-22

[Source] Direct3D Keyboard Menu Empty
PostSubject: Re: [Source] Direct3D Keyboard Menu   [Source] Direct3D Keyboard Menu EmptyWed Sep 30, 2009 6:32 am

Flyindingo wrote:
mmm SEXY

I know ^^
Back to top Go down
Rexgr
Coder
Rexgr


Posts : 57
Reputation : 0
Join date : 2009-09-19
Location : New Zealand

[Source] Direct3D Keyboard Menu Empty
PostSubject: Re: [Source] Direct3D Keyboard Menu   [Source] Direct3D Keyboard Menu EmptyWed Sep 30, 2009 2:14 pm

Looks pretty good from what I saw.
Just tired and can't read the whole thing today. I will 2moro lol
Back to top Go down
Http://Rexgr.net
Sponsored content





[Source] Direct3D Keyboard Menu Empty
PostSubject: Re: [Source] Direct3D Keyboard Menu   [Source] Direct3D Keyboard Menu Empty

Back to top Go down
 
[Source] Direct3D Keyboard Menu
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
 :: Public Section: Coding :: D3D :: Source Codes-
Jump to: