Перейти к содержанию

Рекомендуемые сообщения

Всем привет , кто может мне объяснить и помочь , как же мне можно пофиксить эти мерцания в ESP-чите... подскажите пожалуйста.. 

https://youtu.be/xDw5-Mdnoco

Как мне "перевести" мой чит на DirecX. рисую с помощью GDI.

  • Плюс 1
Ссылка на комментарий
Поделиться на другие сайты

Всем привет , кто может мне объяснить и помочь , как же мне можно пофиксить эти мерцания в ESP-чите... подскажите пожалуйста.. 

https://youtu.be/xDw5-Mdnoco

Как мне "перевести" мой чит на DirecX. рисую с помощью GDI.

в паблике возьми любой чит на directx

Ссылка на комментарий
Поделиться на другие сайты

в паблике возьми любой чит на directx

Можешь подсказать где именно  ?)))

//Our desktop handle

HDC HDC_Desktop;

HBRUSH EnemyBrush;//font we use to write text with

COLORREF LINESCOLOR;

COLORREF HEALTHCOLOR;

COLORREF DISTANCECOLOR;

HWND TargetWnd;

HWND Handle;

DWORD DwProcId;

HFONT Font; //font we use to write text with

//ESP VARS

const DWORD ViewMatrix = 0x4A0C1A4; //4A0D16

//Set of initial variables you'll need

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

}

void SetupDrawing(HDC hDesktop, HWND handle)

{

HDC_Desktop = hDesktop;

Handle = handle;

EnemyBrush = CreateSolidBrush(RGB(151, 200, 237));

LINESCOLOR = RGB(0, 255, 0);

HEALTHCOLOR = RGB(255, 0, 0);

DISTANCECOLOR = RGB(83, 178, 3);

}

//We will use this struct throughout all other tutorials adding more variables every time

struct MyPlayer_t

{

DWORD CLocalPlayer;

DWORD Engine;

int Team;

int Health;

int FlickerCheck;

int inGAME;//6 in game 0 in menu;

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*)(fProcess.__dwordEngine + dw_inGameBase), &Engine, sizeof(DWORD), 0);

ReadProcessMemory(fProcess.__HandleProcess, (PBYTE*)(Engine + dw_inGame), &inGAME, sizeof(int), 0);

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_Position), &Position, sizeof(float[3]), 0);

//engine.dll+5CE294

//Here we find how many player entities exist in our game, through this we make sure to only loop the amount of times we need

//when grabbing player data

//Note that this call could be even better at a regular 15 or so seconds timer but performance shouldn't vary a great deal

//client.dll+4A0C196

ReadProcessMemory(fProcess.__HandleProcess, (PBYTE*)(fProcess.__dwordClient + ViewMatrix), &WorldToScreenMatrix, sizeof(WorldToScreenMatrix), 0);

}

}MyPlayer;

//ENemy struct

struct PlayerList_t

{

DWORD CBaseEntity;

int Team;

int Health;

float Position[3];

int dormant;

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

ReadProcessMemory(fProcess.__HandleProcess, (PBYTE*)(CBaseEntity + dw_Dormant), &dormant, sizeof(byte), 0);

// Reading out our Position to our "Position" Varible.

ReadProcessMemory(fProcess.__HandleProcess, (PBYTE*)(CBaseEntity + dw_Position), &Position, sizeof(float[3]), 0);

}

}PlayerList[64];

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;

}

//We receive the 2-D Coordinates the colour and the device we want to use to draw those colours with

//HDC so we know where to draw and brush because we need it to draw

void DrawFilledRect(int x, int y, int w, int h)

{

//We create our rectangle to draw on screen

RECT rect = { x, y, x + w, y + h };

//We clear that portion of the screen and display our rectangle

FillRect(HDC_Desktop, &rect, EnemyBrush);

}

void DrawBorderBox(int x, int y, int w, int h, int thickness)

{

//Top horiz line

DrawFilledRect(x, y, w, thickness);

//Left vertical line

DrawFilledRect(x, y, thickness, h);

//right vertical line

DrawFilledRect((x + w), y, thickness, h);

//bottom horiz line

DrawFilledRect(x, y + h, w + thickness, thickness);

}

//Here is where we draw our line from point A to Point B

void DrawLine(float StartX, float StartY, float EndX, float EndY, COLORREF Pen)

{

int a, b = 0;

HPEN hOPen;

// penstyle, width, color

HPEN hNPen = CreatePen(PS_SOLID, 1, Pen);

hOPen = (HPEN)SelectObject(HDC_Desktop, hNPen);

// starting point of line

MoveToEx(HDC_Desktop, StartX, StartY, NULL);

// ending point of line

a = LineTo(HDC_Desktop, EndX, EndY);

DeleteObject(SelectObject(HDC_Desktop, hOPen));

}

//Draw our text with this function

void DrawString(int x, int y, COLORREF color, const char* text)

{

SetTextAlign(HDC_Desktop, TA_CENTER | TA_NOUPDATECP);

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

SetBkMode(HDC_Desktop, TRANSPARENT);

SetTextColor(HDC_Desktop, color);

SelectObject(HDC_Desktop, Font);

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

DeleteObject(Font);

}

void DrawESP(int x, int y,int health,float distance)

{

int width = 32;

int height = 56;

DrawBorderBox(x - (width / 2), y - height, width, height, 1);

DrawLine((m_Rect.right - m_Rect.left)/2,

m_Rect.bottom - m_Rect.top, x, y, LINESCOLOR);

std::stringstream hp, dist;

hp<< health;

dist << (int)distance/8 - 3;

char * Distanceinfo = new char[dist.str().size() + 1];

strcpy(Distanceinfo, dist.str().c_str());

char * HealthInfo = new char[hp.str().size() + 1];

strcpy(HealthInfo, hp.str().c_str());

DrawString(x, y-14, HEALTHCOLOR, HealthInfo);

DrawString(x, y - 69, DISTANCECOLOR, Distanceinfo);

delete[] HealthInfo, Distanceinfo;

}

void ESP()

{

GetWindowRect(FindWindow(NULL, "Counter-Strike: Global Offensive"), &m_Rect);

for (int i = 0; i < 64;i++)

{

PlayerList.ReadInformation(i);

if (MyPlayer.inGAME == 6) {

if (PlayerList.Health < 1 || PlayerList.Health >100)

continue;

if (PlayerList.dormant == 1)

continue;

if (PlayerList.Team == MyPlayer.Team)

continue;

float EnemyXY[3];

if (WorldToScreen(PlayerList.Position, EnemyXY))

{

DrawESP(EnemyXY[0] - m_Rect.left, EnemyXY[1] - m_Rect.top, PlayerList.Health, Get3dDistance(MyPlayer.Position, PlayerList.Position));

// DrawESP(EnemyXY[0] - m_Rect.left, EnemyXY[1] - m_Rect.top, Get3dDistance(MyPlayer.Position,PlayerList.Position)); //(MyPlayer.Position, PlayerList.Position),

}

}

}

}

int main()

{

cout << "****************************** ESP HACK by Mark *******************************" << endl;

cout << "* *" << endl;

cout << "* Activation-[DEL] *" << endl;

cout << "* Deactivation-[iNSERT] *" << endl;

cout << "* *" << endl;

cout << "*******************************************************************************" << endl;

fProcess.RunProcess();

ShowWindow(FindWindowA("ConsoleWindowClass", NULL), false);

TargetWnd = FindWindow(0, "Counter-Strike: Global Offensive");

HDC hdc_Desktop = GetDC(TargetWnd);

SetupDrawing(hdc_Desktop,TargetWnd);

//Our infinite loop will go here

while (Key_STATES == false)

{

if (GetAsyncKeyState(VK_DELETE))

{

Key_STATES = true;

while (true) {

MyPlayer.ReadInformation();

ESP();

if (GetAsyncKeyState(VK_INSERT))

{

Key_STATES = false;

break;

}

}

}

}

return 0;

}

Ссылка на комментарий
Поделиться на другие сайты

#include <sstream>

#include <iostream>

#include <math.h>

#include <vector>

#include <algorithm>

#include "HackProcess.h"

CHackProcess fProcess;

using namespace std;

const DWORD Player_Base = 0x0

const DWORD dw_inGameBase = 0x0

const DWORD dw_mTeamOffset = 0x0

const DWORD dw_Health = 0x0

const DWORD dw_Dormant = 0x0

const DWORD dw_inGame = 0x0

const DWORD dw_Position = 0x0

//Enemy Vars including the enemy loop

const DWORD EntityPlayer_Base = 0x0

//How far in memory is each enemy data

const DWORD EntityLoopDistance =0x0

bool Key_STATES = false;

RECT m_Rect;

//Our desktop handle

HDC HDC_Desktop;

HBRUSH EnemyBrush;//font we use to write text with

COLORREF LINESCOLOR;

COLORREF HEALTHCOLOR;

COLORREF DISTANCECOLOR;

HWND TargetWnd;

HWND Handle;

DWORD DwProcId;

HFONT Font; //font we use to write text with

//ESP VARS

const DWORD ViewMatrix = 0x4A0C1C4; //4A0D16

//Set of initial variables you'll need

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

}

void SetupDrawing(HDC hDesktop, HWND handle)

{

HDC_Desktop = hDesktop;

Handle = handle;

EnemyBrush = CreateSolidBrush(RGB(100, 116, 239));

LINESCOLOR = RGB(0, 255, 0);

HEALTHCOLOR = RGB(255, 0, 0);

DISTANCECOLOR = RGB(83, 178, 3);

}

//We will use this struct throughout all other tutorials adding more variables every time

struct MyPlayer_t

{

DWORD CLocalPlayer;

DWORD Engine;

int Team;

int Health;

int FlickerCheck;

int inGAME;//6 in game 0 in menu;

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*)(fProcess.__dwordEngine + dw_inGameBase), &Engine, sizeof(DWORD), 0);

ReadProcessMemory(fProcess.__HandleProcess, (PBYTE*)(Engine + dw_inGame), &inGAME, sizeof(int), 0);

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_Position), &Position, sizeof(float[3]), 0);

//engine.dll+5CE294

//Here we find how many player entities exist in our game, through this we make sure to only loop the amount of times we need

//when grabbing player data

//Note that this call could be even better at a regular 15 or so seconds timer but performance shouldn't vary a great deal

//client.dll+4A0C196

ReadProcessMemory(fProcess.__HandleProcess, (PBYTE*)(fProcess.__dwordClient + ViewMatrix), &WorldToScreenMatrix, sizeof(WorldToScreenMatrix), 0);

}

}MyPlayer;

//ENemy struct

struct PlayerList_t

{

DWORD CBaseEntity;

int Team;

int Health;

float Position[3];

int dormant;

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

ReadProcessMemory(fProcess.__HandleProcess, (PBYTE*)(CBaseEntity + dw_Dormant), &dormant, sizeof(byte), 0);

// Reading out our Position to our "Position" Varible.

ReadProcessMemory(fProcess.__HandleProcess, (PBYTE*)(CBaseEntity + dw_Position), &Position, sizeof(float[3]), 0);

}

}PlayerList[64];

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;

}

//We receive the 2-D Coordinates the colour and the device we want to use to draw those colours with

//HDC so we know where to draw and brush because we need it to draw

void DrawFilledRect(int x, int y, int w, int h)

{

//We create our rectangle to draw on screen

RECT rect = { x, y, x + w, y + h };

//We clear that portion of the screen and display our rectangle

FillRect(HDC_Desktop, &rect, EnemyBrush);

}

void DrawBorderBox(int x, int y, int w, int h, int thickness)

{

//Top horiz line

DrawFilledRect(x, y, w, thickness);

//Left vertical line

DrawFilledRect(x, y, thickness, h);

//right vertical line

DrawFilledRect((x + w), y, thickness, h);

//bottom horiz line

DrawFilledRect(x, y + h, w + thickness, thickness);

}

//Here is where we draw our line from point A to Point B

void DrawLine(float StartX, float StartY, float EndX, float EndY, COLORREF Pen)

{

int a, b = 0;

HPEN hOPen;

// penstyle, width, color

HPEN hNPen = CreatePen(PS_SOLID, 1, Pen);

hOPen = (HPEN)SelectObject(HDC_Desktop, hNPen);

// starting point of line

MoveToEx(HDC_Desktop, StartX, StartY, NULL);

// ending point of line

a = LineTo(HDC_Desktop, EndX, EndY);

DeleteObject(SelectObject(HDC_Desktop, hOPen));

}

//Draw our text with this function

void DrawString(int x, int y, COLORREF color, const char* text)

{

SetTextAlign(HDC_Desktop, TA_CENTER | TA_NOUPDATECP);

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

SetBkMode(HDC_Desktop, TRANSPARENT);

SetTextColor(HDC_Desktop, color);

SelectObject(HDC_Desktop, Font);

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

DeleteObject(Font);

}

void DrawESP(int x, int y,int health,float distance)

{

int width = 32;

int height = 56;

DrawBorderBox(x - (width / 2), y - height, width, height, 1);

DrawLine((m_Rect.right - m_Rect.left)/2,

m_Rect.bottom - m_Rect.top, x, y, LINESCOLOR);

std::stringstream hp, dist;

hp<< health;

dist << (int)distance/8 - 3;

char * Distanceinfo = new char[dist.str().size() + 1];

strcpy(Distanceinfo, dist.str().c_str());

char * HealthInfo = new char[hp.str().size() + 1];

strcpy(HealthInfo, hp.str().c_str());

DrawString(x, y-14, HEALTHCOLOR, HealthInfo);

DrawString(x, y - 69, DISTANCECOLOR, Distanceinfo);

delete[] HealthInfo, Distanceinfo;

}

void ESP()

{

GetWindowRect(FindWindow(NULL, "Counter-Strike: Global Offensive"), &m_Rect);

for (int i = 1; i < 64;i++)

{

if (dw_inGame == 0)

continue;

PlayerList.ReadInformation(i);

if (PlayerList.Health < 1 || PlayerList.Health >100)

continue;

if (PlayerList.dormant == 1)

continue;

if (PlayerList.Team == MyPlayer.Team)

continue;

float EnemyXY[3];

if (WorldToScreen(PlayerList.Position, EnemyXY))

{

DrawESP(EnemyXY[0] - m_Rect.left, EnemyXY[1] - m_Rect.top, PlayerList.Health, Get3dDistance(MyPlayer.Position, PlayerList.Position));

// DrawESP(EnemyXY[0] - m_Rect.left, EnemyXY[1] - m_Rect.top, Get3dDistance(MyPlayer.Position,PlayerList.Position)); //(MyPlayer.Position, PlayerList.Position),

}

}

}

int main()

{

cout << "****************************** ESP HACK by Cybioz *******************************" << endl;

cout << "* *" << endl;

cout << "* Activation-[DEL] *" << endl;

cout << "* Deactivation-[INSERT] *" << endl;

cout << "* *" << endl;

cout << "*******************************************************************************" << endl;

fProcess.RunProcess();

ShowWindow(FindWindowA("ConsoleWindowClass", NULL), false);

TargetWnd = FindWindow(0, "Counter-Strike: Global Offensive");

HDC_Desktop = GetDC(TargetWnd);

SetupDrawing(HDC_Desktop,TargetWnd);

//Our infinite loop will go here

while (Key_STATES == false)

{

if (GetAsyncKeyState(VK_DELETE))

{

Key_STATES = true;

while (true) {

MyPlayer.ReadInformation();

ESP();

if (GetAsyncKeyState(VK_INSERT))

{

Key_STATES = false;

break;

}

}

}

}

return 0;

}

#include <Windows.h>
Изменено пользователем Xipho
Большие куски кода надо прятать под спойлер.
Ссылка на комментарий
Поделиться на другие сайты

×
×
  • Создать...

Важная информация

Находясь на нашем сайте, Вы автоматически соглашаетесь соблюдать наши Условия использования.