hlIDirect3DDevice9 help.

Technical Discussions not Related Directly to MHS. For Example, Coding, Hex Editing, General Hacking, Etc.

Moderators: g3nuin3, SpeedWing, WhiteHat

hlIDirect3DDevice9 help.

Postby jkfoong » Thu Oct 15, 2009 9:46 pm

This is my code.

Code: Select all
HRESULT WINAPI hkIDirect3DDevice9::DrawIndexedPrimitive(D3DPRIMITIVETYPE PrimitiveType,UINT minIndex,UINT NumVertices,UINT startIndex,UINT primCount)
{
DWORD NoWallhack;
      if(GetAsyncKeyState(VK_F1)&1)
     {
               if(wallhack == false) {wallhack = true;}
               if(wallhack == true) {wallhack = false;}
      }

      if(wallhack = true && m_Stride == 32)
      {
                  m_pD3Ddev->GetRenderState(D3DRS_ZENABLE, &NoWallhack);
                  m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
                  m_pD3Ddev->SetRenderState(D3DRS_ZFUNC, D3DCMP_NEVER);
      }

            if(wallhack = false && m_Stride == 32)
      {

               m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, NoWallhack);
                m_pD3Ddev->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
      }
}


OK.
I got this error, how to fix?

Code: Select all
1>c:\documents and settings\windows xp user\desktop\d3dbase(2)\hackbase.cpp(20) : error C2653: 'hkIDirect3DDevice9' : is not a class or namespace name
I love Malaysia!
我爱马来西亚!
我愛馬來西亞!
J'adore la Malaisie!
Amo Malesia!
マレーシア大好き!
사랑 말레이시아!

Image
User avatar
jkfoong
NULL
 
Posts: 150
Joined: Mon Mar 31, 2008 3:56 pm
Location: Facing the computer

Postby troublesh00ter » Fri Oct 16, 2009 1:08 am

DirectX 9 is 'OOP' (Object oriented programming). Which means (most of) the functions are part of a class.

Therefore when defining a function in 'OOP' you also need to define to which class it belongs. You do that by preceding the function name with ClassName::. So in this case that is hkIDirect3DDevice9.

But apparently you have nowhere defined this class, that is why you get this error.


But this is not the only thing wrong with your code, have a look at this:
Code: Select all
if(wallhack = true && m_Stride == 32)
      {
                  m_pD3Ddev->GetRenderState(D3DRS_ZENABLE, &NoWallhack);
                  m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
                  m_pD3Ddev->SetRenderState(D3DRS_ZFUNC, D3DCMP_NEVER);
      }

            if(wallhack = false && m_Stride == 32)
      {

               m_pD3Ddev->SetRenderState(D3DRS_ZENABLE, NoWallhack);
                m_pD3Ddev->SetRenderState(D3DRS_ZFUNC,D3DCMP_LESSEQUAL);
      }


Something isn't right here but I'll leave it to you to figure it our first.

Also.. this part can be done handier:

Code: Select all
      if(wallhack == false) {wallhack = true;}
               if(wallhack == true) {wallhack = false;}
troublesh00ter
Sir Hacks-A-Lot
 
Posts: 30
Joined: Mon Jun 01, 2009 2:54 pm
Location: The Netherlands

Postby L. Spiro » Fri Oct 16, 2009 12:02 pm

Is this supposed to be injected or is this your own project?
If this is your own project, why do you have a wall hack in it?


L. Spiro
Our songs remind you of songs you’ve never heard.
User avatar
L. Spiro
L. Spiro
 
Posts: 3129
Joined: Mon Jul 17, 2006 10:14 pm
Location: Tokyo, Japan

Postby jkfoong » Sat Oct 17, 2009 10:45 am

It supposed to be injected.
OK now my C++ is having some problem.
It can't detect my SDK Directories.
I've already added the Lib and Include folder over the options.
I love Malaysia!
我爱马来西亚!
我愛馬來西亞!
J'adore la Malaisie!
Amo Malesia!
マレーシア大好き!
사랑 말레이시아!

Image
User avatar
jkfoong
NULL
 
Posts: 150
Joined: Mon Mar 31, 2008 3:56 pm
Location: Facing the computer

Postby jkfoong » Sat Oct 17, 2009 9:09 pm

OK Close this.
Solved.
I love Malaysia!
我爱马来西亚!
我愛馬來西亞!
J'adore la Malaisie!
Amo Malesia!
マレーシア大好き!
사랑 말레이시아!

Image
User avatar
jkfoong
NULL
 
Posts: 150
Joined: Mon Mar 31, 2008 3:56 pm
Location: Facing the computer


Return to Technical Unrelated

Who is online

Users browsing this forum: No registered users and 0 guests

cron