• 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
  • Results 1 to 1 of 1
    1. #1
      Coder
      Learning to hack games!
       
      Feeling Normal
       
      kaz's Avatar
      Join Date
      Apr 2013
      Posts
      166
      Thanks (-->)
      41
      Thanks (<--)
      49

      Alternate World to screen

      John Kittz
      I made a css cheat out of boredom, I know I will never test this online because the new vac which I didn't read shit about sounds intimidating.


      decided to give it away to everyone.


      -------What you need for this to work-----------
      -Aimbot angles(the value you would write view angle to aim directly at them)
      -Current view angles (the current view angle)
      -distance (to resize the ESP box to match around him perfectly)
      -Game window Resolution
      -Game Field of View (FOV)
      -Enemy team is not needed; if you just put 1337 in for the value when you use the function it would aim at teammates though
      ------------------------------------------


      GLOBAL Variables:
      //I didn't rpm these and since I use one resolution (1600,900) I just winged it on these two values
      //btw converting int to float could go better than this
      int FOVY = 80;
      int FOVX = 115;

      bool DrawShit(float AimbotAngle[3],float CurrentAngle[3],float distance,int ResolutionX,int ResolutionY,float FOVX,float FOVY,int team)
      {
      int tdistance = 18000/distance;
      float Ydif =AimbotAngle[0] - CurrentAngle[0];
      float Xdif =AimbotAngle[1] - CurrentAngle[1];
      float dx = ResolutionX/FOVX;
      float dy = ResolutionY/FOVY;
      Xdif += FOVX/2;
      Ydif += FOVY/2;
      int XPos = Xdif*dx;
      int YPos = Ydif*dy;
      XPos = ResolutionX - XPos;
      DrawESPBox(XPos-(tdistance/2),YPos,tdistance,tdistance,255,0,0); //void DrawESPBox(int x,int y,int width,int height,int r,int g,int b)
      if(MYTeam == team) //MYTeam is a global variable which I read my player's team number to(so I dont aimbot teammates but have them on the ESP)
      return false;
      POINT c;
      c.x = ResolutionX/2;
      c.y = ResolutionY/2;
      int max = 50; //MAX FOV for mouse aimbot
      if(c.x - XPos > -max&&c.x - XPos <max &&c.y - YPos > -max&&c.y - YPos <max&&GetAsyncKeyState(0x02))
      {
      SetCursorPos(XPos + Window.left,YPos+Window.top); //Window is a predefined rect of CSS
      return true;
      }
      return false;
      }





      And here; I made an example hack using the template provided by Fleep(credits to him)

      Empty C++ Project
      ------HeaderFiles
      ------------HP.h
      ------------Offsets.h
      ------SourceFiles
      ------------main.cpp

      I don't care my code looks ugly
      I code on the fly.


      HP.h
      to avoid "YOU CAN ONLY HAVE 15000 CHARS PER POST"
      https://pastebin.com/8TAQ1BQK


      Offsets.h

      #include <Windows.h>
      #include <iostream>

      const DWORD PlayerBase = 0x57E590;
      const DWORD EntityBase = 0x54F22C;
      const DWORD dwHealth = 0x90;
      const DWORD dwTeam = 0x98; //3 = ct // 2 = t // 1 =spec
      const DWORD dwPos = 0x25C;//0x25C;//274
      const DWORD LoopDist = 0x10;
      const DWORD dwViewAng = 0x4629B4;//engine
      const DWORD dwFlags = 0x34C;
      const DWORD dwBone = 0x570;
      const DWORD dwDorm = 0x17A;
      const DWORD Punch = 0x545918;
      const DWORD CrosshairID1 = 0x14;
      const DWORD CrosshairID2 = 0x8;
      const DWORD CrosshairID = 0x30;



      main.cpp

      #include "HP.h"
      #include "Offsets.h"
      #include <iostream>
      #include <Windows.h>
      #include <sstream>
      #include <math.h>
      #include <vector>
      #include <algorithm>
      CHackProcess fProcess;
      using namespace std;
      int NumOfPlayers = 16;
      #define PI 3.14159265
      #define F6_Key 0x75
      #define RIGHT_MOUSE 0x02
      int aim = 0;
      int FOVY = 80;// you can change these to your preference
      int FOVX = 115; // you can change these to your preference
      bool TriggerBot = false;
      bool AimBot = true;
      POINT Cursor;
      //Drawing declaring
      COLORREF good;
      COLORREF bad;
      RECT m_Rect;
      HDC HDC_Desktop;
      HBRUSH EnemyBrush;
      HBRUSH GreenBrush;
      HBRUSH TeamBrush;
      HFONT Font;
      HWND TargetWnd;
      HWND Handle;
      DWORD DwProcId;
      COLORREF SnapLineCOLOR;
      COLORREF TextCOLOR;

      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));

      }

      void SetupDrawing(HDC hDesktop, HWND handle)
      {
      HDC_Desktop =hDesktop;
      Handle = handle;
      EnemyBrush = CreateSolidBrush(RGB(255, 0, 0));
      TeamBrush = CreateSolidBrush(RGB(0, 0, 255));
      GreenBrush = CreateSolidBrush(RGB(127, 255, 127));
      good = RGB(0, 255, 0);
      bad = RGB(255, 0, 0);
      }

      struct MyPlayer_t
      {
      DWORD CLocalPlayer;
      int Team;
      int Health;
      int CHID;
      DWORD chid1;
      DWORD chid2;
      float Position[3];
      float CurrentAng[3];
      int punch;
      int Flags;
      bool Target;
      void ReadInformation()
      {
      Target = false;
      ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(fProcess.__dwordClient + PlayerBase), &CLocalPlayer, sizeof(DWORD), 0);
      ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(fProcess.__dwordServer + Punch), &punch, sizeof(int), 0);
      ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(CLocalPlayer + CrosshairID1), &chid1, sizeof(DWORD), 0);
      ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(chid1 + CrosshairID2), &chid2, sizeof(DWORD), 0);
      ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(chid2 + CrosshairID), &CHID, sizeof(int), 0);
      ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(CLocalPlayer + dwHealth), &Health, sizeof(int), 0);
      ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(CLocalPlayer + dwTeam), &Team, sizeof(int), 0);
      ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(CLocalPlayer + dwPos), &Position, sizeof(float[3]), 0);
      ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(CLocalPlayer + dwFlags), &Flags, sizeof(int), 0);
      ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(fProcess.__dwordEngine + dwViewAng), &CurrentAng, sizeof(float[3]), 0);
      punch*=3;
      }
      }MyPlayer;
      struct PlayerList_t
      {
      DWORD CLocalPlayer;
      int Team;
      int Health;
      int Dorm;
      int Flags;
      DWORD Bones;
      float BonePosition[3];
      float AimbotAngle[3];
      void ReadInformation(int player,int iBone)
      {
      ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(fProcess.__dwordClient + EntityBase + (player * LoopDist)), &CLocalPlayer, sizeof(DWORD), 0);
      ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(CLocalPlayer + dwHealth), &Health, sizeof(int), 0);
      ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(CLocalPlayer + dwTeam), &Team, sizeof(int), 0);
      ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(CLocalPlayer + dwDorm), &Dorm, sizeof(int), 0);
      // ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(CLocalPlayer + dwPos), &BonePosition, sizeof(float[3]), 0);
      ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(CLocalPlayer + dwFlags), &Flags, sizeof(int), 0);
      ReadProcessMemory (fProcess.__HandleProcess, (PBYTE*)(CLocalPlayer + dwBone), &Bones, sizeof(DWORD), 0);
      ReadProcessMemory(fProcess.__HandleProcess, (PVOID) (Bones + 0x30 * iBone+ 0xC), &BonePosition[0], sizeof(float) , 0);
      ReadProcessMemory(fProcess.__HandleProcess, (PVOID) (Bones + 0x30 * iBone+ 0x1C), &BonePosition[1], sizeof(float) , 0);
      ReadProcessMemory(fProcess.__HandleProcess, (PVOID) (Bones + 0x30 * iBone+ 0x2C), &BonePosition[2], sizeof(float) , 0);
      BonePosition[2]-=60;
      }
      }PlayerList[32];

      void DrawFilledRect(int x, int y, int w, int h,int t)
      {
      RECT rect = { x, y, x + w, y + h };
      if(t == 3)
      FillRect(HDC_Desktop, &rect, TeamBrush);
      if(t == 2)
      FillRect(HDC_Desktop, &rect, EnemyBrush);
      if(t == 1)
      FillRect(HDC_Desktop, &rect, GreenBrush);
      }
      void DrawBorderBox(int x, int y, int w, int h, int thickness,int t)
      {
      DrawFilledRect(x, y, w, thickness,t);
      DrawFilledRect( x, y, thickness, h,t);
      DrawFilledRect((x + w), y, thickness, h,t);
      DrawFilledRect(x, y + h, w, thickness,t);
      }
      void DrawLine(float StartX, float StartY, float EndX, float EndY, COLORREF Pen)
      {
      int a,b=0;
      HPEN hOPen;
      HPEN hNPen = CreatePen(PS_SOLID, 2, Pen);
      hOPen = (HPEN)SelectObject(HDC_Desktop, hNPen);
      MoveToEx(HDC_Desktop, StartX, StartY, NULL);
      a = LineTo(HDC_Desktop, EndX, EndY);
      DeleteObject(SelectObject(HDC_Desktop, hOPen));
      }
      void CalcAngle( float *src, float *dst, float *angles )
      {
      double delta[3] = { (src[0]-dst[0]), (src[1]-dst[1]), (src[2]-dst[2]) };
      double hyp = sqrt(delta[0]*delta[0] + delta[1]*delta[1]);
      angles[0] = atan(delta[2]/hyp) * 180.0 / PI;//angles[0] = (float) (asinf(delta[2]/hyp) * 57.295779513082f);
      angles[1] = (float) (atanf(delta[1]/delta[0]) * 57.295779513082f);
      angles[2] = 0.0f;

      if(delta[0] >= 0.0)
      {
      angles[1] += 180.0f;//angles[1] += 180.0f;
      //cout << angles[1] <<" " << angles[2] <<" " << angles[3] << endl;
      }
      }
      void DrawESP(int x, int y, float distance,int team)
      {
      int width = 12500/distance;
      DrawBorderBox(x-(width/2), y-width, width, width, 1,team);
      int cx = m_Rect.left + x;
      int cy = m_Rect.top + y;
      if(Cursor.x - cx < 100&&Cursor.x - cx > -100 && Cursor.y - cy < 100&&Cursor.y - cy > -100&&GetAsyncKeyState(0x02))
      {
      SetCursorPos(cx,cy);
      }
      }
      void Recoil()
      {
      if(GetAsyncKeyState(VK_LBUTTON)&&aim < 500)
      {
      aim+=1;
      }else if(!GetAsyncKeyState(VK_LBUTTON)&&aim > 10){
      aim -= 10;
      }
      }
      bool GetESPXY(float AimbotAngle[3],float CurrentAngle[3],float distance,int ResolutionX,int ResolutionY,float FOVX,float FOVY,int team)
      {
      int tdistance = 18000/distance;
      float Ydif =AimbotAngle[0] - CurrentAngle[0];
      float Xdif =AimbotAngle[1] - CurrentAngle[1];
      float dx = ResolutionX/FOVX;
      float dy = ResolutionY/FOVY;
      Xdif += FOVX/2;
      Ydif += FOVY/2;
      int XPos = Xdif*dx;
      int YPos = Ydif*dy;
      XPos = ResolutionX - XPos;
      DrawBorderBox(XPos-(tdistance/2),YPos,tdistance,tdistance,3,team);
      if(MyPlayer.Team == team)
      return false;
      POINT c;
      c.x = ResolutionX/2;
      c.y = ResolutionY/2;
      if(distance > 400)
      distance = 400;
      int anglec = distance/50;
      int max = 50;
      if(c.x - XPos > -max&&c.x - XPos <max &&c.y - YPos > -max&&c.y - (YPos+(aim/10)) <max&&GetAsyncKeyState(0x02)&&MyPlayer.Target == false&&AimBot)
      {
      SetCursorPos(XPos + m_Rect.left,YPos+m_Rect.top+25-anglec+(aim/10));
      MyPlayer.Target = true;
      return true;
      }
      return false;
      }
      void DrawRadar(float Me[3],float NotMe[3],int team)
      {
      int X = (Me[0] - NotMe[0])/15;
      int Y = (Me[1] - NotMe[1])/15;
      int max = 50;
      if(Y > max||Y < -max||X > max||X < -max||X == 0 ||Y==0)
      return;
      DrawBorderBox(100-X,100-Y,10,10,3,team);
      }
      void DrawString(int x, int y,const char* text,int r,int g,int b)
      {
      bad = RGB(r, g, b);
      SetTextAlign(HDC_Desktop,TA_CENTER|TA_NOUPDATECP);

      SetBkColor(HDC_Desktop,RGB(0,0,0));
      SetBkMode(HDC_Desktop,TRANSPARENT);

      SetTextColor(HDC_Desktop,bad);

      SelectObject(HDC_Desktop,Font);

      TextOutA(HDC_Desktop,x,y,text,strlen(text));

      DeleteObject(Font);
      }
      void DrawAng()
      {
      if(MyPlayer.CurrentAng[1] < -135||MyPlayer.CurrentAng[1] > 135)
      DrawLine(100,100,0,100,bad);
      if(MyPlayer.CurrentAng[1] > -135&&MyPlayer.CurrentAng[1] < -45)
      DrawLine(100,100,100,0,bad);
      if(MyPlayer.CurrentAng[1] > -45&&MyPlayer.CurrentAng[1] < 45)
      DrawLine(100,100,200,100,bad);
      if(MyPlayer.CurrentAng[1] > 45&&MyPlayer.CurrentAng[1] < 135)
      DrawLine(100,100,100,200,bad);
      }
      void jump()
      {
      keybd_event( 0x39, 0x39, 0, 0);
      Sleep(1);
      keybd_event( 0x39, 0x39, KEYEVENTF_KEYUP, 0);
      Sleep(1);
      }
      void shoot()
      {
      mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
      Sleep(1);
      mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
      Sleep(1);
      }
      void Aimbot()
      {
      GetWindowRect(FindWindow(NULL, "Counter-Strike Source"), &m_Rect);
      Cursor.x = m_Rect.left+((m_Rect.right-m_Rect.left)/2);
      Cursor.y = m_Rect.top+((m_Rect.bottom-m_Rect.top)/2);
      DrawBorderBox(95,95,10,10,3,1);
      //DrawAng();
      for(int i = 1; i < NumOfPlayers; i ++)
      {
      PlayerList[i].ReadInformation(i,14);
      if (PlayerList[i].Health < 2)
      continue;
      if(PlayerList[i].Dorm == 1)
      continue;
      float EnemyXY[3];
      //if(PlayerList[i].Flags == 775)
      //PlayerList[i].BonePosition[2] -=15;
      DrawRadar(MyPlayer.Position,PlayerList[i].BonePosition,PlayerList[i].Team);
      CalcAngle (MyPlayer.Position, PlayerList[i].BonePosition, PlayerList[i].AimbotAngle);
      if(PlayerList[i].AimbotAngle[1] > 180)
      PlayerList[i].AimbotAngle[1]-=360;

      if(GetESPXY(PlayerList[i].AimbotAngle,MyPlayer.CurrentAng,Get3dDistance(MyPlayer.Position, PlayerList[i].BonePosition),m_Rect.right-m_Rect.left,m_Rect.bottom-m_Rect.top,FOVX,FOVY,PlayerList[i].Team))
      continue;
      }
      if(TriggerBot&&MyPlayer.CHID > 0 && MyPlayer.CHID < NumOfPlayers&&GetAsyncKeyState(0x02))
      {
      shoot();
      }
      }
      bool BunnyHop(bool t)
      {
      if(GetAsyncKeyState(VK_SPACE)&1)
      t = !t;
      if(t&&(MyPlayer.Flags == 257||MyPlayer.Flags == 259))
      {
      jump();
      }
      return t;
      }
      void UpdateShit()
      {
      if(GetAsyncKeyState(VK_RIGHT)&1)
      AimBot = !AimBot;
      if(GetAsyncKeyState(VK_LEFT)&1)
      TriggerBot = !TriggerBot;
      if(AimBot)
      {
      DrawString(30, 30,"Aimbot",67,127,255);
      }else{
      DrawString(30, 30,"Aimbot",255,67,67);
      }
      if(TriggerBot)
      DrawString(40, 60,"Triggerbot",67,127,255);
      if(!TriggerBot)
      DrawString(40, 60,"Triggerbot",255,67,67);
      }
      int main()
      {
      SetConsoleTitle("Looking for CSS ~Kaz");
      fProcess.RunProcess();
      SetConsoleTitle("Kazakouramariou");
      cout << "Running hack\n";
      cout << "---------------------------------------------\n";
      cout << "[Right Mouse] = Aimbot/Triggerbot/both\n";
      cout << "[Space] = toggles BHOP\n";
      cout << "[F6] = close hack\n";
      cout << "[Left arrow key= toggles Triggerbot\n";
      cout << "[Rightarrow key= toggles Aimbot\n";
      cout << "\nThanks to Fleep for external template";
      cout << "\nThanks to kaz for applying geometry skills\n";
      cout << "---------------------------------------------\n";
      TargetWnd = FindWindow(0, "Counter-Strike Source");
      HDC HDC_Desktop = GetDC(TargetWnd);
      SetupDrawing(HDC_Desktop, TargetWnd);
      bool bunny = false;
      while (!GetAsyncKeyState(VK_F6))
      {
      MyPlayer.ReadInformation();
      Aimbot();
      Recoil();
      bunny = BunnyHop(bunny);
      UpdateShit();
      }
      }
      Last edited by kaz; 05-09-2014 at 04:46 PM.

    2. Thanks squeenie, imbarawr thanked for this post

    Similar Game Hacker Threads

    1. [Tutorial] Alternate for external World to screen
      By kaz in forum ESP - WorldToScreen - ViewMatrix
      Replies: 6
      Last Post: 03-19-2017, 07:45 PM
    2. [Source Code] [OpenGL] World To Screen
      By [GH]Rake in forum Direct-X, OpenGL
      Replies: 4
      Last Post: 07-04-2015, 02:30 PM
    3. World To Screen.
      By simonpaa in forum Hacking Help
      Replies: 6
      Last Post: 01-22-2015, 03:43 PM
    4. World to screen coordinates?
      By acss in forum Hacking Help
      Replies: 6
      Last Post: 11-09-2013, 07:43 AM
    5. Please help\Tutorial World 2 Screen
      By VDV777 in forum C/C++
      Replies: 16
      Last Post: 06-12-2013, 09:37 AM

    Tags for this Thread