• Amused
  • Angry
  • Annoyed
  • Awesome
  • Bemused
  • Cocky
  • Cool
  • Crazy
  • Crying
  • Down
  • Drunk
  • Embarrased
  • Enraged
  • Friendly
  • Geeky
  • Godly
  • Happy
  • Hateful
  • Hungry
  • Innocent
  • Meh
  • Piratey
  • Poorly
  • Sad
  • Secret
  • Shy
  • Sneaky
  • Tired
  • Wtf
  • At Work
  • CodenzHub
  • Coding
  • Deejaying
  • Donating
  • Drinking
  • Eating
  • Editing
  • Hacking
  • Hate Mailing
  • Jamin'
  • Lagging
  • Live Streaming
  • Lurking
  • No Status
  • Pawning
  • PC Gaming
  • PS Gaming
  • Raging
  • Reversing
  • Sleeping
  • Steam Gaming
  • Trolling
  • TwitchStreamer
  • Vodka!
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Page 1 of 2 12 LastLast
    Results 1 to 10 of 12
    1. #1
      Newbie
      n00b
       
      Raging
       
      cskimmo69's Avatar
      Join Date
      Jul 2013
      Posts
      47
      Thanks (-->)
      13
      Thanks (<--)
      3

      Problem with esp boxes (GDI&Directx)

      John Kittz
      Hello i got problem with Grab's overlay for css and i need some help with it!

      I can draw boxes of enemis only if i define the boxes X and Y like in that source they are.. X = 222 and Y = 222 but they are not on enemies they are at left up corner of css window.. How to fix this and get boxes to enemies?

      Pic of the problem https://postimg.org/image/rfek9lqwr/

      I think problem is in hDirectX.cpp
      https://pastebin.com/VfPkyAad

      Grab's FULL SOURCE CODE(ONLY SOURCE NO EXES)
      https://www.uploadmb.com/dw.php?id=1383662295

      Everything is ok with fleep's GDI source but not with grab's dx.. =(

    2. #2
      Coder
      Creating UE3 x86/x64 tut
       
      Coding
       
      TastyHorror's Avatar
      Join Date
      Oct 2012
      Location
      Canada
      Posts
      184
      Thanks (-->)
      54
      Thanks (<--)
      81
      Haven't done dx9 esp yet but I suggest you debug your code at the world to screen function, or you can perhaps create many print statements displaying what certain things are, should be, and what they are at. I am sure it is a simple mistake.

    3. #3
      Newbie
      n00b
       
      Raging
       
      cskimmo69's Avatar
      Join Date
      Jul 2013
      Posts
      47
      Thanks (-->)
      13
      Thanks (<--)
      3
      Printing wont help in this case.. Offsets and netvars are ok, world to screen should be ok, drawing is ok but happens only when i define boxes X and Y positions.. How could i solve this problem?

    4. #4
      Kim Kong Trasher
      I don't have status.
       
      Raging
       
      c5's Avatar
      Join Date
      Jul 2012
      Location
      Mankei Iland
      Posts
      1,221
      Thanks (-->)
      97
      Thanks (<--)
      491
      Looks like world to screen issue judging just by the picture, shouldn't make such errors just by drawing anyways.

      Verify your w2s, probably a problem there
      Problem with esp boxes (GDI&Directx)

    5. #5
      Newbie
      n00b
       
      Raging
       
      cskimmo69's Avatar
      Join Date
      Jul 2013
      Posts
      47
      Thanks (-->)
      13
      Thanks (<--)
      3
      Quote Originally Posted by c5 View Post
      Looks like world to screen issue judging just by the picture, shouldn't make such errors just by drawing anyways.

      Verify your w2s, probably a problem there
      I dont see any problem with wts it should work but... :l

      #include "hDirectX.h"
      #include "HackProcess.h"

      IDirect3D9Ex* p_Object = 0;
      IDirect3DDevice9Ex* p_Device = 0;
      D3DPRESENT_PARAMETERS p_Params;

      ID3DXLine* p_Line;
      ID3DXFont* pFontSmall = 0;

      CHackProcess fProcess;


      int NumOfPlayers = 32;


      const DWORD Player_Base = 0x55DB34;
      const DWORD dw_mTeamOffset = 0x98;
      const DWORD dw_Health = 0x90;
      const DWORD dw_Pos = 0x25C;
      const DWORD EntityPlayer_Base = 0x56B3E4;
      const DWORD EntityLoopDistance = 0x10;
      const DWORD dw_Dormant = 0x17A;
      const DWORD dw_Lifestate = 0x8F;
      const DWORD dw_vMatrix = 0x5A5730;




      typedef struct
      {
      float flMatrix [4][4];
      }WorldToScreenMatrix_t;



      float Get3dDistance(float * myCoords, float * enemyCoords)
      {
      return sqrt(
      pow(double(enemyCoords[0] - myCoords[0]), 2.0) +
      pow(double(enemyCoords[1] - myCoords[1]), 2.0) +
      pow(double(enemyCoords[2] - myCoords[2]), 2.0));
      }



      struct MyPlayer_t
      {
      DWORD CLocalPlayer;
      int Team;
      int Health;
      WorldToScreenMatrix_t WorldToScreenMatrix;
      float Position[3];
      void ReadInformation()
      {
      // Reading CLocalPlayer Pointer to our "CLocalPlayer" DWORD.
      ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(fProcess.__dwordClient + Player_Base), &CLocalPlayer, sizeof(DWORD), 0);
      // Reading out our Team to our "Team" Varible.
      ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(CLocalPlayer + dw_mTeamOffset), &Team, sizeof(int), 0);
      // Reading out our Health to our "Health" Varible.
      ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(CLocalPlayer + dw_Health), &Health, sizeof(int), 0);
      // Reading out our Position to our "Position" Varible.
      ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(CLocalPlayer + dw_Pos), &Position, sizeof(float[3]), 0);

      ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(fProcess.__dwordEngine + dw_vMatrix), &WorldToScreenMatrix, sizeof(WorldToScreenMatrix), 0);
      }
      }MyPlayer;



      struct PlayerList_t
      {
      DWORD CBaseEntity;
      int Team;
      int Health;
      int Alive;
      int Dormant;
      float Position[3];
      char Name[39];

      void ReadInformation(int Player)
      {
      // Reading CBaseEntity Pointer to our "CBaseEntity" DWORD + Current Player in the loop. 0x10 is the CBaseEntity List Size
      //"client.dll"+00545204 //0x571A5204
      ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(fProcess.__dwordClient + EntityPlayer_Base + (Player * EntityLoopDistance)),&CBaseEntity, sizeof(DWORD), 0);
      // Reading out our Team to our "Team" Varible.
      ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(CBaseEntity + dw_mTeamOffset), &Team, sizeof(int), 0);
      // Reading out our Health to our "Health" Varible.
      ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(CBaseEntity + dw_Health), &Health, sizeof(int), 0);
      // Reading out our Position to our "Position" Varible.
      ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(CBaseEntity + dw_Pos), &Position, sizeof(float[3]), 0);

      //Alive
      ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(CBaseEntity + dw_Lifestate), &Alive, sizeof(int), 0);

      //Dormant
      ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(CBaseEntity + dw_Dormant), &Dormant, sizeof(int), 0);
      }
      }PlayerList[32];



      bool WorldToScreen(float * from, float * to)
      {
      float w = 0.0f;

      to[0] = MyPlayer.WorldToScreenMatrix.flMatrix[0][0] * from[0] + MyPlayer.WorldToScreenMatrix.flMatrix[0][1] * from[1] + MyPlayer.WorldToScreenMatrix.flMatrix[0][2] * from[2] + MyPlayer.WorldToScreenMatrix.flMatrix[0][3];
      to[1] = MyPlayer.WorldToScreenMatrix.flMatrix[1][0] * from[0] + MyPlayer.WorldToScreenMatrix.flMatrix[1][1] * from[1] + MyPlayer.WorldToScreenMatrix.flMatrix[1][2] * from[2] + MyPlayer.WorldToScreenMatrix.flMatrix[1][3];
      w = MyPlayer.WorldToScreenMatrix.flMatrix[3][0] * from[0] + MyPlayer.WorldToScreenMatrix.flMatrix[3][1] * from[1] + MyPlayer.WorldToScreenMatrix.flMatrix[3][2] * from[2] + MyPlayer.WorldToScreenMatrix.flMatrix[3][3];

      if(w < 0.01f)
      return false;

      float invw = 1.0f / w;
      to[0] *= invw;
      to[1] *= invw;

      int width = (int)(m_Rect.right - m_Rect.left);
      int height = (int)(m_Rect.bottom - m_Rect.top);

      float x = width/2;
      float y = height/2;

      x += 0.5 * to[0] * width + 0.5;
      y -= 0.5 * to[1] * height + 0.5;

      to[0] = x+ m_Rect.left;
      to[1] = y+ m_Rect.top ;

      return true;
      }



      int DirectXInit(HWND hWnd)
      {

      if(FAILED(Direct3DCreate9Ex(D3D_SDK_VERSION, &p_Object)))
      exit(1);

      ZeroMemory(&p_Params, sizeof(p_Params));
      p_Params.Windowed = TRUE;
      p_Params.SwapEffect = D3DSWAPEFFECT_DISCARD;
      p_Params.hDeviceWindow = hWnd;
      p_Params.MultiSampleQuality = D3DMULTISAMPLE_NONE;
      p_Params.BackBufferFormat = D3DFMT_A8R8G8B8 ;
      p_Params.BackBufferWidth = Width;
      p_Params.BackBufferHeight = Height;
      p_Params.EnableAutoDepthStencil = TRUE;
      p_Params.AutoDepthStencilFormat = D3DFMT_D16;

      if(FAILED(p_Object->CreateDeviceEx(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_HARDWARE_VERTEXPROCESSING, &p_Params, 0, &p_Device)))
      exit(1);

      if(!p_Line)
      D3DXCreateLine(p_Device, &p_Line);

      D3DXCreateFont(p_Device, 18, 0, 0, 0, false, DEFAULT_CHARSET, OUT_CHARACTER_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH, "Calibri", &pFontSmall);

      return 0;
      }




      void DrawESP(int x, int y, float distance)
      {
      int width = 15000/distance;
      int height = 30000/distance;
      DrawBox(x-(width/2), y-height, width, height, 1, 255, 0, 0, 255);
      }



      int Render()
      {
      p_Device->Clear(0, 0, D3DCLEAR_TARGET, 0, 1.0f, 0);
      p_Device->BeginScene();

      if(tWnd == GetForegroundWindow())
      {
      fProcess.RunProcess();
      for(int i = 0; i < NumOfPlayers; i ++)
      {
      PlayerList[i].ReadInformation(i);


      if(PlayerList[i].Health < 2)
      continue;

      if(PlayerList[i].Team == MyPlayer.Team)
      continue;

      float EnemyXY[3];

      if(WorldToScreen(PlayerList[i].Position, EnemyXY) || PlayerList[i].Team != MyPlayer.Team)
      // if(WorldToScreen(PlayerList[i].Position, EnemyXY) && PlayerList[i].Team != MyPlayer.Team)
      //if(WorldToScreen(PlayerList[i].Position, EnemyXY))
      {
      DrawESP(EnemyXY[0] - m_Rect.left, EnemyXY[1] - m_Rect.top , Get3dDistance(MyPlayer.Position, PlayerList[i].Position));
      }
      }

      }

      p_Device->EndScene();
      p_Device->PresentEx(0, 0, 0, 0, 0);
      return 0;
      }

    6. #6
      Coder
      Learning to hack games!
       
      Feeling Normal
       
      brinkz's Avatar
      Join Date
      Sep 2012
      Posts
      213
      Thanks (-->)
      5
      Thanks (<--)
      74
      Why don't you log every value you pass to the functions you use?

    7. #7
      Newbie
      n00b
       
      Raging
       
      cskimmo69's Avatar
      Join Date
      Jul 2013
      Posts
      47
      Thanks (-->)
      13
      Thanks (<--)
      3
      Quote Originally Posted by brinkz View Post
      Why don't you log every value you pass to the functions you use?
      Why would i? Im noob i dont know why should i log.. i ported the gdi one what works with same stuff, offsets, wts and those but i cant get this working with this because im stupid piece of shit!!!!!!!

    8. #8
      Kim Kong Trasher
      I don't have status.
       
      Raging
       
      c5's Avatar
      Join Date
      Jul 2012
      Location
      Mankei Iland
      Posts
      1,221
      Thanks (-->)
      97
      Thanks (<--)
      491
      Quote Originally Posted by cskimmo69 View Post
      Why would i? Im noob i dont know why should i log.. i ported the gdi one what works with same stuff, offsets, wts and those but i cant get this working with this because im stupid piece of shit!!!!!!!
      Log for the sake of learning? With that kind of attitude nobody is willing to help you, if you aren't willing to put any effort into it yourself and hope everything will be done for you...
      Problem with esp boxes (GDI&Directx)

    9. #9
      Newbie
      n00b
       
      Raging
       
      cskimmo69's Avatar
      Join Date
      Jul 2013
      Posts
      47
      Thanks (-->)
      13
      Thanks (<--)
      3
      Quote Originally Posted by c5 View Post
      Log for the sake of learning? With that kind of attitude nobody is willing to help you, if you aren't willing to put any effort into it yourself and hope everything will be done for you...
      What do you guys mean i should log? ok i log but what ? values like vmatrix or ? im tried to solve this now 2hours... tried to look if getting resolution was wrong but its ok, and distance its ok too and wts should be ok its like in gdi one but i dont know how it afffects in directx or does it matter sorry for my shitty english.

    10. #10
      Kim Kong Trasher
      I don't have status.
       
      Raging
       
      c5's Avatar
      Join Date
      Jul 2012
      Location
      Mankei Iland
      Posts
      1,221
      Thanks (-->)
      97
      Thanks (<--)
      491
      Cheats'n'Trainers
      Quote Originally Posted by cskimmo69 View Post
      What do you guys mean i should log? ok i log but what ? values like vmatrix or ? im tried to solve this now 2hours... tried to look if getting resolution was wrong but its ok, and distance its ok too and wts should be ok its like in gdi one but i dont know how it afffects in directx or does it matter sorry for my shitty english.
      Wow 2 hours. Mate in all fairness, if you want something to be done, LEARN. Don't just copy and paste and expect it to work.. If those 2 hours is the limit of your patience - give up now; some of us here spend days debugging their code..
      Problem with esp boxes (GDI&Directx)

    Page 1 of 2 12 LastLast

    Similar Game Hacker Threads

    1. [Help] ESP boxes vs viewangle
      By kuk3n in forum Hacking Help
      Replies: 5
      Last Post: 02-25-2015, 10:31 AM
    2. Replies: 10
      Last Post: 01-08-2014, 07:41 PM
    3. DirectX Render problem.
      By j3b in forum Direct-X, OpenGL
      Replies: 9
      Last Post: 11-05-2013, 03:20 PM
    4. [Help] DIRECTX MENU - Help
      By Chriko2502 in forum GH Tutorials Help
      Replies: 6
      Last Post: 08-15-2013, 02:33 PM
    5. [Help] DirectX menu
      By wooolly in forum GH Tutorials Help
      Replies: 12
      Last Post: 01-22-2013, 05:32 AM

    Tags for this Thread