Code:
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <d3d9.h>
#include <d3dx9.h>
#include "MyDetour.h"
#include "nShit.h"
#include "MyMain.h"
#include "MyAddys.h"
#include "nColor.h"
#include "nLTFX.h"
#include "MyStructs.h"
#include "Other.h"
#include "MyHacks.h"
#include "MyAimbot.h"
#include "cVTables.h"
#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "d3dx9.lib")
#pragma warning(disable:4244)
cMenu UDBase = cMenu( 80, 100 );
HWND hWnd;
VTableBase * _GetVTable;
D3DCOLOR WarESP;
int xweight=0;
int ESPF=0;
int yheight=0;
int xplaats=0;
int yplaats=0;
int AL_EspEnemyOnly = 0;
int D3DESPF = 0;
int D3DESPN = 0;
int D3DESPHP = 0;
int D3DESPD = 0;
int D3DESPW = 0;
int D3DESPI = 0;
int D3DESPE = 0;
int D3DESPS = 0;
int D3DESPATM = 0;
int D3DESPPING = 0;
int D3DESPLVL = 0;
int D3DESPPREM = 0;
int D3DESPCLASS = 0;
int D3DESPTEAM = 0;
int D3DESPB = 0;
int D3DESPBH = 0;
int D3DESPBW = 0;
float fX_1;
float fY_1;
float fZ_1;
char cX_1[32];
char cY_1[32];
char cZ_1[32];
unsigned int GetCurrentLevel(long exp)
{
unsigned int CurrentLevel = 0;
DWORD exptestcall = 0x4E784C;
__asm
{
push exp
call [exptestcall]
mov CurrentLevel,eax;
}
return CurrentLevel;
}
void InitMenustuff( void )
{
static bool InitMenuItems = false;
if( InitMenuItems )return;
InitMenuItems = true;
int GID[9] = {0};
int GGA[8] = {0};
GID[1] = UDBase.AddMenuGroup("=[ D3D Related ]=");
UDBase.AddMenuItem( "Chams", &cD3D.Hooked, 0, 1, GID[1],0, "Soild",NULL );
UDBase.AddMenuItem( "Color1", &cD3D.Color1, 0, 10, GID[1], 0, "Red","Yellow","Orange","Green","Blue","Purple","Pink","Black","Grey","Cyan", NULL );
UDBase.AddMenuItem( "Color2", &cD3D.Color2, 0, 10, GID[1], 0, "Red","Yellow","Orange","Green","Blue","Purple","Pink","Black","Grey","Cyan", NULL );
UDBase.AddMenuItem( "WallHack", &cD3D.WallHack, 0, 1, GID[1],0 );
UDBase.AddMenuItem( "Fullbright", &cD3D.Fullbright, 0, 1, GID[1] );
UDBase.AddMenuItem( "Crosshair", &cD3D.Crosshair, 0, 3, GID[1], 0, "Red","Green","Blue", NULL );
GID[2] = UDBase.AddMenuGroup("=[ Player Related ]=");
UDBase.AddMenuItem("Speed", &cPlayer.Speed,0,3,GID[2],0,"x2","x4","x6",NULL);
UDBase.AddMenuItem("NFD", &cPlayer.NFD,0,1,GID[2]);
UDBase.AddMenuItem("SuperJump",&cPlayer.SJump,0,1,GID[2]);
UDBase.AddMenuItem("NoBounds",&cPlayer.NoBounds,0,1,GID[2]);
UDBase.AddMenuItem("SelfKill",&cPlayer.SelfKill,0,1,GID[2]);
UDBase.AddMenuItem("WTW",&cPlayer.WTW,0,1,GID[2]);
//UDBase.AddMenuItem("SkyWalk",&cPlayer.SkyWalk,0,1,GID[2]);
UDBase.AddMenuItem("Stamina",&cPlayer.Stamina,0,1,GID[2]);
UDBase.AddMenuItem("Teleport",&cPlayer.Teleport,0,1,GID[2]);
UDBase.AddMenuItem("FastHealth",&cPlayer.FastHealth,0,1,GID[2]);
UDBase.AddMenuItem("FastAmmo",&cPlayer.FastAmmo,0,1,GID[2]);
UDBase.AddMenuItem("FastFlag",&cPlayer.FastFlag,0,1,GID[2]);
UDBase.AddMenuItem("FastRepair",&cPlayer.FastRepair,0,1,GID[2]);
//UDBase.AddMenuItem("PlantAnyWhere",&cPlayer.PlantAnywhere,0,1,GID[2]);
//UDBase.AddMenuItem("DefuseAnyWhere",&cPlayer.DefuseAnywhere,0,1,GID[2]);
UDBase.AddMenuItem("ImDrunk",&cPlayer.ImDrunk,0,1,GID[2]);
UDBase.AddMenuItem("LadderQuickly",&cPlayer.LadderQuickly,0,1,GID[2]);
UDBase.AddMenuItem("Dig",&cPlayer.Dig,0,1,GID[2]);
UDBase.AddMenuItem("Inivsible",&cPlayer.Inivsible,0,1,GID[2]);
UDBase.AddMenuItem("DeadSpinner",&cPlayer.DeadSpinner,0,1,GID[2]);
GID[3] = UDBase.AddMenuGroup("=[ Weapon Related ]=");
UDBase.AddMenuItem("NoSpread",&cWeapon.NoSpread,0,1,GID[3]);
UDBase.AddMenuItem("NoRecoil",&cWeapon.NoRecoil,0,1,GID[3]);
UDBase.AddMenuItem("BoneShot",&cWeapon.Boneshot,0,1,GID[3]);
UDBase.AddMenuItem("Scope",&cWeapon.Scope,0,1,GID[3]);
UDBase.AddMenuItem("Unlimited Ammo",&cWeapon.BreakLimit,0,1,GID[3]);
UDBase.AddMenuItem("FastNadeBlast",&cWeapon.FastNadeBlast,0,1,GID[3]);
UDBase.AddMenuItem("NoReload",&cWeapon.NoReload,0,1,GID[3]);
UDBase.AddMenuItem("NoDelay",&cWeapon.NoDelay,0,1,GID[3]);
UDBase.AddMenuItem("STW",&cWeapon.STW,0,1,GID[3]);
UDBase.AddMenuItem("NoM134Idle",&cWeapon.NoM134Idle,0,1,GID[3]);
UDBase.AddMenuItem("FastLockOn",&cWeapon.FastLockOn,0,1,GID[3]);
GID[4] = UDBase.AddMenuGroup("=[ Server Related ]=");
UDBase.AddMenuItem("AntiAfk",&cServer.AntiAFK,0,1,GID[4]);
UDBase.AddMenuItem("Slot5",&cServer.Slot5,0,1,GID[4]);
UDBase.AddMenuItem("Slot6",&cServer.Slot6,0,1,GID[4]);
UDBase.AddMenuItem("Slot7",&cServer.Slot7,0,1,GID[4]);
UDBase.AddMenuItem("Slot8",&cServer.Slot8,0,1,GID[4]);
UDBase.AddMenuItem("GmWarning",&cServer.GmWarn,0,1,GID[4]);
UDBase.AddMenuItem("Visual Level",&cServer.VLevel,0,1,GID[4]);
UDBase.AddMenuItem("Visual Dinar",&cServer.VDinar,0,1,GID[4]);
UDBase.AddMenuItem("Premium",&cServer.Premium,0,4,GID[4],0,"Bronce","Silver","Gold","Platin",NULL);
UDBase.AddMenuItem("PX-Bondage",&cServer.Bandage,0,1,GID[4]);
UDBase.AddMenuItem("PX-SniperAmmo",&cServer.SniperAmmo,0,1,GID[4]);
UDBase.AddMenuItem("PX-AssaultAmmo",&cServer.AssaultAmmo,0,1,GID[4]);
UDBase.AddMenuItem("PX-ExtraAmmo1",&cServer.ExtraAmmo1,0,1,GID[4]);
UDBase.AddMenuItem("PX-ExtraAmmo2",&cServer.ExtraAmmo2,0,1,GID[4]);
GID[5] = UDBase.AddMenuGroup("=[ ESP Related ]=");
UDBase.AddMenuItem("-> Esp Premium",&cEsp.CH_EspPremium,0,1,GID[5],0);
UDBase.AddMenuItem("-> Esp Health",&cEsp.CH_EspHealth,0,1,GID[5],0);
UDBase.AddMenuItem("-> Esp Deaths",&cEsp.CH_EspDeaths,0,1,GID[5],0);
UDBase.AddMenuItem("-> Esp Kills",&cEsp.CH_EspKills,0,1,GID[5],0);
UDBase.AddMenuItem("-> Esp Flags",&cEsp.CH_EspFlags,0,1,GID[5],0);
UDBase.AddMenuItem("-> Esp Class",&cEsp.CH_EspClass,0,1,GID[5],0);
UDBase.AddMenuItem("-> Esp Team",&cEsp.CH_EspTeam,0,1,GID[5],0);
UDBase.AddMenuItem("-> Esp Name",&cEsp.CH_EspName,0,1,GID[5],0);
UDBase.AddMenuItem("-> Esp Ping",&cEsp.CH_EspPing,0,1,GID[5],0);
UDBase.AddMenuItem("-> Esp Ip",&cEsp.CH_EspIp,0,1,GID[5],0);
UDBase.AddMenuItem("-> 2DBoxes",&cEsp.CH_EspBoxes,0,1,GID[5],0);
//GID[6] = UDBase.AddMenuGroup("=[ xxXxxxX ]=");
//UDBase.AddMenuItem("xxXxxxX",&cAimbot.CH_AimBot,0,1,GID[9],0);
//UDBase.AddMenuItem("xxXxxxX",&cAimbot.CH_AimKey,0,2,GID[9],0,"LMouse","Alt");
//UDBase.AddMenuItem("xxXxxxX",&cAimbot.CH_AimType,0,2,GID[9],0,"Dist","Cross");
//UDBase.AddMenuItem("xxXxxxX",&cAimbot.CH_AimEnemy,0,1,GID[9],0);
//UDBase.AddUDBaseItem("- Aim Distance",&cAimbot.CH_AimDistance,0,3,GID[6],0,"Min","Normal","Max");
GID[7] = UDBase.AddMenuGroup("=[ Menu Related ]=");
UDBase.AddMenuItem( "Menu Color", &xMenu.MenColor, 0, 3, GID[7], 0 , "Green" , "Green", "Green",NULL );
UDBase.AddMenuItem( "Background Color", &xMenu.BackColor, 0, 7, GID[7], 0, "Grey" , "Red","Black","Pink","Lightblue","Black","BlackTrans",NULL );
UDBase.AddMenuItem( "Reset Menu", &xMenu.ResetMe, 0, 1, GID[7], 0 );
UDBase.AddMenuItem( "Panic Key", &xMenu.TurnPanic, 0, 1, GID[7], 0 );
UDBase.AddMenuItem( "Exit Game", &xMenu.ExWr, 0, 1, GID[7], 0 );
}
void Init( LPDIRECT3DDEVICE9 pDevice )
{
InitPresent = true;
UDBase.InitalizeFont( "Arial", 8, pDevice );
UDBase.SetInitialCoords( 30, 25 );
UDBase.SetColor( C_VALUES, D3DCOLOR_ARGB(255,255,255,255) );
UDBase.SetColor( C_TITLE, D3DCOLOR_ARGB(255,220,0,0) );
UDBase.SetColor( C_ACTIVATED, D3DCOLOR_ARGB( 250, /*123*/0, /*133*/220, /*133*/0 ) );
UDBase.SetColor( C_SELECTED, D3DCOLOR_ARGB( 250, 240, 240, 40 ) );
UDBase.SetColor( C_MOUSEOVER, D3DCOLOR_ARGB( 250, 190, 240, 70 ) );
UDBase.SetColor( C_GROUP, D3DCOLOR_ARGB( 255,220,0,0 ) );
UDBase.SetColor( C_BOX_BORDER, D3DCOLOR_ARGB( 200,000,000,000 ) );
UDBase.SetColor( C_BOX, D3DCOLOR_ARGB( 255,220,0,0 ) );
UDBase.SetColor( C_DEFAULT, White);
UDBase.SetColor( C_VALUES, White );
UDBase.SetColor( C_FOOTER, White);
UDBase.InitializeMenu( );
InitMenustuff( );
}
BOOL Memcpy(VOID *lpMem,VOID *lpSrc,DWORD len)
{
DWORD lpflOldProtect, flNewProtect = PAGE_READWRITE;
unsigned char *pDst = (unsigned char *)lpMem,
*pSrc = (unsigned char *)lpSrc;
if (VirtualProtect(lpMem,len,flNewProtect,&lpflOldProtect))
{
while(len-- > 0) *pDst++ = *pSrc++;
return 0;
}
return 1;
}
HRESULT WINAPI myReset ( LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters )
{
if(UDBase.FontCreated && UDBase.firstInit)
{
UDBase.PreReset( );
}
HRESULT ReturnReset = pReset(pDevice,pPresentationParameters);
if(!UDBase.FontCreated && UDBase.firstInit)
{
UDBase.PostReset( "Arial", 8, pDevice );
}
return ReturnReset;
}
HRESULT WINAPI myDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE Type, INT BaseVertexIndex, UINT MinVertexIndex, UINT NumVertices, UINT startIndex, UINT primCount)
{
_asm pushad;
if(pDevice->GetStreamSource(0, &Stream, &Offset, &m_Stride) == D3D_OK)
{
Stream->Release();
}
if(Color)
{
GenerateTexture(pDevice, &aRed, Red);
GenerateTexture(pDevice, &aYellow, Yellow);
GenerateTexture(pDevice, &aGreen, Green);
GenerateTexture(pDevice, &aBlue, Blue);
GenerateTexture(pDevice, &aPurple, Purple);
GenerateTexture(pDevice, &aPink, Pink);
GenerateTexture(pDevice, &aOrange, Orange);
GenerateTexture(pDevice, &aBlack, Black);
GenerateTexture(pDevice, &aWhite, White);
GenerateTexture(pDevice, &aGrey, Grey);
GenerateTexture(pDevice, &aCyan , Cyan);
Color = false;
}
if(cD3D.Hooked==1)
{
if(cD3D.Color1)
{
if(m_Stride==36 || m_Stride==32)
{
if(cD3D.Color1) pDevice->SetRenderState(D3DRS_LIGHTING,false);
if(cD3D.Color1) pDevice->SetRenderState(D3DRS_ZENABLE,false);
if(cD3D.Color1) pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
if(cD3D.Color1==1){pDevice->SetTexture(0, aRed);}
if(cD3D.Color1==2){pDevice->SetTexture(0, aYellow);}
if(cD3D.Color1==3){pDevice->SetTexture(0, aOrange);}
if(cD3D.Color1==4){pDevice->SetTexture(0, aGreen);}
if(cD3D.Color1==5){pDevice->SetTexture(0, aBlue);}
if(cD3D.Color1==6){pDevice->SetTexture(0, aPurple);}
if(cD3D.Color1==7){pDevice->SetTexture(0, aPink);}
if(cD3D.Color1==8){pDevice->SetTexture(0, aBlack);}
if(cD3D.Color1==9){pDevice->SetTexture(0, aGrey);}
if(cD3D.Color1==10){pDevice->SetTexture(0, aCyan);}
pDrawIndexedPrimitive(pDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
}
}
if(cD3D.Color2)
{
if(m_Stride==36 || m_Stride==32)
{
if(cD3D.Color2) pDevice->SetRenderState(D3DRS_LIGHTING, false);
if(cD3D.Color2) pDevice->SetRenderState(D3DRS_ZENABLE, true);
if(cD3D.Color2) pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
if(cD3D.Color2==1){pDevice->SetTexture(0, aRed);}
if(cD3D.Color2==2){pDevice->SetTexture(0, aYellow);}
if(cD3D.Color2==3){pDevice->SetTexture(0, aOrange);}
if(cD3D.Color2==4){pDevice->SetTexture(0, aGreen);}
if(cD3D.Color2==5){pDevice->SetTexture(0, aBlue);}
if(cD3D.Color2==6){pDevice->SetTexture(0, aPurple);}
if(cD3D.Color2==7){pDevice->SetTexture(0, aPink);}
if(cD3D.Color2==8){pDevice->SetTexture(0, aBlack);}
if(cD3D.Color2==9){pDevice->SetTexture(0, aGrey);}
if(cD3D.Color2==10){pDevice->SetTexture(0, aCyan);}
}
}
if (cD3D.Crosshair==1)
{
int x = ( GetSystemMetrics( 0 ) / 2);
int y = ( GetSystemMetrics( 1 ) / 2);
D3DRECT rec = { x - 10, y, x + 10, y + 1};
D3DRECT rec2 = { x, y - 10, x + 1, y + 10};
pDevice->Clear(1, &rec, D3DCLEAR_TARGET, D3DCOLOR_ARGB(255, 255, 0, 0), 0, 0);
pDevice->Clear(1, &rec2, D3DCLEAR_TARGET, D3DCOLOR_ARGB(255, 255, 0, 0), 0, 0);
}
if (cD3D.Crosshair==2)
{
int x = ( GetSystemMetrics( 0 ) / 2);
int y = ( GetSystemMetrics( 1 ) / 2);
D3DRECT rec = { x - 10, y, x + 10, y + 1};
D3DRECT rec2 = { x, y - 10, x + 1, y + 10};
pDevice->Clear(1, &rec, D3DCLEAR_TARGET, D3DCOLOR_ARGB(255, 0, 255, 0), 0, 0);
pDevice->Clear(1, &rec2, D3DCLEAR_TARGET, D3DCOLOR_ARGB(255, 0, 255, 0), 0, 0);
}
if (cD3D.Crosshair==3)
{
int x = ( GetSystemMetrics( 0 ) / 2);
int y = ( GetSystemMetrics( 1 ) / 2);
D3DRECT rec = { x - 10, y, x + 10, y + 1};
D3DRECT rec2 = { x, y - 10, x + 1, y + 10};
pDevice->Clear(1, &rec, D3DCLEAR_TARGET, D3DCOLOR_ARGB(255, 0, 0, 255), 0, 0);
pDevice->Clear(1, &rec2, D3DCLEAR_TARGET, D3DCOLOR_ARGB(255, 0, 0, 255), 0, 0);
}
if(cD3D.WallHack)
{
#define Stride5 40
if(m_Stride==Stride5)
{
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
}
}
if (cD3D.Fullbright==1)
{
pDevice->SetRenderState(D3DRS_LIGHTING, false);
pDevice->SetRenderState(D3DRS_AMBIENT,D3DCOLOR_ARGB(255, 255,255,255));
}
if (cD3D.WallHack==1)
{
if(m_Stride == 36)
{
pDevice->SetRenderState(D3DRS_ZENABLE,false);
}
}
}
_asm popad;
return pDrawIndexedPrimitive(pDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
}
D3DXMATRIX projection, view, world, identity;
D3DXVECTOR3 *GetScreenCoordFromWorld( IDirect3DDevice9 *pDevice, D3DXVECTOR3 &vScreenCoord, D3DXVECTOR3 vWorldLocation )
{
if( !pDevice ) return NULL;
D3DVIEWPORT9 viewPort;
D3DXVECTOR3 vOrthoLocation;
D3DXMATRIX world, identity;
pDevice->GetTransform(D3DTS_VIEW,&p_Matrix->View);
pDevice->GetTransform(D3DTS_PROJECTION,&p_Matrix->Project);
pDevice->GetViewport(&viewPort);
D3DXMatrixIdentity( &identity );
D3DXVec3Project(&vScreenCoord,&vWorldLocation,&viewPort,&p_Matrix->Project,&p_Matrix->View,&identity);
if(vScreenCoord.z < 1)
{
return &vScreenCoord;
}
return NULL;
}
VOID EspHacks(LPDIRECT3DDEVICE9 pDevice)
{
DWORD dwPlayerPtr = *(DWORD*)ADR_PlayerPointer;
if ( dwPlayerPtr != 0 )
{
for (INT MaxPlayer = 0; MaxPlayer < 32; MaxPlayer++)
{
D3DXVECTOR3 PlayerView(p_Player->pGlobal[MaxPlayer]->ViewX,p_Player->pGlobal[MaxPlayer]->ViewY,p_Player->pGlobal[MaxPlayer]->ViewZ),EspView;
if(GetScreenCoordFromWorld(pDevice,EspView,PlayerView))
{
if ( GetGlobalInfo(MaxPlayer)->Health > 0 )
{
if ( p_Player->pGlobal[MaxPlayer]->ViewX != 0 && p_Player->pGlobal[MaxPlayer]->ViewZ != 0 )
{
if ( cEsp.CH_EspTeam )
{
char chTeam[100];
if ( GetGlobalInfo(MaxPlayer)->Team == 1 )
sprintf(chTeam,"<= Team: N.I.U =>");
else if ( GetGlobalInfo(MaxPlayer)->Team == 0 )
sprintf(chTeam,"<= Team: Derberan =>");
UDBase.DrawGameTextPixelFlag(EspView.x,EspView.y,Cyan,DT_CENTER,chTeam);
EspView.y += 12;
}
if ( cEsp.CH_EspPremium )
{
char chPremium[100];
if ( GetGlobalInfo(MaxPlayer)->Premium == 0 )
sprintf(chPremium,"<= Premium: Free =>");
else if ( GetGlobalInfo(MaxPlayer)->Premium == 1 )
sprintf(chPremium,"<= Premium: Bronce =>");
else if ( GetGlobalInfo(MaxPlayer)->Premium == 2 )
sprintf(chPremium,"<= Premium: Silver =>");
else if ( GetGlobalInfo(MaxPlayer)->Premium == 3 )
sprintf(chPremium,"<= Premium: Gold =>");
else if ( GetGlobalInfo(MaxPlayer)->Premium == 4 )
sprintf(chPremium,"<= Premium: Platinum =>");
UDBase.DrawGameTextPixelFlag(EspView.x,EspView.y,Green,DT_CENTER,chPremium);
EspView.y += 12;
}
if ( cEsp.CH_EspHealth )
{
char chHealth[100];
sprintf(chHealth,"<= Health: %d =>",GetGlobalInfo(MaxPlayer)->Health/10);
UDBase.DrawGameTextPixelFlag(EspView.x,EspView.y,Red,DT_CENTER,chHealth);
EspView.y += 12;
}
if ( cEsp.CH_EspPing )
{
char chPing[100];
sprintf(chPing,"<= Ping: %i =>",GetGlobalInfo(MaxPlayer)->Ping);
UDBase.DrawGameTextPixelFlag(EspView.x,EspView.y,Orange,DT_CENTER,chPing);
EspView.y += 12;
}
if ( cEsp.CH_EspIp )
{
char chIp[100];
sprintf(chIp,"<= Ip: %s =>",GetGlobalInfo(MaxPlayer)->Ip);
UDBase.DrawGameTextPixelFlag(EspView.x,EspView.y,Blue,DT_CENTER,chIp);
EspView.y += 12;
}
if ( cEsp.CH_EspName )
{
char chTeam[100];
sprintf(chTeam,"<= Name: %s =>",GetGlobalInfo(MaxPlayer)->Name);
UDBase.DrawGameTextPixelFlag(EspView.x,EspView.y,Yellow,DT_CENTER,chTeam);
EspView.y += 12;
}
if ( cEsp.CH_EspFlags )
{
char chFlags[100];
sprintf(chFlags,"<= Flags: %i =>",GetGlobalInfo(MaxPlayer)->Flags);
UDBase.DrawGameTextPixelFlag(EspView.x,EspView.y,Green,DT_CENTER,chFlags);
EspView.y += 12;
}
if ( cEsp.CH_EspKills )
{
char chKills[100];
sprintf(chKills,"<= Kills: %i =>",GetGlobalInfo(MaxPlayer)->Kills);
UDBase.DrawGameTextPixelFlag(EspView.x,EspView.y,Red,DT_CENTER,chKills);
EspView.y += 12;
}
if ( cEsp.CH_EspDeaths )
{
char chDeaths[100];
sprintf(chDeaths,"<= Deaths: %i =>",GetGlobalInfo(MaxPlayer)->Deaths);
UDBase.DrawGameTextPixelFlag(EspView.x,EspView.y,Blue,DT_CENTER,chDeaths);
EspView.y += 12;
}
if ( cEsp.CH_EspClass )
{
char chClass[100];
switch ( GetGlobalInfo(MaxPlayer)->Class )
{
case 0: sprintf(chClass,"<= Class: Enginer =>"); break;
case 1: sprintf(chClass,"<= Class: Medic =>"); break;
case 2: sprintf(chClass,"<= Class: Sniper =>"); break;
case 3: sprintf(chClass,"<= Class: Assault =>"); break;
case 4: sprintf(chClass,"<= Class: Heavy =>"); break;
}
UDBase.DrawGameTextPixelFlag(EspView.x,EspView.y,Orange,DT_CENTER,chClass);
EspView.y += 12;
}
if(cEsp.CH_EspBoxes)
{
UDBase.DrawBox((int)(EspView.x),(int)(EspView.y+10),170,35,Green,Orange,pDevice);
}
}
}
}
}
}
}
//float GetDistanceA(CPlayer* Local, CPlayer* Player)
//{
// float angle[3];
//
// angle[0] = Player->pos1 - Local->pos1;
// angle[1] = Player->pos2 - Local->pos2;
// angle[2] = Player->pos3 - Local->pos3;
//
// return sqrt(angle[0]*angle[0] + angle[1]*angle[1] + angle[2]*angle[2]);
//}
HRESULT WINAPI myPresent ( LPDIRECT3DDEVICE9 pDevice, CONST RECT* pSourceRect,CONST RECT* pDestRect,HWND hDestWindowOverride,CONST RGNDATA* pDirtyRegion)
{
BOOL InitAimbot = FALSE;
if( !InitPresent )
{
Init( pDevice );
}
if( InitAimbot == FALSE )
{
p_Local = (CLocal*)*(DWORD*)(ADR_ViewAngels);
InitAimbot = TRUE;
}else if ( InitAimbot == TRUE )
{
if ( cAimbot.CH_AimBot || cAimbot.CH_AimDistance || cAimbot.CH_AimEnemy || cAimbot.CH_AimKey || cAimbot.CH_AimType )
{
cAimbot.CH_AimDistance = 3;
AimbotHacks();
}
}
EspHacks(pDevice);
UDBase.MenuNav();
UDBase.DrawText(1,1,0x00000000,"");
UDBase.DrawMenu( " WrUndCo D3D Engine ", pDevice );
xMenu.MenColor = 1;
if(memcmp((VOID*)_GetVTable->ID(82),(PBYTE)"\x8B\xFF",2)==0)
{
pDrawIndexedPrimitive = (oDrawIndexedPrimitive)WriteDetourJMP(DETOUR_TYPE_JMP_JMP_SHORT,(DWORD)myDrawIndexedPrimitive,(DWORD)_GetVTable->ID(82));
}
return pPresent(pDevice, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);
}
int Playerxhacks(void)
{
return 0;
}
int Serverxhacks(void)
{
if (xMenu.MenColor == 0)
{
UDBase.SetColor( C_BOX, D3DCOLOR_ARGB( 255, 0,220,0 ) );
UDBase.SetColor( C_GROUP, D3DCOLOR_ARGB( 255, 0,220,0 ) );
UDBase.SetColor( C_ACTIVATED, D3DCOLOR_ARGB( 250,/*123*/220, /*133*/0, /*133*/0 ) ); //GRÜN
}
if (xMenu.MenColor == 1)
{
UDBase.SetColor( C_BOX, D3DCOLOR_ARGB( 255, 0,220,0 ) );
UDBase.SetColor( C_GROUP, D3DCOLOR_ARGB( 255, 0,220,0 ) );
UDBase.SetColor( C_ACTIVATED, D3DCOLOR_ARGB( 250,/*123*/220, /*133*/0, /*133*/0 ) ); //GRÜN
}
if (xMenu.MenColor == 2)
{
UDBase.SetColor( C_BOX, D3DCOLOR_ARGB( 250,220,0,0 ) );
UDBase.SetColor( C_GROUP, D3DCOLOR_ARGB( 250,220,0,0 ) );
UDBase.SetColor( C_ACTIVATED, D3DCOLOR_ARGB( 250, 0, 220, 0 ) ); //BLAU
}
if (xMenu.MenColor == 3)
{
UDBase.SetColor( C_BOX, D3DCOLOR_ARGB( 250,0,191,255 ) );
UDBase.SetColor( C_GROUP, D3DCOLOR_ARGB( 250,0,191,255 ) );
UDBase.SetColor( C_ACTIVATED, D3DCOLOR_ARGB( 250, /*123*/0, /*133*/220, /*133*/0 ) ); //ROT
}
if (xMenu.MenColor == 0)
{
UDBase.SetColor( C_BOX, D3DCOLOR_ARGB( 250,0,191,255 ) );
UDBase.SetColor( C_GROUP, D3DCOLOR_ARGB( 250,0,191,255 ) );
UDBase.SetColor( C_ACTIVATED, D3DCOLOR_ARGB( 250, /*123*/0, /*133*/220, /*133*/0 ) ); //ROT
}
if (xMenu.BackColor == 7)
{
UDBase.SetColor( C_BOX_BORDER, D3DCOLOR_ARGB( 255,0,0,0 ) );//black
}
if (xMenu.BackColor == 1)
{
UDBase.SetColor( C_BOX_BORDER, D3DCOLOR_ARGB( 150, 51, 51, 51 ) );//Grey
}
if (xMenu.BackColor == 2)
{
UDBase.SetColor( C_BOX_BORDER, D3DCOLOR_ARGB( 40, 220, 0, 0 ) );//Red
}
if (xMenu.BackColor == 3)
{
UDBase.SetColor( C_BOX_BORDER, D3DCOLOR_ARGB( 255,0,0,0 ) );//black
}
if (xMenu.BackColor == 4)
{
UDBase.SetColor( C_BOX_BORDER, D3DCOLOR_ARGB( 75,255,192,203 ) );//pink
}
if (xMenu.BackColor == 5)
{
UDBase.SetColor( C_BOX_BORDER, D3DCOLOR_ARGB( 40, 66, 180, 210 ) );//lightblue
}
if (xMenu.BackColor == 0)
{
UDBase.SetColor( C_BOX_BORDER, D3DCOLOR_ARGB( 0, 128, 128, 128 ) );//transparent
}
if (xMenu.BackColor == 7)
{
UDBase.SetColor( C_BOX_BORDER, D3DCOLOR_ARGB( 175,000,000,000 ) );//transparent
}
if(xMenu.ResetMe == 1)
{
UDBase.DisableAllMenuItems();
}
if(xMenu.TurnPanic == 1)
{
UDBase.DisableAllMenuItems();
}
else
if((GetAsyncKeyState(VK_DELETE)))
{
UDBase.DisableAllMenuItems();
}
if(xMenu.ExWr==1)
{
ExitProcess(0);
}
return 0;
}
VOID HackMain()
{
for ( ; ; )
{
MyPlayerH();
MySeverH();
Serverxhacks();
Sleep(1);
}
}
VOID WINAPI DirectX9Main()
{
DWORD dwD3D9;
do
{
dwD3D9 = (DWORD)GetModuleHandleA("D3D9.DLL");
}
while(!dwD3D9);//DRAW
pDrawIndexedPrimitive = (oDrawIndexedPrimitive)WriteDetourJMP(DETOUR_TYPE_JMP_JMP_SHORT,(DWORD)myDrawIndexedPrimitive,(DWORD)_GetVTable->ID(82));
pPresent = (oPresent)WriteDetourXXX(DETOUR_TYPE_E9,(DWORD)myPresent,(DWORD)_GetVTable->ID(17),5);
pReset = (oReset)WriteDetourXXX(DETOUR_TYPE_E9,(DWORD)myReset,(DWORD)_GetVTable->ID(16),5);
}
HRESULT WINAPI DllMain(HMODULE dwModule,DWORD dwReason,LPVOID dwReserved)
{
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
//ARevPatch(dwModule);
ModPatch(dwModule);
CreateThread(0,0,(LPTHREAD_START_ROUTINE)DirectX9Main,0,0,0);
CreateThread(0,0,(LPTHREAD_START_ROUTINE)HackMain,0,0,0);
break;
}
return TRUE;
}