Menu.h
Code:
#ifndef _D3DMENU_H
#define _D3DMENU_H
#include "d3dbase.h"
// Setting Color
#define DARKORANGE D3DCOLOR_ARGB(255,255,127,000)
#define TextWhite D3DCOLOR_ARGB(255,255,255,255)
#define TextRed D3DCOLOR_ARGB(255,255,0,0)
#define TextGreen D3DCOLOR_ARGB(255,0,255,0)
#define TextBlue D3DCOLOR_ARGB(255,0,0,255)
#define TextBlack D3DCOLOR_ARGB(255,0,0,0)
#define TextPurple D3DCOLOR_ARGB(255,125,0,255)
#define TextGrey D3DCOLOR_ARGB(255,128,128,128)
#define TextYellow D3DCOLOR_ARGB(255,255,255,0)
#define TextOrange D3DCOLOR_ARGB(255,255,140,0)
#define TextCyan D3DCOLOR_ARGB(255,0,139,200)
#define TextPink D3DCOLOR_ARGB(255,255,192,203)
// Menu Color
#define TextBorder D3DCOLOR_ARGB(120,128,128,128)
#define TextFound D3DCOLOR_ARGB(255,0,139,200)
#ifndef D3DFONT_RIGHT
#define D3DFONT_RIGHT 0x0008
#endif
#ifndef D3DFONT_SHADOW
#define D3DFONT_SHADOW 0x0010
#endif
#define MENUGROUP 1
#define MENUTEXT 2
#define MENUITEM 3
#define MENUGROUP1 4
#define MCOLOR_TITLE TextWhite
#define MCOLOR_CURRENT TextRed
#define MCOLOR_GROUP TextCyan
#define MCOLOR_TEXT TextWhite
#define MCOLOR_OFF TextWhite
#define MCOLOR_ON TextGreen
typedef struct {
int typ; // type of menuline, folder, item
char *txt; // text to show
char **opt; // array of options
int *var; // variable containing current status
int maxval; // maximumvalue, normally 1 gives 0=off 1=on
} tMENU;
class D3DMenu
{
public:
D3DMenu(char *Name=0, int maxentries=130, int maxwidth=160)
{
title=Name;
maxitems=maxentries;
cur=noitems=visible=0;
x=y=15;
totwidth=ofs=maxwidth;
height=15;
titleheight=totheight=height+4;
col_title =MCOLOR_TITLE;
col_group =MCOLOR_GROUP;
col_text =MCOLOR_TEXT;
col_off =MCOLOR_OFF;
col_on =MCOLOR_ON;
col_current=MCOLOR_CURRENT;
MENU=(tMENU **)malloc(4*maxitems);
for (int i=0; i<maxitems; i++) MENU[i]=(tMENU *)malloc(sizeof(tMENU));
}
~D3DMenu() {
for (int i=0; i<maxitems; i++) free(MENU[i]);
free(MENU);
}
DWORD col_title;
DWORD col_group;
DWORD col_group1;
DWORD col_text;
DWORD col_off;
DWORD col_on;
DWORD col_current;
int x,y; // current position of the menu
int totwidth,totheight; // total width and height of menu
int height; // height of 1 menuline
int titleheight; // some extra height for a title
int ofs; // offset for option text
// menu vars
char *title; // some menu title
int cur; // current highlighted menuitem
int noitems; // number of menu items
int visible; // 1 = menu is visible
tMENU **MENU;
void AddItem (char *txt, int *var, char **opt, int maxvalue=2, int typ=MENUITEM);
void AddGroup (char *txt, int *var, char **opt, int maxvalue=2);
void AddGroup1(char *txt, int *var, char **opt, int maxvalue=2);
void AddText (char *txt, char *opt="");
void Show (CD3DFont *pFont);
void Nav (void);
private:
int maxitems;
};
#endif
Code:
//[HackShield]
#define ADR_HS 0x006A7370
//[Da Controllare quando Li Metto]
#define OFS_NORECOIL1 0x0000001C
#define OFS_NORECOIL2 0x00000020
#define OFS_STAMINA 0x00000028
//[OffSet]
#define OFS_X 0x00000258
#define OFS_Y 0x00000260
#define OFS_Z 0x0000025C
#define OFS_NFD 0x00000320
#define OFS_PREMIUM 0x0000041C
#define OFS_SPECTATOR 0x00467368
#define OFS_SUPERMASTER 0x000CC1A8
#define OFS_SLOT5 0x000D1204
#define OFS_WEAPON 0x000000A8
#define OFS_LEVEL 0x000DF628
//[Memory]
#define ADR_SERVERBASE 0xBE2A30
#define Player_Pointer 0x00C375E0
#define ADR_BasePointer 0x00C375E0
#define ADR_Speed 0x009B8EFC
#define ADR_SpeedRoll 0x009D4E18
#define ADR_FastMedic 0xB183F4
#define ADR_FastRepair 0xB183F0
#define ADR_FastAmmo 0x00B183F0
#define ADR_FastFlag 0xB183FC
#define ADR_NoBounds1 0xB493BC
#define ADR_NoBounds2 0xB493B8
#define ADR_QuickSpawn1 0xB15E28
#define ADR_QuickSpawn2 0xB97CB
#define ADR_Scope 0x429494
#define ADR_NoWater 0xA3A0D8
#define ADR_TrigerBot 0xA1A410
#define ADR_GmAlert 0x00A44372
#define ADR_AntiAfk 0x005BAFE0
#define ADR_Level 0x000DF628
#define ADR_ImDrunk 0xB6D604
//[ASM]
#define ADR_AutoAmmo 0x0069B347
#define ADR_AutoMedic 0x0069B400
#define ADR_NoSpread 0x006990BA
#define ADR_NoDelay 0x006A3564
#define ADR_RapidFire 0x0044F3CF
#define ADR_Uammo 0x0068F86F
#define ADR_BoneShot1 0x0047BC59
#define ADR_BoneShot2 0x0047BC5F
#define ADR_Invisible 0x0069218E
#define ADR_Prone 0x006942B0
#define ADR_STW 0x007018B0
#define ADR_WTW 0x006C20F7
#define ADR_Bullets 0x00698FD2
#define ADR_AntiKick 0x004BD53F
#define ADR_MineView1 0x00000000
#define ADR_MineView2 0x00000000
#define ADR_AntiMine 0x0049610C
#define ADR_SniperCrossHairs 0xB18417
#define ADR_OPK1 0x0068570C
#define ADR_OPK2 0x00685716
#define ADR_OPK3 0x00000000
#define ADR_SVP 0x006856FE
#define ADR_OxyGene 0x006955F0
#define ADR_PremCross_1 0x00640A77
#define ADR_Escalator_1 0x006C3147
#define ADR_Escalator_2 0x006C3284
#define ADR_NoRestrictions 0x004214E4
#define ADR_QuickPlant 0x006A08E2
#define ADR_QuickDefuse 0x006A03B7
#define ADR_RadarGPS 0x654A20
#define ADR_RoomRestrictions 0x000CBD54
#define ADR_ARTILERY1 0x0069DB57
#define ADR_ARTILERY2 0x006649D9
#define ADR_ARTILERY3 0x00664A35
#define ADR_ARTILERY4 0x00664774
#define ADR_ARTILERY5 0x006414D1
#define ADR_ARTILERY6 0x00664937
//[Vehicle]
#define ADR_AutoRepair 0x0044FA73
#define ADR_VehicleNoDamage 0x0044E678
#define ADR_VehicleInvisible 0x00454850
#define ADR_VehicleDelay 0x0044FA2D
#define ADR_VehicleCrazy_1 0x71D16B
#define ADR_VehicleCrazy_2 0x4D309D
#define ADR_VehicleCrazy_3 0x71D175
#define ADR_VehicleCrazy_4 0x71D196
#define ADR_VehNoRestrictions1 0x4C4FBC
#define ADR_VehNoRestrictions2 0x4C54F4
#define ADR_VehNoRestrictions3 0x4C571E
#define ADR_VehNoRestrictions4 0x4C5645
#define ADR_VehNoRestrictions5 0x4C5591
//[ User ]
#define ADR_NAMEBASE 0xC117B4
#define ADR_D3DIP 0xC114C4
#define OFS_PLAYERSIZE 0x001A50
#define ADR_FakeKick 0x646899
#define ADR_TakeBase1 0x4C0B27
#define ADR_TakeBase2 0xAF7E4C
/*
//=================================
if(CH_TakeFlag==1){
pTakeBase.PatchOnce ((void*)"\x90\x90",2);
*(DWORD*)(ADR_TakeBase2) = (CH_TakeFlag -1);
}
DWORD wSlot = 0;
_declspec(naked) void wlFakeKick()
{
__asm
{
mov ecx, wSlot
}
}
if(CH_FakeKick){
wSlot = (DWORD)(CH_Userfind-1);
DetourFunc((BYTE *) ADR_FakeKick,(BYTE *)wlFakeKick,6);
}
004E6B1F /0F84 88000000 je 004E6BAD
004EAF8F /0F85 7E030000 jnz 004EB313
Flash Mines
4E2BBF
FLASHMINE = 83 C4 04 84 C0 74 ?? ?? ?? B9
FLASHBANG = 84 C0 0F 84 ?? ?? ?? ?? 6A 00 6A 00 B9
// Test
#define ADR_AntiM141 0x4E2E2E
#define ADR_AntiM142 0x4E2F0C
004E2E2E /0F85 D8000000 jnz 004E2F0C
004C3FE2 /0F85 B9000000 jnz 004C40A1
//*******************************************************
if(CH_Test==1){Mine = (ADR_AntiM142);
DetourFunc((BYTE *)ADR_AntiM141,(BYTE *)anti_mine,6);}
if(CH_FlashD==1){
Flash = (0x4E23D3);
DetourFunc((BYTE *)0x4E236A,(BYTE *)anti_Flash,2);}
//004E2E2E change to jmp 004E2F0C
// chnage 0063B1CF address to push 9B49D4
// Memcpy((LPBYTE)0x63B1CF ,(PBYTE)"\x68\xD4\x49\x9B\x00",5);
#define STR_MineColors ((m_Stride == 44 && nNumVertices == 200 && nPrimitiveCount == 353 || m_Stride == 44 && nNumVertices == 162 && nPrimitiveCount == 310 || m_Stride == 44 && nNumVertices == 101 && nPrimitiveCount == 167)) + ((m_Stride == 44 && nNumVertices == 201 && nPrimitiveCount == 310 || m_Stride == 44 && nNumVertices == 142 && nPrimitiveCount == 211 || m_Stride ==44 && nNumVertices == 103 && nPrimitiveCount == 170))
#define Smoke ((m_Stride == 24 && nNumVertices == 6 && nPrimitiveCount == 4 || m_Stride == 24 && nNumVertices == 80 && nPrimitiveCount == 40 ))
*/
Code:
#define WIN32_LEAN_AND_MEAN
#include "Menu.h"
void D3DMenu::AddItem(char *txt, int *var, char **opt, int maxval, int typ)
{
if (noitems>=(maxitems-3)) return;
MENU[noitems]->typ=typ;
MENU[noitems]->txt=txt;
MENU[noitems]->opt=opt;
MENU[noitems]->var=var;
MENU[noitems]->maxval=maxval;
noitems++;
totheight=(noitems*height)+titleheight;
}
void D3DMenu::AddGroup(char *txt, int *var, char **opt, int maxval)
{
AddItem(txt, var, opt, maxval, MENUGROUP);
}
void D3DMenu::AddGroup1(char *txt, int *var, char **opt, int maxval)
{
AddItem(txt, var, opt, maxval, MENUGROUP1);
}
void D3DMenu::AddText(char *txt, char *opt)
{
AddItem(txt,0,(char **)opt,0,MENUTEXT);
}
void D3DMenu::Show(CD3DFont *pFont)
{
int i,val,cy;
DWORD color;
if (!visible) return;
cy=y;
if (title) {
pFont->DrawText((float)(x+totwidth/2), (float)cy-3, col_title,title,D3DFONT_SHADOW|D3DFONT_CENTERED);
cy+=titleheight;
}
for (i=0; i<noitems; i++) {
if (MENU[i]->typ==MENUTEXT) {
pFont->DrawText((float)x, (float)cy, col_on,MENU[i]->txt,D3DFONT_SHADOW);
if (MENU[i]->opt) {
pFont->DrawText((float)(x+ofs), (float)cy, col_on,(char *)MENU[i]->opt, D3DFONT_RIGHT|D3DFONT_SHADOW);
}
} else {
val=(MENU[i]->var)?(*MENU[i]->var):0;
if (i==cur)
color=col_current;
else if (MENU[i]->typ==MENUGROUP)
color=col_group;
else if (MENU[i]->typ==MENUGROUP1)
color=(val)?col_on:col_off;
else
color=(val)?col_on:col_off;
pFont->DrawText((float)x, (float)cy, color,MENU[i]->txt,D3DFONT_SHADOW);
if (MENU[i]->opt) {
pFont->DrawText((float)(x+ofs), (float)cy, color,(char *)MENU[i]->opt[val],D3DFONT_RIGHT|D3DFONT_SHADOW);
}
}
cy+=height;
}
}
void DrawText(char *text, int x, int y, DWORD color,CD3DFont *font)
{
if (font==0) font=pFont;
if (!text) return;
if (font==0) return;
font->DrawText((float)x , (float)y , D3DCOLOR_ARGB( 255, 0, 0, 0 ), text);
font->DrawText((float)x , (float)y , D3DCOLOR_ARGB( 255, 0, 0, 0 ), text);
font->DrawText((float)x , (float)y , D3DCOLOR_ARGB( 255, 0, 0, 0 ), text);
font->DrawText((float)x , (float)y , D3DCOLOR_ARGB( 255, 0, 0, 0 ), text);
font->DrawText((float)x , (float)y , color, text);
}
void D3DMenu::Nav(void)
{
if (GetAsyncKeyState(VK_INSERT)&1) visible=(!visible);
if (!visible) return;
if (visible)
{
if (GetAsyncKeyState(VK_UP)&1) {
do {
cur--;
if (cur<0) cur=noitems-1;
} while (MENU[cur]->typ==MENUTEXT);
}
else if (GetAsyncKeyState(VK_DOWN)&1) {
do {
cur++;
if (cur==noitems) cur=0;
} while (MENU[cur]->typ==MENUTEXT);
}
else if (MENU[cur]->var) {
int dir=0;
if (GetAsyncKeyState(VK_LEFT )&1 && *MENU[cur]->var > 0 ) dir=-1;
if (GetAsyncKeyState(VK_RIGHT)&1 && *MENU[cur]->var < (MENU[cur]->maxval-1)) dir=1;
if (dir) {
*MENU[cur]->var += dir;
if (MENU[cur]->typ==MENUGROUP) noitems=0;
if (MENU[cur]->typ==MENUGROUP1) noitems=0;
}
}
}
}
Code:
#ifdef _M_IX86
#include "d3dbase.h"
#include "Menu.h"
#include "bypass.h"
#include "Address.h"
#include "device.h"
#include "WarHack.h"
#include "d3dfont8.cpp"
#include "Time.h"
#include "Guid.h"
#include "Times.h"
#include "log.h"
#include "detours.h"
#include "Support.h"
#include "d3desp.h"
#include "Choke.h"
// Fps
float fFps = NULL;
float fLastTickCount = NULL;
float fCurrentTickCount;
char cFrameRate[50] = {NULL};
UINT m_Stride;
CD3DFont *pFont=NULL;
int Color = true;
char usertext[20]="Select User";
char userip[20]="No IP";
extern char *GUIDID;
// GUID
int iHACKS_enabled=0;
int sHACKS_enabled=0;
int bpass_enabled=0;
int Eshowmenu=0;
int SettingCheck=0;
// Bool True False
bool firstrun = true;
bool runthread = true;
bool CheckG = true;
bool Check = true;
bool Check2 = true;
int GUIDCHECK(void){
strcpy(Username,IsVIP2());
strcpy(Group,IsVIP3());
if (vipcheck("warrock")!=0) {
return 0;}
if (strcmp(szResult,szPredict)==0 && strlen(szResult)>=16){
iHACKS_enabled=209;
sHACKS_enabled=1;
Eshowmenu=432;}
return 0;}
// D3D int
int CH_Chams=0;
int CH_CHAMS=0;
int CH_CHAMS2=0;
int CH_FullBright=0;
int CH_WALLS=0;
int CH_WireFrame=0;
int CH_GlassWall=0;
int CH_NoFog=0;
int CH_MineColor=0;
int CH_HotKeys=0;
int CH_NameEsp=0;
int CH_IpEsp=0;
int CH_BoxEsp=0;
int CH_DistanceEsp=0;
int CH_WeaponEsp=0;
int CH_EspEnemyOnly=0;
int CH_Smoke=0;
int CH_PlayerTele=0;
int CH_Telekill=0;
int CH_CHAMSEL=0;
int CH_PanicGame=0;
int CH_Scanning=0;
int CH_SettingV=0;
int drawfps;
// = Test
int CH_AllServer =0;
int CH_FakeClan =0;
// = Menu
float Screenx;
char *GetFrameRate( ){
fCurrentTickCount = clock() * 0.001f;
++fFps;
if((fCurrentTickCount - fLastTickCount) > 1.0f){
fLastTickCount = fCurrentTickCount;
sprintf( cFrameRate, " %d ", int( fFps ) );
fFps = 0;}
return cFrameRate;}
// Menu Int
int Mvisible1= 0;
int Mvisible2= 0;
int Mvisible3= 0;
int Mvisible4= 0;
int Mvisible5= 0;
int Mvisible6= 0;
int Mvisible7= 0;
int Mvisible8= 0;
int Mvisible9= 0;
int Mvisible10= 0;
int Mvisible11= 0;
int Mvisible12= 0;
// none standard options
char *opt_Grp [] = { "+","-" };
char *opt_OFFON [] = { "Off","On" };
char *sSpeed [] = { "Off","x1.2","x2","x3","x4","x5","x6","x7","x8","x9","x10"};
char *sRolling [] = { "Off","x1","x2","x3","x4","x5","x6","x7","x8","x9","x10" };
char *sMineColor [] = { "Off","Green","Red","White","Black"};
char *sChams [] = { "Off","Cyan","Red","Blue","Green","White","Black","Purple","Yellow","White" };
char *sWallHack [] = { "Off","Ground","Asus"};
char *sStam [] = { "Off","Stealth","Full"};
char *sRapidFire [] = { "Off","Famas","Xm8","Tmp9","Scorpions","MiniGun" };
char *sPremium [] = { "Off","Bronze","Silver","Gold","Platium"};
char *sCrossHairs [] = { "Off","1","2","3","4"};
char *sUserfinder [] = { "Off","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" };
char *sSP10 [] = { "Off","5%","10%" };
char *sTeleport [] = { "Off","Static"};
char *sWalls [] = { "Off","Cyan","Red","Blue","Green","White","Black","Purple","Yellow","Pink","Grey"};
char *sPx [] = { "Off","Flash","M14 Mine","Ammo Box","MedicBox","Adrenaline","Stamina"};
char *sBullet [] = { "Off","x2","x3","x4","x5","x100"};
char *sHeadShot [] = { "Off","Head"};
char *sLevel [] = { "Off","75","85","95","100"};
char *sD3DESP [] = { "Off","All","Enemy"};
char *sHealth [] = { "Off","Bar","Normal"};
char *sPing [] = { "Off","1","2","3"};
char *sKinda [] = { "Off","Solid"};
char *sSelector [] = { "Off","Select"};
char *sHeight [] = { "Off","500","1000","1500","2000","2500","3000"};
char *sTakerFlag [] = { "Off","1","2","3","4","5","6","7","8","9","10","11"};
D3DCOLOR WarESP;
char szdistance[100];
char szhealth[100];
D3DXVECTOR3 *GetScreenCoordFromWorld( IDirect3DDevice8 *pDevice, D3DXVECTOR3 &vScreenCoord, D3DXVECTOR3 vWorldLocation )
{
if( !pDevice ) return NULL;
D3DVIEWPORT8 viewPort;
D3DXVECTOR3 vOrthoLocation;
D3DXMATRIX projection, view, world, identity;
pDevice->GetTransform( D3DTS_VIEW, &view );
pDevice->GetTransform( D3DTS_PROJECTION, &projection );
pDevice->GetTransform( D3DTS_WORLD, &world );
pDevice->GetViewport( &viewPort );
D3DXMatrixIdentity( &identity );
D3DXVec3Project( &vScreenCoord, &vWorldLocation, &viewPort, &projection, &view, &identity );
if(vScreenCoord.z < 1)
{
return &vScreenCoord;
}
return NULL;
}
float GetDistanceA(CPlayer* Local, CPlayer* Player)
{
float angle[3];
angle[0] = Player->pos.x - Local->pos.x;
angle[1] = Player->pos.y - Local->pos.y;
angle[2] = Player->pos.z - Local->pos.z;
return sqrt(angle[0]*angle[0] + angle[1]*angle[1] + angle[2]*angle[2]);
}
D3DMenu *pMenu=NULL;
CD3DFont *abc1234 = NULL;
void RebuildMenu(void)
{
{
pMenu->AddGroup("[D3D-Stuff]" , &Mvisible1, opt_Grp);
if (Mvisible1)
{
pMenu->AddGroup1("Chams" , &CH_CHAMSEL , sKinda,2);
if (CH_CHAMSEL)
{
pMenu->AddItem(" Color 1" , &CH_CHAMS2 , sChams,10);
pMenu->AddItem(" Color 2" , &CH_CHAMS , sChams,10);
}
pMenu->AddItem("Brightness" , &CH_FullBright , opt_OFFON);
pMenu->AddItem("Wall Color" , &CH_WALLS , sWalls,11);
pMenu->AddItem("WallHack" , &CH_GlassWall , opt_OFFON);
pMenu->AddItem("WireFrame" , &CH_WireFrame , opt_OFFON);
pMenu->AddItem("No Fog" , &CH_NoFog , opt_OFFON);
}
pMenu->AddGroup("[ESP/GPS/Info]" , &Mvisible3 , opt_Grp);
if (Mvisible3)
{
pMenu->AddGroup1("D3D ESP" , &CH_EspEnemyOnly , sD3DESP,3);
if (CH_EspEnemyOnly)
{
pMenu->AddItem(" Name ESP" , &CH_NameEsp , opt_OFFON);
pMenu->AddItem(" Health ESP" , &CH_HealthEsp , sHealth,3);
pMenu->AddItem(" IP ESP" , &CH_IpEsp , opt_OFFON);
pMenu->AddItem(" Weapon ESP" , &CH_WeaponEsp , opt_OFFON);
pMenu->AddItem(" Distance ESP" , &CH_DistanceEsp , opt_OFFON);
}
pMenu->AddItem("Radar GPS" , &CH_RadarGPS , opt_OFFON);
}
pMenu->AddGroup("[Player-Stuff]" , &Mvisible4 , opt_Grp);
if (Mvisible4)
{
pMenu->AddItem("Invisible " , &CH_Invisible , opt_OFFON);
pMenu->AddItem("WalkT.Wall" , &CH_WTW , opt_OFFON);
pMenu->AddItem("Stamina" , &CH_Stamina , sStam, 3);
pMenu->AddItem("Instant Spawn" , &CH_Spwan , opt_OFFON);
pMenu->AddItem("No Bounds" , &CH_Bounds , opt_OFFON);
pMenu->AddItem("No Water" , &CH_Water , opt_OFFON);
pMenu->AddItem("Speed" , &CH_Speed , sSpeed,11);
pMenu->AddItem("Speed Rolling" , &CH_RollSpeed , sRolling,11);
pMenu->AddItem("Fast A/H/F/R" , &CH_FastAll , opt_OFFON);
pMenu->AddItem("Prone CQC" , &CH_Prone , opt_OFFON);
pMenu->AddItem("Escalator" , &CH_Escalator , opt_OFFON);
pMenu->AddItem("Auto Medic" , &CH_AutoMedic , opt_OFFON);
pMenu->AddItem("Teleport" , &CH_Teleport , opt_OFFON);
pMenu->AddItem("SaveCoordinate" , &CH_Static , sTeleport,2);
pMenu->AddItem("NoFallDmg" , &CH_NoFallDamage , opt_OFFON);
pMenu->AddItem("SuperJump" , &CH_SuperJump , opt_OFFON);
pMenu->AddGroup1("SkyWalk" , &CH_Skywalk , sSelector);
if (CH_Skywalk)
{
pMenu->AddItem(" Heigth" , &CH_HSkywalk , sHeight,7);
}
}
pMenu->AddGroup("[Weapon-Stuff]" , &Mvisible5 , opt_Grp);
if (Mvisible5)
{
pMenu->AddItem("Scope" , &CH_Scope , opt_OFFON);
pMenu->AddItem("No Spread" , &CH_Spread , opt_OFFON);
pMenu->AddItem("No Recoil" , &CH_NoRecoil , opt_OFFON);
pMenu->AddItem("Trigger Bot" , &CH_Trigger , opt_OFFON);
pMenu->AddItem("Auto Ammo" , &CH_AutoAmmo , opt_OFFON);
pMenu->AddItem("Unl.Ammo" , &CH_UAmmo , opt_OFFON);
pMenu->AddItem("BoneShot" , &CH_Boneshot , sHeadShot,2);
pMenu->AddItem("Null Delay" , &CH_ZeroDelay , opt_OFFON);
pMenu->AddItem("Rapid Fire" , &CH_RapidFire , sRapidFire,6);
pMenu->AddItem("ShotT.Wall" , &CH_STW , opt_OFFON);
pMenu->AddItem("Sniper CrossHairs" , &CH_SniperCross , opt_OFFON);
pMenu->AddItem("Artillery" , &CH_Artilery , opt_OFFON);
pMenu->AddItem("Bullets" , &CH_Bullet , sBullet,6);
pMenu->AddItem("No Restrictions" , &CH_Restrictions , opt_OFFON);
}
pMenu->AddGroup("[PlayerControll]" , &Mvisible6 , opt_Grp);
if (Mvisible6)
{
pMenu->AddGroup1("User Finder" , &CH_Userfind , sUserfinder,33);
if (CH_Userfind)
{
pMenu->AddText(" Name :", usertext);
pMenu->AddText(" IP :", userip);
}
pMenu->AddItem("User Teleport" , &CH_PlayerTele , opt_OFFON);
pMenu->AddItem("Fake Kick" , &CH_FakeKick , opt_OFFON);
}
pMenu->AddGroup("[Vehicle-Stuff]" , &Mvisible7 , opt_Grp);
if (Mvisible7)
{
pMenu->AddItem("Vehicle Jump" , &CH_CrazyC , opt_OFFON);
pMenu->AddItem("Super Vehicle" , &CH_VehicleDelay , opt_OFFON);
pMenu->AddItem("Vehicle Invisible" , &CH_VehicleInv , opt_OFFON);
pMenu->AddItem("No Vehicle Damage" , &CH_VehicleDmg , opt_OFFON);
pMenu->AddItem("No Vehicle Restriction" , &CH_VehRestr , opt_OFFON);
pMenu->AddItem("Auto Repair" , &CH_AutoRepair , opt_OFFON);
}
pMenu->AddGroup("[Server-Stuff]" , &Mvisible8 , opt_Grp);
if (Mvisible8)
{
pMenu->AddItem("Super Master" , &CH_SuperMaster , opt_OFFON);
pMenu->AddItem("Set Visual Level" , &CH_Level , sLevel,5);
pMenu->AddItem("5Th Slots" , &CH_Slot , opt_OFFON);
pMenu->AddItem("Get Item Px" , &CH_Weapon , sPx,7);
pMenu->AddItem("Premium" , &CH_Premium , sPremium,5);
pMenu->AddItem("Spectator" , &CH_Spectator , opt_OFFON);
pMenu->AddItem("Gm Alert" , &CH_GMAlert , opt_OFFON);
pMenu->AddItem("Anti Kick" , &CH_AntiKick , opt_OFFON);
}
pMenu->AddGroup("[Misc-Stuff]" , &Mvisible10 , opt_Grp);
if (Mvisible10)
{
pMenu->AddItem("Premium CrossHair" , &CH_Premcross , sCrossHairs,5);
pMenu->AddItem("Quick Plant" , &CH_QuickDefuse , opt_OFFON);
pMenu->AddItem("Quick Defuse" , &CH_QuickPlant , opt_OFFON);
pMenu->AddItem("Anti Flash/m14" , &CH_AntiMine , opt_OFFON);
pMenu->AddItem("Mine View" , &CH_MineInfo , opt_OFFON);
pMenu->AddItem("Anti Afk" , &CH_AFK , opt_OFFON);
pMenu->AddItem("Crazy Land" , &CH_ImDrunk , opt_OFFON);
pMenu->AddItem("Room Name Filter" ,&CH_RoomRestrictions , opt_OFFON);
pMenu->AddItem("Unl.Oxygen" , &CH_Ossigene , opt_OFFON);
pMenu->AddItem("Vantage Point" , &CH_SVP , opt_OFFON);
pMenu->AddItem("OPK " , &CH_OPK , opt_OFFON);
pMenu->AddItem("TeleKill" , &CH_Telekill , opt_OFFON);
}
pMenu->AddGroup("[Test-Stuff]" , &Mvisible11 , opt_Grp);
if (Mvisible11)
{
// pMenu->AddItem("Capture Flag" , &CH_TakeFlag , opt_OFFON);
}
pMenu->AddGroup("[Menu-Setting]" , &Mvisible12 , opt_Grp);
if (Mvisible12)
{
pMenu->AddItem("HotKeys" , &CH_HotKeys , opt_OFFON);
}
}
}
void DrawBox( int x, int y, int w, int h, D3DCOLOR Color,LPDIRECT3DDEVICE8 pDevice)
{
struct Vertex {
float x,y,z,ht;
DWORD Color;
};
Vertex V[4];
V[0].Color = V[1].Color = V[2].Color = V[3].Color = Color;
V[0].z = V[1].z = V[2].z = V[3].z = 0.0f;
V[0].ht = V[1].ht = V[2].ht = V[3].ht = 0.0f;
V[0].x = V[1].x = (float)x;
V[0].y = V[2].y = (float)(y + h);
V[1].y = V[3].y = (float)y;
V[2].x = V[3].x = (float)(x + w);
pDevice->SetTexture(0, NULL);
pDevice->SetVertexShader(D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_TEX1);
pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,2,V,sizeof(Vertex));
}
void DrawBox1( LPDIRECT3DDEVICE8 pDevice , int x, int y, int w, int h, DWORD Color )
{
D3DRECT rec;
rec.x1 = x;
rec.x2 = x + w;
rec.y1 = y;
rec.y2 = y + h;
pDevice->Clear( 1, &rec, D3DCLEAR_TARGET, Color, 0, 0 );
}
void DrawRectangle(int x, int y, int w, int h, int s, DWORD Color, LPDIRECT3DDEVICE8 pDevice)
{
DrawBox1(pDevice, x, y, w, s, Color );
DrawBox1(pDevice, x, y, s, h, Color );
DrawBox1(pDevice, (x+w), y, s, h, Color );
DrawBox1(pDevice, x, (y+h), w+s, s, Color );
}
void DoMenu(LPDIRECT3DDEVICE8 pDevice){
if (Eshowmenu==0){
DrawBox (50,11, 290, 20, TextBorder ,pDevice);
DrawBox (50,35, 290, 72, TextBorder ,pDevice);
DrawRectangle(50,11, 290, 20, 1, TextFound ,pDevice);
DrawRectangle(50,35, 290, 72,1, TextFound ,pDevice);
pFont->DrawText(40+80, 13+5, TextGreen, "Unable To Verify Setting", D3DFONT_SHADOW);
pFont->DrawText(50+10, 10+35, TextWhite, "GuidTech Cannot Be Verify",D3DFONT_SHADOW);
pFont->DrawText(50+10, 10+50, TextRed, "Look File GuidTech.txt", D3DFONT_SHADOW);
pFont->DrawText(50+10, 10+65, TextWhite, "Visit ****************/GuidTech ",D3DFONT_SHADOW);
pFont->DrawText(50+10, 10+80, TextRed, "Press -> [ F12 ] <- To Exit", D3DFONT_SHADOW);
//************************************************************************************************************
if (CH_SettingV==0){
if(GetAsyncKeyState(VK_F12)){
ExitProcess(0);}}
}
//************************************************************************************************************
if (Eshowmenu==432){
if(Check)
{
AddLog("%s - Checking Your GUID in GameBastard Database-> OK ",TheTime());
AddLog("%s - %s",TheTime(),Username);
AddLog("%s - %s",TheTime(),Group);
AddLog("%s - Hooking Class-> OK ",TheTime());
Check=false;
}
if (pMenu==0) {
pMenu = new D3DMenu(" GameBastard D3D Hook ",390,134);
pMenu->visible=1;
pMenu->col_title= TextWhite;
} else {
if (pMenu->noitems==0) RebuildMenu();
if (pMenu->visible)
{
DrawBox (8,7, 153,21,TextBorder,pDevice);
DrawBox (8,32,153,pMenu->noitems*pMenu->height+8,TextBorder,pDevice);
DrawRectangle(8,7, 153,21,1,TextFound,pDevice);
DrawRectangle(8,32,153,pMenu->noitems*pMenu->height+8,1,TextFound,pDevice);
DrawBox (400,11, 320, 20, TextBorder ,pDevice);
DrawBox (400,35, 320, 88, TextBorder ,pDevice);
DrawRectangle(400,11, 320, 20, 1, TextFound ,pDevice);
DrawRectangle(400,35, 320, 88,1, TextFound ,pDevice);
pFont->DrawText(340+80, 13+5, TextWhite, "wWw.****************", D3DFONT_SHADOW);
pFont->DrawText(400+10, 10+35, TextWhite, "[ID]", D3DFONT_SHADOW);
pFont->DrawText(422+10, 10+35, TextYellow, Username , D3DFONT_SHADOW);
pFont->DrawText(400+10, 10+50, TextWhite, "[Group]", D3DFONT_SHADOW);
pFont->DrawText(447+10, 10+50, TextYellow, Group , D3DFONT_SHADOW);
pFont->DrawText(400+10, 10+65, TextWhite, "[GuidTech] ", D3DFONT_SHADOW);
pFont->DrawText(465+10, 10+65, TextYellow, szGuid , D3DFONT_SHADOW);
pFont->DrawText(400+10, 10+80, TextWhite, "[FPS]", D3DFONT_SHADOW);
pFont->DrawText(432+10, 10+80, TextWhite, GetFrameRate(), D3DFONT_SHADOW);
pFont->DrawText(400+10, 10+95, TextRed, "[GamePanic]", D3DFONT_SHADOW);
pFont->DrawText(475+10, 10+95, TextGreen, "Press [ CTRL + F5 ]", D3DFONT_SHADOW);
/*
if (CH_Userfind){
DrawBox (400,133, 320, 16, TextBorder ,pDevice);
DrawRectangle(400,133, 320, 16, 1, TextFound ,pDevice);
pFont->DrawText(408+4, 10+125, TextYellow, "Name : ", D3DFONT_SHADOW);
pFont->DrawText(450+4, 10+125, TextWhite, usertext, D3DFONT_SHADOW);
pFont->DrawText(525+4, 10+125, TextYellow, "IP :", D3DFONT_SHADOW);
pFont->DrawText(549+4, 10+125, TextWhite, userip, D3DFONT_SHADOW);
}
*/
if (CH_HotKeys==1){
DrawBox (200,11, 153,20, TextBorder,pDevice);
DrawBox (200,35,153,115, TextBorder,pDevice);
DrawRectangle(200,11, 153,20, 1, TextFound,pDevice);
DrawRectangle(200,35,153,115,1, TextFound,pDevice);
pFont->DrawText(174+80, 13+3, TextWhite, "HotKeys", D3DFONT_SHADOW);
pFont->DrawText(200+10, 10+35, TextWhite, "SuperJump : CTRL", D3DFONT_SHADOW);
pFont->DrawText(200+10, 10+50, TextWhite, "Scope : Right Click", D3DFONT_SHADOW);
pFont->DrawText(200+10, 10+65, TextWhite, "Teleport : F6 - F7", D3DFONT_SHADOW);
pFont->DrawText(200+10, 10+80, TextWhite, "Item Px : F5 + Roll", D3DFONT_SHADOW);
pFont->DrawText(200+10, 10+95, TextWhite, "TeleKill : Right Click", D3DFONT_SHADOW);
pFont->DrawText(200+10, 10+110, TextWhite, "Artillery: Canc + Roll", D3DFONT_SHADOW);
}
}
pMenu->Show(pFont);
pMenu->Nav();
}
}
}
//---------------------------------//
// ///////////////////////// //
//---------------------------------//
void TeleKillH(){
if (GetAsyncKeyState(VK_RBUTTON)&0x8000)
{
for(int i = 0; i < 32; i++)
{
CPlayerInfo *pInfo = GetPlayerInfo(i);
CPlayer* pPlayer = g_pBase->player[i];
if(pInfo && pPlayer)
{
CPlayerInfo *pLocalInfo = GetPlayerInfo(g_pBase->local->index);
if( pInfo->team != pLocalInfo->team )
{
if( pInfo->health != 0 )
{
g_pBase->local->pos.x = pPlayer->pos.x;
g_pBase->local->pos.y = pPlayer->pos.y;
g_pBase->local->pos.z = pPlayer->pos.z;
}}}}}}
void PlayerTele(int i)
{
DWORD dwPlayerPointer = *(DWORD*)Player_Pointer;
if(dwPlayerPointer != 0){
CPlayerInfo *pInfo = GetPlayerInfo(i);
CPlayer* pPlayer = g_pBase->player[i];
if(pInfo && pPlayer)
{
CPlayerInfo *pLocalInfo = GetPlayerInfo(g_pBase->local->index);
if( pInfo->health != 0 )
{
g_pBase->local->pos.x = pPlayer->pos.x;
g_pBase->local->pos.y = pPlayer->pos.y;
g_pBase->local->pos.z = pPlayer->pos.z;
}}}}
void PreReset(LPDIRECT3DDEVICE8 pDevice)
{
if (pFont) {
pFont->InvalidateDeviceObjects();
pFont->DeleteDeviceObjects();
pFont = NULL;
}
}
void PostReset(LPDIRECT3DDEVICE8 pDevice)
{
pFont = new CD3DFont("arial", 8 ,D3DFONT_BOLD);
if (pFont) {
pFont->InitDeviceObjects(pDevice);
pFont->RestoreDeviceObjects();
}
}
//---------------------------------//
// ///////////////////////// //
//---------------------------------//
LPDIRECT3DTEXTURE8 Cyan,Red,White,Yellow,Black,Green,Blue,Purple,Pink,Orange,Grey;
HRESULT GenerateTexture(IDirect3DDevice8 *pD3Ddev, IDirect3DTexture8 **ppD3Dtex, DWORD colour32)
{
if(FAILED(pD3Ddev->CreateTexture(8, 8, 1, 0, D3DFMT_A4R4G4B4, D3DPOOL_MANAGED, ppD3Dtex)))
return E_FAIL;
WORD colour16 = ((WORD)((colour32>>28)&0xF)<<12)
|(WORD)(((colour32>>20)&0xF)<<8)
|(WORD)(((colour32>>12)&0xF)<<4)
|(WORD)(((colour32>>4)&0xF)<<0);
D3DLOCKED_RECT d3dlr;
(*ppD3Dtex)->LockRect(0, &d3dlr, 0, 0);
WORD *pDst16 = (WORD*)d3dlr.pBits;
for(int xy=0; xy < 8*8; xy++)
*pDst16++ = colour16;
(*ppD3Dtex)->UnlockRect(0);
return S_OK;
}
HANDLE hThread;
HMODULE hEhSvc,hD3D8Dll,hThisDll;UINT pStride;
HRESULT WINAPI myReset ( LPDIRECT3DDEVICE8 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters )
{
if(Check2)
{
AddLog("%s - PreBuild Device-> OK ",TheTime());
Check2=false;
}
PreReset(pDevice);
return pReset(pDevice, pPresentationParameters);
}
HRESULT WINAPI mySetStreamSource(LPDIRECT3DDEVICE8 pDevice,UINT nStreamNumber,LPDIRECT3DVERTEXBUFFER8 pStreamData, UINT nStride )
{
if(nStreamNumber == 0)
pStride = nStride;
return pSetStreamSource(pDevice, nStreamNumber, pStreamData, nStride);
}
/*
HRESULT WINAPI mySetTransform(LPDIRECT3DDEVICE8 pDevice, D3DTRANSFORMSTATETYPE State, D3DMATRIX* pMatrix)
{
if (State == D3DTS_VIEW) view_matrix = *pMatrix;
if (State == D3DTS_PROJECTION) proj_matrix = *pMatrix;
if (State == D3DTS_WORLD) world_matrix = *pMatrix;
return pSetTransform(pDevice, State, pMatrix);
}
*/
HRESULT WINAPI myDrawIndexedPrimitive(LPDIRECT3DDEVICE8 pDevice, D3DPRIMITIVETYPE pType,UINT nMinIndex, UINT nNumVertices, UINT nStartIndex, UINT nPrimitiveCount )
{
DWORD dwOldZEnable = D3DZB_TRUE;
if(CH_CHAMSEL==1){
if(CH_CHAMS || !CH_CHAMS){
if(pStride == 44){
if(CH_CHAMS) pDevice->SetRenderState(D3DRS_LIGHTING, false);
if(CH_CHAMS) pDevice->SetRenderState(D3DRS_ZENABLE, false);
if(CH_CHAMS==1){pDevice->SetTexture(0, Cyan );}
if(CH_CHAMS==2){pDevice->SetTexture(0, Red );}
if(CH_CHAMS==3){pDevice->SetTexture(0, Blue );}
if(CH_CHAMS==4){pDevice->SetTexture(0, Green );}
if(CH_CHAMS==5){pDevice->SetTexture(0, White );}
if(CH_CHAMS==6){pDevice->SetTexture(0, Black );}
if(CH_CHAMS==7){pDevice->SetTexture(0, Purple );}
if(CH_CHAMS==8){pDevice->SetTexture(0, Orange );}
if(CH_CHAMS==9){pDevice->SetTexture(0, Pink );}
pDrawIndexedPrimitive(pDevice, pType, nMinIndex, nNumVertices, nStartIndex, nPrimitiveCount);
}}}
if(CH_CHAMSEL==1){
if(CH_CHAMS2 || !CH_CHAMS2){
if(pStride== 44){
if(CH_CHAMS2) pDevice->SetRenderState(D3DRS_LIGHTING, false);
if(CH_CHAMS2)pDevice->SetRenderState(D3DRS_ZENABLE, true);
if(CH_CHAMS2==1){pDevice->SetTexture(0, Cyan );}
if(CH_CHAMS2==2){pDevice->SetTexture(0, Red );}
if(CH_CHAMS2==3){pDevice->SetTexture(0, Blue );}
if(CH_CHAMS2==4){pDevice->SetTexture(0, Green );}
if(CH_CHAMS2==5){pDevice->SetTexture(0, White );}
if(CH_CHAMS2==6){pDevice->SetTexture(0, Black );}
if(CH_CHAMS2==7){pDevice->SetTexture(0, Purple);}
if(CH_CHAMS2==8){pDevice->SetTexture(0, Orange);}
if(CH_CHAMS2==9){pDevice->SetTexture(0, Pink );}
}}else{
if(pStride == 44){
pDevice->SetRenderState(D3DRS_AMBIENT, D3DCOLOR_ARGB(0,0,0,0));}}}
//******************************************************
if (CH_FullBright==1){
pDevice->SetRenderState(D3DRS_LIGHTING, false);
pDevice->SetRenderState(D3DRS_AMBIENT, D3DCOLOR_ARGB(255,255,255,255));
}else{
pDevice->SetRenderState(D3DRS_AMBIENT, false);}
//******************************************************
if (CH_GlassWall==1){
if(pStride == 44){
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
}else{
pDevice->SetRenderState(D3DRS_ZENABLE, TRUE);}}
//******************************************************
if(CH_NoFog==1) pDevice->SetRenderState(D3DRS_FOGENABLE, false);
//******************************************************
if(CH_WireFrame==1){
if(pStride == 44)pDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME);}
else{
if(pStride == 44)pDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID);}
//******************************************************
if(CH_WALLS || !CH_WALLS){
if(pStride == 40){
if(CH_WALLS)pDevice->SetRenderState(D3DRS_ZENABLE,true);
if(CH_WALLS==1){pDevice->SetTexture(0, Cyan );}
if(CH_WALLS==2){pDevice->SetTexture(0, Red );}
if(CH_WALLS==3){pDevice->SetTexture(0, Blue );}
if(CH_WALLS==4){pDevice->SetTexture(0, Green );}
if(CH_WALLS==5){pDevice->SetTexture(0, White );}
if(CH_WALLS==6){pDevice->SetTexture(0, Black );}
if(CH_WALLS==7){pDevice->SetTexture(0, Purple);}
if(CH_WALLS==8){pDevice->SetTexture(0, Orange);}
if(CH_WALLS==9){pDevice->SetTexture(0, Pink );}
if(CH_WALLS==10){pDevice->SetTexture(0,Grey );}
}}else{
if(pStride == 44){
pDevice->SetRenderState(D3DRS_AMBIENT, D3DCOLOR_ARGB(0,0,0,0));}}
return pDrawIndexedPrimitive(pDevice,pType,nMinIndex,nNumVertices,nStartIndex,nPrimitiveCount);
}
HRESULT __stdcall myPresent( LPDIRECT3DDEVICE8 pDevice,CONST RECT* pSourceRect,CONST RECT* pDestRect,HWND hDestWindowOverride,CONST RGNDATA* pDirtyRegion )
{
if (pFont==NULL)
PostReset(pDevice);
DoMenu (pDevice);
//******************************************************
if(firstrun){
GUIDCHECK();
firstrun = false;}
//******************************************************
if(Color){
GenerateTexture(pDevice, &Red, D3DCOLOR_ARGB (255 , 255, 0, 0 ));
GenerateTexture(pDevice, &Yellow, D3DCOLOR_ARGB (255 , 255, 255, 0 ));
GenerateTexture(pDevice, &Green, D3DCOLOR_ARGB (255 , 0, 255, 0 ));
GenerateTexture(pDevice, &Blue, D3DCOLOR_ARGB (255 , 0, 0, 255 ));
GenerateTexture(pDevice, &Purple, D3DCOLOR_ARGB (255 , 102, 0, 153 ));
GenerateTexture(pDevice, &Pink, D3DCOLOR_ARGB (255 , 255, 192, 203 ));
GenerateTexture(pDevice, &Orange, D3DCOLOR_ARGB (255 , 255, 165, 0 ));
GenerateTexture(pDevice, &Black, D3DCOLOR_ARGB (255 , 0 , 0 , 0 ));
GenerateTexture(pDevice, &White, D3DCOLOR_ARGB (255 , 255, 255 , 255 ));
GenerateTexture(pDevice, &Grey, D3DCOLOR_ARGB (255 , 128, 128 , 128 ));
GenerateTexture(pDevice, &Cyan , D3DCOLOR_ARGB (255 , 0 , 139 , 200 ));
Color=false;
}
//******************************************************
if (CH_Telekill==1){TeleKillH();}
if (CH_PlayerTele==1){if(CH_Userfind!=0){PlayerTele((CH_Userfind-1));}}
//******************************************************
if (CH_PanicGame==0){
if(GetAsyncKeyState(VK_CONTROL) && GetAsyncKeyState(VK_F5)&0x8000){
ExitProcess(0);}}
//*******************************************************
ASM();
InGame();
InServer();
return pPresent(pDevice,pSourceRect,pDestRect,hDestWindowOverride,pDirtyRegion );
}
//---------------------------------//
// ///////////////////////// //
//---------------------------------//
void InstallHook ()
{
do
{
hD3D8Dll = lGetModuleHandle("d3d8.dll");
Sleep(20);
}
while(!hD3D8Dll);
Sleep(100); int i = 0;
AddLog("|------------ %s ",TheDate());
AddLog("|------------ [ GameBastard D3D Hook Started ]");
AddLog("|------------ %s ",TheTime());
AddLog("%s - Installing Hooking-> OK",TheTime());
AddLog("%s - Getting your GUID-> %s",TheTime(),szGuid);
DWORD_PTR * VtablePtr = FindDevice((DWORD)hD3D8Dll,0x128000);
if(VtablePtr == NULL)
{
MessageBox(NULL,"Cannot Found Device Press Ok For Exit !",0,MB_ICONSTOP);
AddLog ("%s - Found Device-> Fail ",TheTime());
ExitProcess(0);
}
DWORD_PTR * VTable = 0;
*(DWORD_PTR *)&VTable = *(DWORD_PTR *)VtablePtr;
pPresent = (oPresent) DetourFeatures((BYTE *)VTable[15],(BYTE *)myPresent ,5);
pReset = (oReset) DetourFeatures((BYTE *)VTable[14],(BYTE *)myReset ,5);
pSetStreamSource = (nSetStreamSource) DetourFeatures((BYTE *)VTable[83],(BYTE *)mySetStreamSource ,5);
pDrawIndexedPrimitive = (nDrawIndexedPrimitive) DetourFeatures((BYTE *)VTable[71],(BYTE *)myDrawIndexedPrimitive ,5);
}
//---------------------------------//
// ///////////////////////// //
//---------------------------------//
BOOL WINAPI DllMain ( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if (dwReason == DLL_PROCESS_ATTACH)
{
LoginStart(hDll);
HANDLE hThread1;
hThread1 =
CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)Loop, NULL, NULL,NULL );
CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)InstallHook, NULL, NULL,NULL );
CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)GUIDCHECK, NULL, NULL,NULL );
CloseHandle(hThread1);
}
return TRUE;
}
#elif _M_X64
#endif
Code:
#ifndef _CPATCH_H_
#define _CPATCH_H_
#include <windows.h>
class CPatch
{
private:
DWORD T_ADR;
BYTE T_RESTORE_BYTES[6];
int g_s_RESTORE_BYTES;
bool T_RESTOREPATCH;
bool T_ONCE;
void* memcpy_s(void* pvAddress, const void* pvBuffer, size_t stLen);
public:
CPatch(DWORD g_T_ADR, int s_RESTORE_BYTES);
void PatchOnce(const void *T_SRC, int s_T_SRC);
void RestorePatch();
};
#endif
Code:
//-----------------------------------------------------------------------------
// File: D3DFont.h
// Desc: Texture-based font class
// Copyright (c) 1999-2001 Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
#ifndef D3DFONT_H
#define D3DFONT_H
#include <tchar.h>
// Font creation flags
#define D3DFONT_BOLD 0x0001
#define D3DFONT_ITALIC 0x0002
#define D3DFONT_ZENABLE 0x0004
// Font rendering flags
#define D3DFONT_CENTERED 0x0001
#define D3DFONT_TWOSIDED 0x0002
#define D3DFONT_FILTERED 0x0004
#define D3DFONT_RIGHT 0x0008 // non standard
#define D3DFONT_SHADOW 0x0010 // non standard
//-----------------------------------------------------------------------------
// Name: class CD3DFont
// Desc: Texture-based font class for doing text in a 3D scene.
//-----------------------------------------------------------------------------
class CD3DFont
{
TCHAR m_strFontName[80]; // Font properties
DWORD m_dwFontHeight;
DWORD m_dwFontFlags;
LPDIRECT3DDEVICE8 m_pd3dDevice; // A D3DDevice used for rendering
LPDIRECT3DTEXTURE8 m_pTexture; // The d3d texture for this font
LPDIRECT3DVERTEXBUFFER8 m_pVB; // VertexBuffer for rendering text
DWORD m_dwTexWidth; // Texture dimensions
DWORD m_dwTexHeight;
FLOAT m_fTextScale;
FLOAT m_fTexCoords[128-32][4];
DWORD m_dwSpacing; // Character pixel spacing per side
// Stateblocks for setting and restoring render states
DWORD m_dwSavedStateBlock;
DWORD m_dwDrawTextStateBlock;
public:
// 2D and 3D text drawing functions
HRESULT DrawText( FLOAT x, FLOAT y, DWORD dwColor,
TCHAR* strText, DWORD dwFlags=0L );
// Function to get extent of text
HRESULT GetTextExtent( TCHAR* strText, SIZE* pSize );
// Initializing and destroying device-dependent objects
HRESULT InitDeviceObjects( LPDIRECT3DDEVICE8 pd3dDevice );
HRESULT RestoreDeviceObjects();
HRESULT InvalidateDeviceObjects();
HRESULT DeleteDeviceObjects();
// Constructor / destructor
CD3DFont( TCHAR* strFontName, DWORD dwHeight, DWORD dwFlags=0L );
~CD3DFont();
};
#endif
Code:
#ifndef _WarHack_H
#define _WarHack_H
#include "d3d8.h"
#include <string>
#include "d3dbase.h"
#include "Address.h"
#include "WarHack.h"
#include "Menu.h"
#include "CPatch.h"
#include "Support.h"
// Functions Int
int CH_Userfind=0;
int CH_NoFallDamage=0;
int CH_SuperJump=0;
int CH_Stamina=0;
int CH_NoRecoil=0;
int CH_FastAll=0;
int CH_Scope=0;
int CH_Spwan=0;
int CH_SkyWalker=0;
int CH_Bounds=0;
int CH_Water=0;
int CH_Premium=0;
int CH_Slot=0;
int CH_Trigger=0;
int CH_GMAlert=0;
int CH_RollSpeed=0;
int CH_Speed=0;
int CH_SuperMaster=0;
int CH_Teleport=0;
int CH_AFK=0;
int CH_Static=0;
int CH_Gravity=0;
int CH_Spectator=0;
int CH_ImDrunk=0;
int CH_Artilery=0;
int CH_Skywalk=0;
int CH_HSkywalk=0;
int CH_Test=0;
int CH_REDEsp=0;
// Px
int CH_RedHair=0;
int CH_Weapon=0;
int CH_Level=0;
// ASM Int
int CH_AutoMedic=0;
int CH_AutoAmmo=0;
int CH_Spread=0;
int CH_WTW=0;
int CH_STW=0;
int CH_Premcross=0;
int CH_OPK=0;
int CH_SVP=0;
int CH_MineInfo=0;
int CH_AntiKick=0;
int CH_ZeroDelay=0;
int CH_UAmmo=0;
int CH_Invisible=0;
int CH_Prone=0;
int CH_Boneshot=0;
int CH_Escalator=0;
int CH_CrazyC=0;
int CH_SHOTUNG=0;
int CH_RapidFire=0;
int CH_Bullet=0;
int CH_NameEspNiu=0;
int CH_NameEspDerb=0;
int CH_HealthEsp=0;
int CH_AntiFlash=0;
int CH_Ossigene=0;
int CH_DoubleFire=0;
int CH_SniperCrosshairs=0;
int CH_VehicleInv=0;
int CH_VehicleDmg=0;
int CH_VehicleDelay=0;
int CH_AutoRepair=0;
int CH_SniperCross=0;
int CH_Restrictions=0;
int CH_AntiMine=0;
int CH_QuickPlant=0;
int CH_QuickDefuse=0;
int CH_RadarGPS=0;
int CH_EdiePosition=0;
int CH_RoomRestrictions=0;
int CH_NoReload=0;
int CH_VehRestr=0;
int CH_FakeKick=0;
int CH_ConqFlag=0;
int CH_TakeFlag=0;
// Bool
bool triggerstop=true;
float posiX;
float posiY;
float posiZ;
extern char usertext[20];
extern char userip[20];
// =============== Write To Detours ========================
void *DetourFunc (BYTE *src, const BYTE *dst, const int len)
{
BYTE *jmp = (BYTE*)malloc(len+5);
DWORD dwback;
VirtualProtect(src, len, PAGE_READWRITE, &dwback);
memcpy(jmp, src, len); jmp += len;
jmp[0] = 0xE9;
*(DWORD*)(jmp+1) = (DWORD)(src+len - jmp) - 5;
src[0] = 0xE9;
*(DWORD*)(src+1) = (DWORD)(dst - src) - 5;
VirtualProtect(src, len, dwback, &dwback);
return (jmp-len);
}
// ================ Get Item Px ======================
void Weapon(short x){
DWORD dwPlayerPointer = *(DWORD*)Player_Pointer;
if(dwPlayerPointer != 0){{
if (GetAsyncKeyState(VK_F5))
*(short*)(dwPlayerPointer + OFS_WEAPON) = x;}}}
// ================ Void Write ASM ======================
void WriteAsm( void* pxAddress, BYTE *code, int size )
{
unsigned long Protection;
VirtualProtect((void*)pxAddress, size, PAGE_READWRITE, &Protection);
memcpy((void*)pxAddress, (const void*)code, size);
VirtualProtect((void*)pxAddress, size, Protection, 0);
}
// ============ Premium ================
void Premium(int x)
{
DWORD dwSrvrPtr = *(DWORD*)ADR_SERVERBASE;
if(dwSrvrPtr != 0){
*(int*)(dwSrvrPtr+OFS_PREMIUM) = x;}
}
// ================ Fast As ======================
DWORD pFastAs = NULL;
DWORD Gun = NULL;
_declspec(naked) void new_FastAs()
{
__asm
{
mov ebp,Gun;
push edi;
jmp pFastAs;
}
}
//=================================
DWORD Cross = NULL;
_declspec(naked) void prem_cross()
{
__asm
{
jmp Cross;
}
}
//=================================
DWORD pBullets = NULL;
DWORD Bullets = NULL;
_declspec(naked) void new_Bullets()
{
__asm
{
mov eax,Bullets;
jmp pBullets;
}
}
//---------------------------------//
// ///////////////////////// //
//---------------------------------//
// ================ TRIGERBOT ======================
void TriggerBot()
{
DWORD ActivePL = *(DWORD*)ADR_TrigerBot;
if( ActivePL == 0x2){
mouse_event( MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0 );
triggerstop=true;
}
else
{
if (triggerstop){
mouse_event( MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 );
triggerstop=false;
}
if (GetAsyncKeyState(VK_LBUTTON)&0x8000)
{
if (triggerstop){
mouse_event( MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 );
triggerstop=false;
}
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0 );
}else{
if (triggerstop){
mouse_event( MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 );
triggerstop=false;
}
mouse_event( MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 );
}
}
}
//---------------------------------//
// ///////////////////////// //
//---------------------------------//
CPatch pAutoMedic ( ADR_AutoMedic , 6);
CPatch pAutoAmmo ( ADR_AutoAmmo , 6);
CPatch pNoSpread ( ADR_NoSpread , 6);
CPatch pSVP ( ADR_SVP , 2);
CPatch pOPK1 ( ADR_OPK1 , 2);
CPatch pOPK2 ( ADR_OPK2 , 2);
CPatch pOPK3 ( ADR_OPK3 , 2);
CPatch pAntiKick ( ADR_AntiKick , 2);
CPatch pUAmmo ( ADR_Uammo , 2);
CPatch pProne ( ADR_Prone , 2);
CPatch pAutoRepair ( ADR_AutoRepair , 6);
CPatch pWTW ( ADR_WTW , 3);
CPatch pSTW ( ADR_STW , 3);
CPatch pInvisible ( ADR_Invisible , 3);
CPatch pDelay ( ADR_NoDelay , 2);
CPatch pMine1 ( ADR_MineView1 , 2);
CPatch pMine2 ( ADR_MineView2 , 6);
CPatch pOssigene ( ADR_OxyGene , 2);
CPatch pCrazy1 ( ADR_VehicleCrazy_1 , 2);
CPatch pCrazy2 ( ADR_VehicleCrazy_2 , 6);
CPatch pCrazy3 ( ADR_VehicleCrazy_3 , 2);
CPatch pCrazy4 ( ADR_VehicleCrazy_4 , 5);
CPatch pVehDelay ( ADR_VehicleDelay , 2);
CPatch pVehDmg ( ADR_VehicleNoDamage , 2);
CPatch pVehInv ( ADR_VehicleInvisible , 3);
CPatch pRapidFire ( ADR_RapidFire , 7);
CPatch pSniperCross ( ADR_SniperCrossHairs , 2);
CPatch pAntiMine ( ADR_AntiMine , 6);
CPatch pRestrictions ( ADR_NoRestrictions , 2);
CPatch pRoomRestrictions ( ADR_RoomRestrictions , 1);
CPatch pEscalator1 ( ADR_Escalator_1 , 3);
CPatch pEscalator2 ( ADR_Escalator_2 , 3);
CPatch pQuickDefuse ( ADR_QuickDefuse , 2);
CPatch pQuickPlant ( ADR_QuickPlant , 2);
CPatch pRadarGPS ( ADR_RadarGPS , 2);
CPatch pBoneShot1 ( ADR_BoneShot1 , 6);
CPatch pBoneShot2 ( ADR_BoneShot2 , 4);
CPatch pTakeBase ( ADR_TakeBase1 , 2);
// Artillery
CPatch pArtilery1 ( ADR_Artilery_1 , 2);
CPatch pArtilery2 ( ADR_Artilery_2 , 2);
CPatch pArtilery3 ( ADR_Artilery_3 , 2);
CPatch pArtilery4 ( ADR_Artilery_4 , 2);
CPatch pArtilery5 ( ADR_Artilery_5 , 5);
CPatch pArtilery6 ( ADR_Artilery_6 , 6);
// Veh Restrictions
CPatch pVehRestrictions1 ( ADR_VehNoRestrictions1, 6);
CPatch pVehRestrictions2 ( ADR_VehNoRestrictions2, 2);
CPatch pVehRestrictions3 ( ADR_VehNoRestrictions3, 2);
CPatch pVehRestrictions4 ( ADR_VehNoRestrictions4, 6);
CPatch pVehRestrictions5 ( ADR_VehNoRestrictions5, 6);
BYTE NOPS [] = {0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90 };
if(CH_Premcross != 0)
{
switch(CH_Premcross)
{
case 1:{Cross = ADR_PremCross_1+0x24 ;}break;
case 2:{Cross = ADR_PremCross_1+0x4D ;}break;
case 3:{Cross = ADR_PremCross_1+0x76 ;}break;
case 4:{Cross = ADR_PremCross_1+0x9F ;}break;
}
Memcpy((LPBYTE)ADR_PremCross_1, (PBYTE)"\x90\x90\x90\x90\x90\x90",6);
Memcpy((LPBYTE)ADR_PremCross_1 + 0x17,(PBYTE)"\x90\x90\x90\x90\x90\x90",6);
DetourFunc((BYTE *)ADR_PremCross_1 + 0x1D,(BYTE*)prem_cross,7);
}else{
Memcpy((LPBYTE)ADR_PremCross_1, (PBYTE)"\x0F\x84\x86\x01\x00\x00",6);
Memcpy((LPBYTE)ADR_PremCross_1 +0x17,(PBYTE)"\x0F\x84\x86\x01\x00\x00",6);
}
//*******************************************************
if(CH_Bullet!=0)
{
switch(CH_Bullet)
{
case 1:{Bullets = 0x2; }break;
case 2:{Bullets = 0x3; }break;
case 3:{Bullets = 0x4; }break;
case 4:{Bullets = 0x5; }break;
case 5:{Bullets = 0x10; }break;
case 6:{Bullets = 0x100; }break;
}
pBullets = (ADR_Bullets+ 0x5);
DetourFunc((BYTE*)ADR_Bullets,(BYTE*)new_Bullets,5);
}else{
Memcpy((LPBYTE)ADR_Bullets,(PBYTE)"\x0F\xB7\x44\x24\x1C",5);
}
//*******************************************************
if(CH_RapidFire)
{
switch(CH_RapidFire)
{
case 1:{Gun = 0x15; }break;//Famas
case 2:{Gun = 0x17; }break;//XM8
case 3:{Gun = 0x27; }break;//TMP 9
case 4:{Gun = 0x2A; }break;//Scorpions
case 5:{Gun = 0x60; }break;//Minigun
}
pFastAs = (ADR_RapidFire + 0x8);
DetourFunc((BYTE *)ADR_RapidFire,(BYTE *)new_FastAs,7);
}else{
Memcpy((LPBYTE)ADR_RapidFire,(PBYTE)"\x0F\xBF\xAE\x7A\x01\x00\x00",7); }
//*******************************************************
DWORD *p_playerbase = (DWORD *) Player_Pointer ;
short *p_weapon;
p_weapon =(short *)((*p_playerbase)+OFS_WEAPON);
if(CH_Artilery==1){
pArtilery1.PatchOnce ((void*)"\x90\x90",2); // Funzione per tirare fuori il Binoculars
pArtilery2.PatchOnce ((void*)"\xEB\x3D",2); // Target
pArtilery3.PatchOnce ((void*)"\xEB\x3D",2); // Funzione Reload
pArtilery4.PatchOnce ((void*)"\xEB\x31",2); // Sbloccare Artilery in tutte le mappe
pArtilery5.PatchOnce ((void*)"\x90\x90\x90\x90\x90",5); // Funzione Leva il Time Questa
pArtilery6.PatchOnce ((void*)"\xE9\x8F\x00\x00\x00\x90",6); // Targert per usararla in tutti modi [ Da Controllare ]
if(GetAsyncKeyState(VK_DELETE)&1)
{
*p_weapon = 93;
}}
if(CH_Artilery==0){
pArtilery1.RestorePatch();
pArtilery2.RestorePatch();
pArtilery3.RestorePatch();
pArtilery4.RestorePatch();
pArtilery5.RestorePatch();
pArtilery6.RestorePatch();
}
//*******************************************************
if(CH_Boneshot==1){
pBoneShot1.PatchOnce ((void*)"\xB9\x7A\xB6\xD6\xDE\x90",6);
pBoneShot2.PatchOnce ((void*)"\x90\x90\x90\x90",4);}
if(CH_Boneshot==0){
pBoneShot1.RestorePatch();
pBoneShot2.RestorePatch();}
//*******************************************************
if(CH_RoomRestrictions==1){
pRoomRestrictions.PatchOnce ((void*)"\xEB",1);}
if(CH_RoomRestrictions==0){
pRoomRestrictions.RestorePatch();}
//*******************************************************
if(CH_QuickDefuse==1){
pQuickDefuse.PatchOnce ((void*)"\xEB\x4E",2);}
if(CH_QuickDefuse==0){
pQuickDefuse.RestorePatch();}
if(CH_QuickPlant==1){
pQuickPlant.PatchOnce ((void*)"\xEB\x3B",2);}
if(CH_QuickPlant==0){
pQuickPlant.RestorePatch();}
//*******************************************************
if(CH_Restrictions==1){
pRestrictions.PatchOnce ((void*)"\x90\x90",2);}
if(CH_Restrictions==0){
pRestrictions.RestorePatch();}
//*******************************************************
if(CH_RadarGPS==1){
pRadarGPS.PatchOnce ((void*)"\xEB\x19",2);}
if(CH_RadarGPS==0){
pRadarGPS.RestorePatch();}
//*******************************************************
if(CH_AntiMine==1){
pAntiMine.PatchOnce ((void*)"\xE9\x4A\x06\x00\x00\x90",6);}
if(CH_AntiMine==0){
pAntiMine.RestorePatch();}
//*******************************************************
if(CH_AutoMedic==1){
pAutoMedic.PatchOnce ((void*) "\x90\x90\x90\x90\x90\x90",6);}
if(CH_AutoMedic==0){
pAutoMedic.RestorePatch();}
//*******************************************************
if(CH_AutoAmmo==1){
pAutoAmmo.PatchOnce ((void*) "\x90\x90\x90\x90\x90\x90",6);}
if(CH_AutoAmmo==0){
pAutoAmmo.RestorePatch();}
//*******************************************************
if(CH_Spread==1){
pNoSpread.PatchOnce ((void*) "\x90\x90\x90\x90\x90\x90",6);}
if(CH_Spread==0){
pNoSpread.RestorePatch();}
//*******************************************************
if(CH_SniperCross==1){
pSniperCross .PatchOnce ((void*) "\x90\x90",2);}
if(CH_SniperCross==0){
pSniperCross .RestorePatch();}
//*******************************************************
if(CH_SVP==1){
pSVP.PatchOnce ((void*) "\x90\x90",2);}
if(CH_SVP==0){
pSVP.RestorePatch();}
//*******************************************************
if(CH_OPK==1){
pOPK1.PatchOnce ((void*) "\x89\xA1",2);
pOPK2.PatchOnce ((void*) "\x89\xA1",2);
pOPK3.PatchOnce ((void*) "\x89\xA1",2);}
if(CH_OPK==0){
pOPK1.RestorePatch();
pOPK2.RestorePatch();
pOPK3.RestorePatch();}
//*******************************************************
if(CH_AntiKick==1){
pAntiKick.PatchOnce ((void*)"\xEB\x0D",2);}
if(CH_AntiKick==0){
pAntiKick.RestorePatch();}
//*******************************************************
if(CH_UAmmo==1){
pUAmmo.PatchOnce ((void*)"\xEB\x0A",2);}
if(CH_UAmmo==0){
pUAmmo.RestorePatch();}
//*******************************************************
if(CH_Prone==1){
pProne.PatchOnce ((void*)"\x90\x90",2);}
if(CH_Prone==0){
pProne.RestorePatch();}
//*******************************************************
if(CH_AutoRepair==1){
pAutoRepair.PatchOnce ((void*)"\x90\x90\x90\x90\x90\x90",6);}
if(CH_AutoRepair==0){
pAutoRepair.RestorePatch();}
//*******************************************************
if(CH_WTW==1){
pWTW.PatchOnce ((void*)"\x90\x90\x90",3);}
if(CH_WTW==0){
pWTW.RestorePatch();}
//*******************************************************
if(CH_STW==1){
pSTW.PatchOnce ((void*)"\x90\x90\x90",3);}
if(CH_STW==0){
pSTW.RestorePatch();}
//*******************************************************
if(CH_Invisible==1){
pInvisible.PatchOnce ((void*)"\x8B\x4D\x1C",3);}
if(CH_Invisible==0){
pInvisible.RestorePatch();}
//*******************************************************
if(CH_ZeroDelay==1){
pDelay.PatchOnce ((void*)"\x90\x90",2);}
if(CH_ZeroDelay==0){
pDelay.RestorePatch();}
//*******************************************************
if(CH_MineInfo==1){
pMine1.PatchOnce ((void*)"\x90\x90",2);
pMine2.PatchOnce ((void*)"\x90\x90\x90\x90\x90\x90",6);}
if(CH_MineInfo==0){
pMine1.RestorePatch();
pMine2.RestorePatch();}
//*******************************************************
if(CH_Ossigene==1){
pOssigene.PatchOnce ((void*)"\x74\x2A",1);}
if(CH_Ossigene==0){
pOssigene.RestorePatch();}
//*******************************************************
if(CH_VehRestr==1){
pVehRestrictions1.PatchOnce ((void*)"\xE9\xBC\x00\x00\x00\x90",6);
pVehRestrictions2.PatchOnce ((void*)"\xEB\x7F",2);
pVehRestrictions3.PatchOnce ((void*)"\xEB\x6C",2);
pVehRestrictions4.PatchOnce ((void*)"\xE9\x30\x03\x00\x00\x90",6);
pVehRestrictions5.PatchOnce ((void*)"\xE9\xE4\x03\x00\x00\x90",6);
}
if(CH_VehRestr==0){
pVehRestrictions1.RestorePatch();
pVehRestrictions2.RestorePatch();
pVehRestrictions3.RestorePatch();
pVehRestrictions4.RestorePatch();
}
//*******************************************************
if(CH_CrazyC==1){
pCrazy1.PatchOnce ((void*)"\x90\x90",2);
pCrazy2.PatchOnce ((void*)"\x90\x90\x90\x90\x90\x90",6);
pCrazy3.PatchOnce ((void*)"\x90\x90",2);
pCrazy4.PatchOnce ((void*)"\x68\x00\x00\x20\x92",5);}
if(CH_CrazyC==0){
pCrazy1.RestorePatch();
pCrazy2.RestorePatch();
pCrazy3.RestorePatch();
pCrazy4.RestorePatch();
}
//*******************************************************
if(CH_VehicleDelay==1){
pVehDelay. PatchOnce ((void*)"\x90\x90",2);}
if(CH_VehicleDelay==0){
pVehDelay .RestorePatch();}
//*******************************************************
if(CH_VehicleDmg==1){
pVehDmg.PatchOnce ((void*)"\x0F\x85",2);}
if(CH_VehicleDmg==0){
pVehDmg.RestorePatch();}
//*******************************************************
if(CH_VehicleInv==1){
pVehInv.PatchOnce ((void*)"\x90\x90\x90",3);}
if(CH_VehicleInv==0){
pVehInv.RestorePatch();}
//*******************************************************
if(CH_Escalator==1){
pEscalator1.PatchOnce ((void*)"\x90\x90\x90",3);
pEscalator2.PatchOnce ((void*)"\x90\x90\x90",3);}
if(CH_Escalator==0){
pEscalator1.RestorePatch();
pEscalator2.RestorePatch();}
}
//---------------------------------//
// ///////////////////////// //
//---------------------------------//
void InGame (void){
DWORD dwPlayerPointer = *(DWORD*)Player_Pointer;
if(dwPlayerPointer != 0){
//*******************************************************
if (CH_NoFallDamage==1){
if(dwPlayerPointer != 0){
*(float*)(dwPlayerPointer+OFS_NFD) = -90000000009008899990000000000999990000.0f;}
}
//*******************************************************
if (CH_SuperJump==1){
if(GetAsyncKeyState(VK_CONTROL)){
if(dwPlayerPointer != 0){
*(float*)(dwPlayerPointer + OFS_Z) =
*(float*)(dwPlayerPointer + OFS_Z) +75;}}
}
//*******************************************************
if (CH_Stamina==1){ // Stealth
if(dwPlayerPointer != 0 && *(float*)(dwPlayerPointer+OFS_STAMINA) < 32.0f){
*(float*)(dwPlayerPointer+OFS_STAMINA) = 32.0f;}
}
if (CH_Stamina==2){ // FULL
if(dwPlayerPointer != 0){
*(float*)(dwPlayerPointer+OFS_STAMINA) = 100.0f;}
}
//*******************************************************
// Flash
if (CH_Weapon==1){Weapon(94);}
//M14 LandMine
if (CH_Weapon==2){Weapon(100);}
//Ammo-Box
if (CH_Weapon==3){Weapon(99);}
// Med-Box
if (CH_Weapon==4){Weapon(103);}
// Adrenaline
if (CH_Weapon==5){Weapon(88);}
// Stamina
if (CH_Weapon==6){Weapon(90);}
//*******************************************************
if (CH_Trigger==1){TriggerBot();}
//*******************************************************
if(CH_NoRecoil==1){
if(dwPlayerPointer != 0){
*(float*)(dwPlayerPointer+OFS_NORECOIL1 ) = 1.0f;
*(float*)(dwPlayerPointer+OFS_NORECOIL2 ) = 1.0f;}
}
//*******************************************************
if(CH_FastAll==1){
*(float*)ADR_FastRepair = 10;
*(float*)ADR_FastMedic = 5;
*(float*)ADR_FastFlag = 10;
*(float*)ADR_FastAmmo = 5;
}
//*******************************************************
if (CH_Skywalk==1){
if (CH_HSkywalk==1){*(float*)(dwPlayerPointer +OFS_Z) = 500;}
if (CH_HSkywalk==2){*(float*)(dwPlayerPointer +OFS_Z) = 1000;}
if (CH_HSkywalk==3){*(float*)(dwPlayerPointer +OFS_Z) = 1500;}
if (CH_HSkywalk==4){*(float*)(dwPlayerPointer +OFS_Z) = 2000;}
if (CH_HSkywalk==5){*(float*)(dwPlayerPointer +OFS_Z) = 2500;}
if (CH_HSkywalk==6){*(float*)(dwPlayerPointer +OFS_Z) = 3000;}
}
//*******************************************************
if(CH_Teleport==1){
DWORD dwPlayerPtr = *(DWORD*)Player_Pointer;
if(dwPlayerPtr != 0)
{
if (GetAsyncKeyState(VK_F8))
{
posiX = *(float*)(dwPlayerPtr + OFS_X);
posiY = *(float*)(dwPlayerPtr + OFS_Y);
posiZ = *(float*)(dwPlayerPtr + OFS_Z);
}
if (GetAsyncKeyState(VK_F9))
{
*(float*)(dwPlayerPtr + OFS_X) = posiX;
*(float*)(dwPlayerPtr + OFS_Y) = posiY;
*(float*)(dwPlayerPtr + OFS_Z) = posiZ;
}
}
}
if (CH_Static==1){
DWORD dwPlayerPtr = *(DWORD*)Player_Pointer;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr + OFS_X) = posiX;
*(float*)(dwPlayerPtr + OFS_Y) = posiY;
*(float*)(dwPlayerPtr + OFS_Z) = posiZ;
}
}
//*******************************************************
if (CH_Scope==1){
BYTE *p_scope =(BYTE *)ADR_Scope;
if (GetAsyncKeyState(VK_RBUTTON)&0x8000){
*p_scope=1;}
else{
*p_scope=0;}
}
//*******************************************************
if (CH_Bounds==1){
*(int*)(ADR_NoBounds1) = 0;
*(int*)(ADR_NoBounds2) = 0;
}
//*******************************************************
if (CH_Water==1){
*(int*)(ADR_NoWater) = 0;
}
//*******************************************************
if (CH_AFK==1){
*(int*)(ADR_AntiAfk) = 1;
}
//*******************************************************
if (CH_ImDrunk==1){
*(DWORD*)(ADR_ImDrunk) = 1;
}else{
*(DWORD*)(ADR_ImDrunk) = 0;
}
//*******************************************************
if (CH_Speed==0){
*(float*)ADR_Speed = 100;}
if (CH_Speed==1){
*(float*)ADR_Speed = 120;}
if (CH_Speed==2){
*(float*)ADR_Speed = 170;}
if (CH_Speed==3){
*(float*)ADR_Speed = 270;}
if (CH_Speed==4){
*(float*)ADR_Speed = 370;}
if (CH_Speed==5){
*(float*)ADR_Speed = 470;}
if (CH_Speed==6){
*(float*)ADR_Speed = 570;}
if (CH_Speed==7){
*(float*)ADR_Speed = 670;}
if (CH_Speed==8){
*(float*)ADR_Speed = 800;}
if (CH_Speed==9){
*(float*)ADR_Speed = 900;}
if (CH_Speed==10){
*(float*)ADR_Speed = 1000;}
//*******************************************************
if (CH_RollSpeed==0){
*(float*)ADR_SpeedRoll = 1.75;}
if (CH_RollSpeed==1){
*(float*)ADR_SpeedRoll = 2.0f;}
if (CH_RollSpeed==2){
*(float*)ADR_SpeedRoll = 2.0f;}
if (CH_RollSpeed==3){
*(float*)ADR_SpeedRoll = 3.0f;}
if (CH_RollSpeed==4){
*(float*)ADR_SpeedRoll = 4.0f;}
if (CH_RollSpeed==5){
*(float*)ADR_SpeedRoll = 5.0f;}
if (CH_RollSpeed==6){
*(float*)ADR_SpeedRoll = 6.0f;}
if (CH_RollSpeed==7){
*(float*)ADR_SpeedRoll = 7.0f;}
if (CH_RollSpeed==8){
*(float*)ADR_SpeedRoll = 8.0f;}
if (CH_RollSpeed==9){
*(float*)ADR_SpeedRoll = 9.0f;}
if (CH_RollSpeed==10){
*(float*)ADR_SpeedRoll =10.0f;}
}}
//---------------------------------//
// ///////////////////////// //
//---------------------------------//
void InServer (void){
DWORD dwSrvrPtr = *(DWORD*)ADR_SERVERBASE;
if(dwSrvrPtr != 0){
//*******************************************************
if (CH_Spectator==1)
{
*(long*)(dwSrvrPtr + OFS_SPECTATOR ) = 5;
}
//*******************************************************
switch(CH_SuperMaster){
case 1: *(int*)(dwSrvrPtr + OFS_SUPERMASTER) = 1;
break;
case 0: *(int*)(dwSrvrPtr + OFS_SUPERMASTER) = 0;
break;
}
//*******************************************************
switch (CH_Level)
{
case 1: *(DWORD *)(ADR_Level) = 0x009F9000;
*(DWORD *)(dwSrvrPtr+OFS_LEVEL) = 0x009F9000;
break;
case 2: *(DWORD *)(ADR_Level) = 0x00FD4000;
*(DWORD *)(dwSrvrPtr+OFS_LEVEL) = 0x00FD4000;
break;
case 3: *(DWORD *)(ADR_Level) = 0x01D34000;
*(DWORD *)(dwSrvrPtr+OFS_LEVEL) = 0x01D34000;
break;
case 4: *(DWORD *)(ADR_Level) = 0x7F800000;
*(DWORD *)(dwSrvrPtr+OFS_LEVEL) = 0x7F800000;
break;
}
//*******************************************************
if (CH_Premium==1){Premium(1);}
if (CH_Premium==2){Premium(2);}
if (CH_Premium==3){Premium(3);}
if (CH_Premium==4){Premium(4);}
//*******************************************************
if (CH_Slot==1){
*(long*)(dwSrvrPtr + OFS_SLOT5) = 1;
}
//*******************************************************
if (CH_Spwan==1){
*(int*)(ADR_QuickSpawn1) = 0;
*(int*)(ADR_QuickSpawn2) = 0;
}
//*******************************************************
if (CH_Userfind){
int i;
DWORD ADR_USERNAME = NULL;
DWORD ADR_USERIP = NULL;
i=(CH_Userfind-1);
ADR_USERNAME = (ADR_NAMEBASE + (OFS_PLAYERSIZE * i));
ADR_USERIP = (ADR_D3DIP + (OFS_PLAYERSIZE * i));
sprintf(usertext, "%s", (void*)ADR_USERNAME);
sprintf(userip , "%s", (void*)ADR_USERIP);
} else {
sprintf(usertext, "Select User");
sprintf(userip , "No IP");
}
}}
#endif
Code:
#include "WarHack.h"
struct vectorA
{
float x,z,y;
};//0x00C
struct CVehicle;
struct CServer
{
char unknown0[876]; //0x0000
__int32 spectate; //0x036C
char unknown1[4]; //0x0370
__int32 premium; //0x0374
__int32 premium_; //0x0378
};//0x037C
struct CPlayer
{
char unknown2[116]; //0x0000
BYTE index; //0x0074
char unknown3[261]; //0x0075
WORD weapon; //0x17A
char unknown4[220]; //0x017C
vectorA pos; //0x0258
};//0x00264
struct CBase
{
CPlayer* local; //0x0000
char unknown4[8]; //0x0004
CPlayer** player; //0x004C
char unknown80[48]; //0x0050
};//Size=0x0080(128)
struct CVehicle
{
char unknown7[55]; //0x0000
char name[18]; //0x0037
};//0x0049
struct CServerBase
{
CServer* server; //0x0000
};//Size=0x0004(4)
struct CPlayerInfo
{
char unknown8[68]; //0x0000
char name[20]; //0x0044
char unknown9[1004]; //0x0058
char ip[16]; //0x0444
char unknown10[5288]; //0x0454
__int32 health; //0x18FC
char unknown11[152]; //0x1900
BYTE team; //0x1998
char unknown12[2631]; //0x19C5
};//0x240C
struct CLocal
{
char unknown13[32]; //0x0000
vectorA pos; //0x0020
char unknown14[36]; //0x002C
float pitch; //0x0050
float yaw; //0x0054
char unknown15[16]; //0x0058
float view_down; //0x0068
float view_up; //0x006C
float fovx; //0x0070
float fovy; //0x0074
};//0x0078
CPlayerInfo* GetPlayerInfo(int index)
{
if(index > 32) return 0;
DWORD dwBasePointer = ADR_BasePointer;
return (CPlayerInfo*) (dwBasePointer + (index*OFS_PLAYERSIZE));
}
CBase *g_pBase = (CBase*)Player_Pointer;
char *WrWeaponsA[] =
{ // 120
" 0 DA_M7",
" 1 DA_KNUCKLE",
" 2 DA_STILETTO",
" 3 DA_SWORD",
" 4 DA_KNUCKLE_2",
" 5 DA_SQUEAKY_HAMMER",
" 6 DA_STILETTO_JP",
" 7 DA_SWORD_JP",
" 8 DB_COLT",
" 9 DB_DESERT_EG",
"10 DB_MP5K",
"11 DB_MAGNUM",
"12 DB_GLOCK",
"13 DB_BERETTA_D",
"14 DB_THROWING_KNIFE",
"15 DB_MICRO_UZI",
"16 DB_BERETTA_M93R",
"17 MDB_MP5K_GOLD",
"18 DC_AK47",
"19 DC_K2",
"20 DC_M4A1",
"21 DC_FAMAS",
"22 DC_L85A1",
"23 DC_XM8",
"24 DC_TYPE89",
"25 DC_SIG550",
"26 DC_TAR_21",
"27 DC_M16A4",
"28 DC_AN94 _M16",
"29 DC_HK417 _M16",
"30 DC_M4A1_GOLD _M16",
"31 DD_G36C",
"32 DD_G36C_D",
"33 DD_AKS74U _M16",
"34 DE_G36",
"35 DE_G36_D",
"36 DF_MP5",
"37 DF_P90",
"38 DF_UZI",
"39 DF_TMP9",
"40 DF_K1",
"41 DF_MP7A1",
"42 DF_SCORPION_D",
"43 DF_Spectre_M4",
"44 DF_MAC10",
"45 DF_UMP45",
"46 DF_CX4STORM",
"47 DF_K1_GOLD",
"48 DG_PSG_1",
"49 DG_BARRETT_M82",
"50 DG_AUG",
"51 DG_SSG",
"52 DG_M24",
"53 DG_DRAGUNOV_SVD",
"54 DG_AI_AW",
"55 DG_AW50F",
"56 DG_M21",
"57 DG_WA2000",
"58 DG_SR25",
"59 DG_M40A1",
"60 DG_AI_AW_GOLD",
"61 DH_M60",
"62 DH_M249",
"63 DI_WINCHESTER_1300",
"64 DI_M4SUPER90",
"65 DJ_PZF_3",
"66 DJ_M136AT_4",
"67 DJ_RPG_7",
"68 DJ_JAVELIN",
"69 DJ_RPG_7_GOLD",
"70 DK_STINGER",
"71 DK_STINGER",
"72 DL_TMA_1A",
"73 DL_HA_SUPPLY",
"74 DM_K400_GRENADE",
"75 DN_K400_GRENADE_ASSULT",
"76 DO_SMOKE_G",
"77 DO_FLASH_BANG_1",
"78 DO_FLASH_BANG_2",
"79 DP_CLAYMORE",
"80 DP_CLAYMORE_SWITCH",
"81 DP_PDA",
"82 DP_SWITCH_C4",
"83 DQ_MEDIC_KIT_1",
"84 DQ_MEDIC_KIT_2",
"85 DQ_MEDIC_KIT_3",
"86 DR_SPANNER",
"87 DR_PIPE_WRENCH",
"88 DS_ADRENALINE",
"89 DS_PARACHUTE",
"90 DS_STAMINA",
"91 DS_HP_KIT",
"92 DS_DETECTOR",
"93 DS_TELESCOPE",
"94 DS_FLASH_MINE",
"95 DT_MG3",
"96 DT_M134",
"97 DT_MK1S",
"98 DT_HK69",
"99 DU_AMMO_BOX",
"100 DU_M14",
"101 DU_TEARGAS",
"103 DV_MEDIC_BOX",
"104 DW_K203",
"105 DW_TELESCOPE",
"106 DW_SILENCER",
"107 DU_NIPPERS",
"108 DRUM_PIECE",
"109 SLOT_CHG",
"110 D5_SCORPION_D_8TH",
"111 D5_G36C_D_8TH",
"112 D6_TMP9_8TH",
"113 D6_MP7A1_8TH",
"114 D7_AI_AW_8TH",
"115 D7_BARRETT_M82_8TH",
"116 D8_M60_8TH",
"117 D8_G36_8TH",
"118 D9_M249_8TH",
"119 D9_M134_8TH"
};
Code:
#include "StdAfx.h"
DWORD Strlen(CHAR *lpSrc)
{
unsigned long len = 0;
while(*lpSrc++ != 0)len++;
return len;
}
VOID Strcpy(CHAR *lpDst,CHAR *lpSrc)
{
while(*lpSrc != 0)
*lpDst++ = *lpSrc++;
*lpDst++ = 0;
return;
}
VOID Strcat(CHAR *lpDst,CHAR *lpSrc)
{
unsigned long len = 0;
while(*lpDst!=0)*lpDst++;
while(*lpSrc!= 0)
*lpDst++ = *lpSrc++;
*lpDst++ = 0;
return;
}
BOOL Strcmp(CHAR *lpStr1,CHAR *lpStr2)
{
if (!lpStr1||!lpStr2) return 1;
int s1 = (int)Strlen(lpStr1);
int s2 = (int)Strlen(lpStr2);
if( s1 != s2 )return 1;
for( int i = 0; i < s1; i++ )
{
if(lpStr1[i] != lpStr2[i])
return 1;
}
return 0;
}
VOID Strncpy(CHAR *lpDst,CHAR *lpSrc,DWORD len)
{
while(*lpSrc!= 0 && len-- > 0)
{
*lpDst++ = *lpSrc++;
} *lpDst++ = 0;
return;
}
VOID Strncat(CHAR *lpDst,CHAR *lpSrc,DWORD len)
{
while(*lpDst != 0) *lpDst++;
while(*lpSrc!= 0 && len-- > 0)
{
*lpDst++ = *lpSrc++;
} *lpDst++ = 0;
return;
}
DWORD_PTR * FindDevice(DWORD Base,DWORD Len)
{
unsigned long i = 0, n = 0;
for( i = 0; i < Len; i++ )
{
if(*(BYTE *)(Base+i+0x00)==0xC7)n++;
if(*(BYTE *)(Base+i+0x01)==0x06)n++;
if(*(BYTE *)(Base+i+0x06)==0x89)n++;
if(*(BYTE *)(Base+i+0x07)==0x86)n++;
if(*(BYTE *)(Base+i+0x0C)==0x89)n++;
if(*(BYTE *)(Base+i+0x0D)==0x86)n++;
if(n == 6) return (DWORD_PTR *)
(Base + i + 2);n = 0;
}
return(0);
}
Code:
// GetTime Function
#pragma warning(disable:4715)
#pragma warning(disable:4172)
char *TheTime()
{
struct tm * current_tm;time_t current_time;time (¤t_time);
current_tm = localtime (¤t_time);char *logbuf = new char[ 256 ];
sprintf( logbuf, "[ %02d:%02d.%02d ]", current_tm->tm_hour, current_tm->tm_min, current_tm->tm_sec );
return logbuf;
}
char *TheDate()
{
time_t curtime = time(0);tm now=*localtime(&curtime); char dest[BUFSIZ]={0};
const char format[]="[ %d/%b/%Y ]";
if (strftime(dest, sizeof(dest)-1, format, &now)>0)return dest;
}
Code:
#ifndef _Time_H #define _Time_H char *TheTime(); char *TheDate(); #endif
Code:
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <fstream>
#include <stdio.h>
using namespace std;
ofstream ofile;
char dlldir[320];
char *GoToDirectoryFile(char *filename)
{
static char path[320];
strcpy(path, dlldir);
strcat(path, filename);
return path;
}
char *GetDirectoryFile(char *filename)
{
static char path[320];
strcpy(path, dlldir);
strcat(path, filename);
return path;
}
void __cdecl AddLog (const char *fmt, ...){
if(ofile != NULL){
if(!fmt) { return; }
va_list va_alist;
char logbuf[256] = {0};
va_start (va_alist, fmt);
_vsnprintf (logbuf+strlen(logbuf), sizeof(logbuf) - strlen(logbuf), fmt, va_alist);
va_end (va_alist);
ofile << logbuf << endl;
}}
void LoginStart(HMODULE hDll)
{
DisableThreadLibraryCalls(hDll);
GetModuleFileName(hDll, dlldir, 512);
for(int i = strlen(dlldir); i > 0; i--) { if(dlldir[i] == '\\') { dlldir[i+1] = 0; break; } }
ofile.open(GetDirectoryFile("[HH]HostscripterHacks.txt"), ios::app);
}
Code:
char *GetDirectoryFile(char *filename); void __cdecl AddLog (const char * fmt, ...); void LoginStart(HMODULE hDll);
Thread wird täglich geupdated






