This repository has been archived by the owner on Jan 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
MenuX_Observer.h
118 lines (100 loc) · 3.33 KB
/
MenuX_Observer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
#include <windows.h>
DWORD TeamColor;
DWORD CGameContextPointer(void) {
unsigned long dwBase = *(DWORD*)ResultPlayerBase;
return dwBase;
}
DWORD GetBasePlayerHealth(void) {
unsigned long dwBase2 = *(DWORD*)ResultBaseESP;
return dwBase2;
}
CPing *pPing(UINT i)
{
return (CPing*)((CGameContextPointer() + 0x3B6D0) + i * 1);
}
CKill *pKill(UINT i)
{
return (CKill*)((CGameContextPointer() + 0x3B72C) + i * 4);
}
CNames *oNames(UINT i)
{
return (CNames*)((CGameContextPointer() + PTR_NAMES) + i * 0x21);
}
CHealth *oHealth(UINT i)
{
return (CHealth*)((GetBasePlayerHealth() + 0x264) + i * 0x20);
}
void PingServer(int x, int y, float Health, IDirect3DDevice9* pDevice)
{
if( !pDevice )
return;
for (int index = 0; index <= (Health-1); index++)
{
D3DCOLOR HPcol = Green;
if (Health == 3 )HPcol = Orange;
if (Health == 2 )HPcol = Orange;
if (Health == 1) HPcol = Red;
FillRGB(x + (index*4),y,3,14,HPcol,pDevice);
}
}
void HealthbarServer(IDirect3DDevice9* pDevice, int x, int y, float CurHP)
{
if( !pDevice )
return;
float Long = (CurHP);
FillRGB(x,y,CurHP*1.2,14,TeamColor,pDevice );
}
void DrawBoxObsv( int x, int y, int w, int h, D3DCOLOR BoxColor, D3DCOLOR BorderColor, IDirect3DDevice9* pDevice )
{
FillRGB( x, y, w, h, BoxColor, pDevice );
DrawBorder( x, y, w, h, 1, BorderColor, pDevice );
}
void DrawBoxServer( int x, int y, IDirect3DDevice9* pDevice )
{
if( !pDevice )
return;
DrawBoxObsv( x, y, 167, 18,Black, TeamColor, pDevice );
}
void MenuX_DrawObserver(LPDIRECT3DDEVICE9 pDevice)
{
int ServerRED =500;
int ServerBLUE =250;
int ServerY1 =480;
D3DVIEWPORT9 viewP;
pDevice->GetViewport( &viewP );
DWORD ScreenCenterX = viewP.Width / 2;
DWORD ScreenCenterY = viewP.Height / 2;
unsigned long dwBase = *(DWORD*)ResultPlayerBase;
TeamScore *TeamzScore = (TeamScore*)((CGameContextPointer() + 0x3B724));
for (int i = 0; i<=15; i++)
{
if (pPing(i)->iLog > 0)
//if (dwBase !=0)
{
bHookedTele = true;
int myTeam = GetTeam(i);
if (Nh_Teknology27)
{
if (myTeam == 1)
{
TeamColor = Red;
DrawBoxServer(ScreenCenterX - ServerRED + 40,(int)ServerY1+(10*i),pDevice);
HealthbarServer(pDevice,ScreenCenterX - ServerRED + 65,(int)(ServerY1+2)+(10*i),oHealth(i)->CurHP);
PingServer(ScreenCenterX - ServerRED + 187,(int)(ServerY1+2)+(10*i),pPing(i)->iLog, pDevice);
DrawStringESP(ScreenCenterX - ServerRED + 45,(ServerY1+2)+(10*i),White,"%d|%d %s",pKill(i)->bKill,pKill(i)->bDead,oNames(i)->szNames);
DrawStringESP(ScreenCenterX - ServerRED + 40,460,Red,"[Red Team : %d]",TeamzScore->TScoreRed);
}
if (myTeam == 2)
{
TeamColor = Blue;
DrawBoxServer(ScreenCenterX + ServerBLUE + 40,(ServerY1-10)+(10*i),pDevice);
HealthbarServer(pDevice, ScreenCenterX + ServerBLUE + 65 ,(int)((ServerY1+2)-10)+(10*i),oHealth(i)->CurHP);
PingServer(ScreenCenterX + ServerBLUE + 187,(int)((ServerY1+2)-10)+(10*i),pPing(i)->iLog, pDevice);
DrawStringESP(ScreenCenterX + ServerBLUE + 45,((ServerY1+2)-10)+(10*i),White,"%d|%d %s",pKill(i)->bKill,pKill(i)->bDead,oNames(i)->szNames);
DrawStringESP(ScreenCenterX + ServerBLUE + 40,460,Blue,"[Blue Team : %d]",TeamzScore->TScoreBlue);
}
}
}
}
bHookedTele = false;
}