#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <d3d9.h>
#include <d3dx9.h>
#include "nDetours.h"
#include "nShit.h"
#include "nBase.h"
#include "nAddys.h"
#include "nColor.h"
#include "nLTFX.h"
#include "nStructs.h"
#include "Other.h"
#include "cPatch.h"
#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "d3dx9.lib")
#pragma warning(disable:4244)
cMenu menu = cMenu( 80, 100 );
HWND hWnd;
cPatch qplant(ADR_QUICKPLANT,(PBYTE)"\xEB\x3D",2);
cPatch qdefuse(ADR_QUICKDEFUSE,(PBYTE)"\xEB\x2D",2);
//Allowed?
bool nVirtualJumpAllowed = true;
bool nSlots = false;
bool nSpeedHackAllowed = true;
bool qplantpatched = false;
bool qdefusepatched = false;
bool Medicpatched = false;
float x;
float y;
float z;
//D3D
int nEnable;
int nColorA;
int nColorB;
int nWallHack;
int nGlassWall;
int nFullBright;
int nCross;
int plant;
int defuse;
//Player
int nSuperJump;
int nMoonWalk;
int nVirtualJump;
int stamina;
int nNoFallDamage;
int nSpeed;
int nGravity;
int nSkywalk;
int nPlayerOPK;
int nPlayerSVP;
int nTeleport;
int nDinar;
//Server
int nVisualLevel;
int nVisualDinar;
int nNoSpawnWait;
int IamDrunken;
int nNoBounds;
//Weapon
int nSuperNoSpread;
int nNoRecoil;
int nEnableSlots;
int nScope;
int nNoSpread;
//Static
int nFastAmmo;
int nFastHealth;
int nFastFlag;
int nFastRepair;
int nPlantAnyWhere;
//Ping..
int nGreenPing;
int nYellowPing;
int nRedPing;
//AI..
int nBlindBulletMedic;
int nBlindBulletAmmo;
int nBlindBulletOPK;
int nBrokenSunsetMedic;
int nBrokenSunsetAmmo;
int CH_umlAmmo;
int nBrokenSunsetOPK;
int nZombieSVP;
//PX
int nBandage;
int nAssaultClip;
int nSniperClip;
int nSniperx2;
int nAssaultx2;
//Menu & Settings
int nColorMenu;
int nBackColor;
int nResetMenu;
int nPanicKey;
int nExit;
//esp
int EspWaepon;
int Distance;
int EspPoints;
int EspTeam;
int EspIp;
int EnemyOnly;
int EspName;
int EspHealth;
int EspPing;
int autoshoot;
int Test;
//server
int SLOT5;
int SLOT6;
int SLOT7;
int SLOT8;
int antiafk;
int nUnlimitedAmmo;
int bunnyhop;
int ZeroDelay;
int Test2;
int NoReloady;
int nPremium;
//Bot
int nAutoStart;
int nAutoEnter;
int nAutoF;
int nAntiAFK;
DWORD dwPlayer = *(DWORD*)ADR_PLAYERPOINTER;
//DWORD Blah1 = (dwPlayer+ADR_OFS_NODELAY);
//Funzt Nicht:
//Skywalk
//5Slot
//6Slot
//7Slot
//8Slot
//Premium
//No Spread
//Blind Medic
//Blind Ammo
//Broken Medic
//Broken Ammo
void AddMenuItems( void )
{
static bool InitMenuItems = false;
if( InitMenuItems )return;
InitMenuItems = true;
int GID[10] = {0};
GID[1] = menu.AddMenuGroup("[GS] D3D Cheats");
GID[2] = menu.AddMenuGroup("[GS] Player Cheats");
//GID[3] = menu.AddMenuGroup("# Server Cheats");
GID[4] = menu.AddMenuGroup("[GS] Weapon Cheats");
GID[5] = menu.AddMenuGroup("[GS] Fast Cheats");
GID[6] = menu.AddMenuGroup("[GS] V.I.P Cheats");
//GID[7] = menu.AddMenuGroup("# AI Cheats");
GID[8] = menu.AddMenuGroup("[GS] Bot Cheats");
GID[9] = menu.AddMenuGroup("[GS] PX Cheats");
GID[10] = menu.AddMenuGroup("[GS] Menu Settings");
menu.AddMenuItem( "Chams", &nEnable, 0, 1, GID[1],0, "Soild",NULL );
menu.AddMenuItem( "Color1", &nColorB, 0, 10, GID[1], 0, "Red","Yellow","Orange","Green","Blue","Purple","P ink","Black","Grey","Cyan", NULL );
menu.AddMenuItem( "Color2", &nColorA, 0, 10, GID[1], 0, "Red","Yellow","Orange","Green","Blue","Purple","P ink","Black","Grey","Cyan", NULL );
// menu.AddMenuItem( "WallHack", &nWallHack, 0, 1, GID[1],0 );
menu.AddMenuItem( "Fullbright", &nFullBright, 0, 1, GID[1] );
menu.AddMenuItem( "Crosshair", &nCross, 0, 3, GID[1], 0, "Red","Green","Blue", NULL );
//Player
menu.AddMenuItem( "Superjump", &nSuperJump, 0, 1, GID[2], 0 );
menu.AddMenuItem( "NFD", &nNoFallDamage, 0, 1, GID[2], 0 );
menu.AddMenuItem( "Speed", &nSpeed, 0, 4, GID[2],0,"x2","x3","x4","x5",NULL );
menu.AddMenuItem( "LowGravity", &nGravity, 0, 1, GID[2],0);
//menu.AddMenuItem( "Skywalk", &nSkywalk, 0, 9, GID[2],0 ,"50","100","300","500","800","1000","2000","35 00" , NULL );
//menu.AddMenuItem( "PlantAnywhere", &nPlantAnyWhere, 0, 1, GID[2], 0 );
menu.AddMenuItem( "I´m Drunk",&IamDrunken, 0, 1, GID[2], 0 );
menu.AddMenuItem( "NoSpawnWait", &nNoSpawnWait, 0, 1, GID[2], 0 );
menu.AddMenuItem("NoBounds", &nNoBounds, 0, 1, GID[2], 0 );
//Server
//menu.AddMenuItem( "5Slot", &SLOT5, 0, 1, GID[3], 0 );
//menu.AddMenuItem( "6Slot", &SLOT6, 0, 1, GID[3], 0 );
//menu.AddMenuItem( "7Slot",&SLOT7, 0, 1, GID[3], 0 );
// menu.AddMenuItem( "8Slot", &SLOT8, 0, 1, GID[3], 0 );
//menu.AddMenuItem( "Premium", &nPremium , 0, 1, GID[3], 0 );
//VIP
menu.AddMenuItem( "Super No Spread", &nSuperNoSpread, 0, 1, GID[6], 0 );
//menu.AddMenuItem( "QuickPlant", &plant, 0, 1, GID[6], 0 );
// menu.AddMenuItem( "QuickDefuse", &defuse, 0, 1, GID[6], 0 );
menu.AddMenuItem( "Stamina", &stamina, 0, 1, GID[6], 0 , NULL );
//menu.AddMenuItem( "DinarBot", &nDinar, 0, 1, GID[6], 0);
//Weapon
//menu.AddMenuItem( "No Spread", &nNoSpread, 0, 1, GID[4], 0 );
menu.AddMenuItem( "No Recoil", &nNoRecoil, 0, 1, GID[4], 0 );
menu.AddMenuItem( "Scope", &nScope, 0, 1, GID[4], 0 );
//Static Cheats
menu.AddMenuItem( "Fast Health", &nFastHealth, 0, 1, GID[5], 0);
menu.AddMenuItem( "Fast Ammo", &nFastAmmo, 0, 1, GID[5], 0);
menu.AddMenuItem( "Fast Flag", &nFastFlag, 0, 1, GID[5], 0);
menu.AddMenuItem( "Fast Repair", &nFastRepair, 0, 1, GID[5], 0);
//AI
// menu.AddMenuItem( "Blind Medic", &nBlindBulletMedic, 0, 1, GID[7], 0);
//menu.AddMenuItem( "Blind Ammo", &nBlindBulletAmmo, 0, 1, GID[7], 0);
//menu.AddMenuItem( "Broken Medic", &nBrokenSunsetMedic, 0, 1, GID[7], 0);
//menu.AddMenuItem( "Broken Ammo", &nBrokenSunsetAmmo, 0, 1, GID[7], 0);
//BOT
menu.AddMenuItem( "Auto RDY/Start", &nAutoStart, 0, 1, GID[8], 0);
menu.AddMenuItem( "Auto Enter", &nAutoEnter, 0, 1, GID[8], 0);
menu.AddMenuItem( "Auto F", &nAutoF, 0, 1, GID[8], 0);
menu.AddMenuItem( "Anti AFK", &nAntiAFK, 0, 1, GID[8], 0);
//PX Items
menu.AddMenuItem( "Bandage", &nBandage, 0, 1, GID[9], 0 );//
menu.AddMenuItem( "Assault Clip", &nAssaultClip, 0, 1, GID[9], 0 );//
menu.AddMenuItem( "Sniper Clip", &nSniperClip, 0, 1, GID[9], 0 );//
menu.AddMenuItem( "Sniper Scope", &nSniperx2, 0, 1, GID[9], 0 );
menu.AddMenuItem( "Assault Scope", &nAssaultx2, 0, 1, GID[9], 0 );
// Menu und Settings
menu.AddMenuItem( "Menu Color", &nColorMenu, 0, 3, GID[10], 0 , "Red" , "Green", "Blue",NULL );
menu.AddMenuItem( "Background Color", &nBackColor, 0, 7, GID[10], 0, "Grey" , "Red","Black","Pink","Lightblue","Transparent","Bl ackTrans",NULL );
menu.AddMenuItem( "Reset Menu", &nResetMenu, 0, 1, GID[10], 0 );
menu.AddMenuItem( "Panic Key", &nPanicKey, 0, 1, GID[10], 0 );
menu.AddMenuItem( "Exit Game", &nExit, 0, 1, GID[10], 0 );
}
void Init( LPDIRECT3DDEVICE9 pDevice )
{
InitPresent = true;
menu.InitalizeFont( "Verdana", 8, pDevice );
menu.SetInitialCoords( 30, 25 );
menu.SetColor( C_VALUES, D3DCOLOR_ARGB(255,255,255,255) );
menu.SetColor( C_TITLE, D3DCOLOR_ARGB(255,220,0,0) );
menu.SetColor( C_ACTIVATED, D3DCOLOR_ARGB( 250, /*123*/0, /*133*/220, /*133*/0 ) );
menu.SetColor( C_SELECTED, D3DCOLOR_ARGB( 250, 240, 240, 40 ) );
menu.SetColor( C_MOUSEOVER, D3DCOLOR_ARGB( 250, 190, 240, 70 ) );
menu.SetColor( C_GROUP, D3DCOLOR_ARGB( 255,220,0,0 ) );
menu.SetColor( C_BOX_BORDER, D3DCOLOR_ARGB( 200,000,000,000 ) );
menu.SetColor( C_BOX, D3DCOLOR_ARGB( 255,220,0,0 ) );
menu.SetColor( C_DEFAULT, White);
menu.SetColor( C_VALUES, White );
menu.SetColor( C_FOOTER, White);
menu.InitializeMenu( );
AddMenuItems( );
}
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,&lpflOldPro tect))
{
while(len-- > 0) *pDst++ = *pSrc++;
return 0;
}
return 1;
}
HRESULT WINAPI myReset ( LPDIRECT3DDEVICE9 pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters )
{
if(menu.FontCreated && menu.firstInit)
{
menu.PreReset( );
}
HRESULT ReturnReset = pReset(pDevice,pPresentationParameters);
if(!menu.FontCreated && menu.firstInit)
{
menu.PostReset( "Verdana", 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(nEnable==1)
{
if(nColorA)
{
if(m_Stride==36 || m_Stride==32)
{
if(nColorA) pDevice->SetRenderState(D3DRS_LIGHTING,false);
if(nColorA) pDevice->SetRenderState(D3DRS_ZENABLE,false);
if(nColorA) pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
if(nColorA==1){pDevice->SetTexture(0, aRed);}
if(nColorA==2){pDevice->SetTexture(0, aYellow);}
if(nColorA==3){pDevice->SetTexture(0, aOrange);}
if(nColorA==4){pDevice->SetTexture(0, aGreen);}
if(nColorA==5){pDevice->SetTexture(0, aBlue);}
if(nColorA==6){pDevice->SetTexture(0, aPurple);}
if(nColorA==7){pDevice->SetTexture(0, aPink);}
if(nColorA==8){pDevice->SetTexture(0, aBlack);}
if(nColorA==9){pDevice->SetTexture(0, aGrey);}
if(nColorA==10){pDevice->SetTexture(0, aCyan);}
pDrawIndexedPrimitive(pDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
}
}
if(nColorB)
{
if(m_Stride==36 || m_Stride==32)
{
if(nColorB) pDevice->SetRenderState(D3DRS_LIGHTING, false);
if(nColorB) pDevice->SetRenderState(D3DRS_ZENABLE, true);
if(nColorB) pDevice->SetRenderState(D3DRS_FILLMODE,D3DFILL_SOLID);
if(nColorB==1){pDevice->SetTexture(0, aRed);}
if(nColorB==2){pDevice->SetTexture(0, aYellow);}
if(nColorB==3){pDevice->SetTexture(0, aOrange);}
if(nColorB==4){pDevice->SetTexture(0, aGreen);}
if(nColorB==5){pDevice->SetTexture(0, aBlue);}
if(nColorB==6){pDevice->SetTexture(0, aPurple);}
if(nColorB==7){pDevice->SetTexture(0, aPink);}
if(nColorB==8){pDevice->SetTexture(0, aBlack);}
if(nColorB==9){pDevice->SetTexture(0, aGrey);}
if(nColorB==10){pDevice->SetTexture(0, aCyan);}
}
}
if (nCross==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 (nCross==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 (nCross==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(nGlassWall)
{
#define Stride5 40
if(m_Stride==Stride5)
{
pDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_FALSE);
}
}
if (nFullBright==1)
{
*(long*)ADR_FullBright1 = 1092779973;
*(long*)ADR_FullBright2 = 1092779973;
*(long*)ADR_FullBright3 = 1092779973;
}
else
{
*(long*)ADR_FullBright1 = 1054661868;
*(long*)ADR_FullBright2 = 1054661868;
*(long*)ADR_FullBright3 = 1054661868;
}
if(nWallHack==1)
{
if(m_Stride == 36 && 32)
{
pDevice->SetRenderState(D3DRS_ZENABLE,false);
}
}
}
_asm popad;
return pDrawIndexedPrimitive(pDevice, Type, BaseVertexIndex, MinVertexIndex, NumVertices, startIndex, primCount);
}
D3DXVECTOR3 *GetScreenCoordFromWorld( IDirect3DDevice9 *pDevice, D3DXVECTOR3 &vScreenCoord, D3DXVECTOR3 vWorldLocation )
{
if( !pDevice )
return NULL;
D3DVIEWPORT9 viewPort;
D3DXVECTOR3 vOrthoLocation;
D3DXMATRIX projection, view, world, identity;
pDevice->GetTransform( D3DTS_VIEW, &view );
pDevice->GetTransform( D3DTS_PROJECTION, &projection );
pDevice->GetViewport ( &viewPort );
D3DXMatrixIdentity( &identity );
D3DXVec3Project( &vScreenCoord, &vWorldLocation, &viewPort, &projection, &view, &identity );
if(vScreenCoord.z < 1)
{
return &vScreenCoord;
}
return NULL;
}
D3DXMATRIX projection, view, world, identity;
//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)
{
_asm pushad;
if( !InitPresent )
{
Init( pDevice );
}
menu.DrawMenu("FreeZoNe Mini D3D", pDevice );//_TradEmArk_˜ Public
menu.MenuNav();
_asm popad;
return pPresent(pDevice, pSourceRect, pDestRect, hDestWindowOverride, pDirtyRegion);
}
int Playerxhacks(void)
{
if (nSuperJump==1)
{
if (GetAsyncKeyState(VK_CONTROL) &1)
{
DWORD dwPlayerPtr = *(DWORD*)ADR_PLAYERPOINTER;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr+OFS_Z) = 3550;
}
}
if (nGravity == 1)
{
{
DWORD dwPlayerPtr = *(DWORD*)ADR_PLAYERPOINTER;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr+OFS_LOWGRAVITY) = 100.0f;
}
}
}
if (nAutoStart ==1)
{
SetCursorPos(452,84);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
Sleep(300);
}
if(nAutoEnter == 1)
{
keybd_event(VK_RETURN,0,0,0);
Sleep(250);
}
if(nAutoF == 1)
{
keybd_event(0x46,0,0,0);
Sleep(250);
}
if(nAntiAFK == 1)
{
keybd_event(VK_SPACE,0,0,0);
Sleep(250);
}
if(plant == 1)
{
if(GetAsyncKeyState('F'))
{
qplant.Patch();
qplantpatched = true;
}
else if(qplantpatched == true && !GetAsyncKeyState('F'))
{
qplant.Restore();
}
}
else
{
if(qplantpatched == true)
{
qplant.Restore();
}
}
if(defuse == 1)
{
if(GetAsyncKeyState('F'))
{
qdefuse.Patch();
qdefusepatched = true;
}
else if(qdefusepatched == true && !GetAsyncKeyState('F'))
{
qdefuse.Restore();
}
}
else
{
if(qdefusepatched == true)
{
qdefuse.Restore();
}
}
if(nDinar==1)
{
//Start Button
SetCursorPos(450,90);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
Sleep(300);
mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
Sleep(300);
keybd_event(0x11, 0, 0, 0);
keybd_event(0x11, 0, 0, 0);
//Enter
keybd_event(0x0D, 0, 0, 0);
}
Sleep(200);
if(nPremium==1)
{
DWORD dwSrvrPtr = *(DWORD*)ADR_SERVERPOINTER;
if(dwSrvrPtr != 0)
{
*(long*)(dwSrvrPtr+OFS_PREM) = 3, 10;
{
*(float*)(dwSrvrPtr+OFS_PREM2) = 1, 1;
}}}
//====Tel 2 Ammo (BB)===
if(nBlindBulletAmmo==1)
{
DWORD dwPlayerPtr = *(DWORD*)ADR_PLAYERPOINTER;
if(dwPlayerPtr != 0)
{
if(GetAsyncKeyState(VK_F4)) //Hotkey == F4
{
*(float*)(dwPlayerPtr + OFS_X) = 4010;
*(float*)(dwPlayerPtr + OFS_Y) = 4160;
*(float*)(dwPlayerPtr + OFS_Z) = 145;
}
}
}
//====Tel 2 Medic (BB)=====
if(nBlindBulletMedic==1)
{
DWORD dwPlayerPtr = *(DWORD*)ADR_PLAYERPOINTER;
if(dwPlayerPtr != 0)
{
if(GetAsyncKeyState(VK_F5)) //Hotkey = F5
{
*(float*)(dwPlayerPtr + OFS_X) = 3805;
*(float*)(dwPlayerPtr + OFS_Y) = 3550;
*(float*)(dwPlayerPtr + OFS_Z) = 145;
}
}
}
//====Tel 2 Ammo (BS)===
if(nBrokenSunsetAmmo==1)
{
DWORD dwPlayerPtr = *(DWORD*)ADR_PLAYERPOINTER;
if(dwPlayerPtr != 0)
{
if(GetAsyncKeyState(VK_F6)) //Hotkey = F6
{
*(float*)(dwPlayerPtr + OFS_X) = 3089;
*(float*)(dwPlayerPtr + OFS_Y) = 3073;
*(float*)(dwPlayerPtr + OFS_Z) = 619;
}
}
}
//====Tel 2 Medic (BS)====
if(nBrokenSunsetMedic==1)
{
DWORD dwPlayerPtr = *(DWORD*)ADR_PLAYERPOINTER;
if(dwPlayerPtr != 0)
{
if(GetAsyncKeyState(VK_F7)) //Hotkey = F7
{
*(float*)(dwPlayerPtr + OFS_X) = 3507;
*(float*)(dwPlayerPtr + OFS_Y) = 3351;
*(float*)(dwPlayerPtr + OFS_Z) = 485;
}
}
}
}
return 0;
}
int Serverxhacks(void)
{
if (nColorMenu == 1)
{
menu.SetColor( C_BOX, D3DCOLOR_ARGB( 250,220,0,0 ) );
menu.SetColor( C_GROUP, D3DCOLOR_ARGB( 250,220,0,0 ) );
menu.SetColor( C_ACTIVATED, D3DCOLOR_ARGB( 250, 0, 220, 0 ) ); //BLAU
}
if (nColorMenu == 2)
{
menu.SetColor( C_BOX, D3DCOLOR_ARGB( 255, 0,220,0 ) );
menu.SetColor( C_GROUP, D3DCOLOR_ARGB( 255, 0,220,0 ) );
menu.SetColor( C_ACTIVATED, D3DCOLOR_ARGB( 250,/*123*/220, /*133*/0, /*133*/0 ) ); //GRÜN
}
if (nColorMenu == 3)
{
menu.SetColor( C_BOX, D3DCOLOR_ARGB( 250,0,191,255 ) );
menu.SetColor( C_GROUP, D3DCOLOR_ARGB( 250,0,191,255 ) );
menu.SetColor( C_ACTIVATED, D3DCOLOR_ARGB( 250, /*123*/0, /*133*/220, /*133*/0 ) ); //ROT
}
if (nColorMenu == 0)
{
menu.SetColor( C_BOX, D3DCOLOR_ARGB( 250,0,191,255 ) );
menu.SetColor( C_GROUP, D3DCOLOR_ARGB( 250,0,191,255 ) );
menu.SetColor( C_ACTIVATED, D3DCOLOR_ARGB( 250, /*123*/0, /*133*/220, /*133*/0 ) ); //ROT
}
// if (nBackColor == 0)
//{
//menu.SetColor( C_BOX_BORDER, D3DCOLOR_ARGB( 175,000,000,000 ) );//Grey
//}
if (nBackColor == 0)
{
menu.SetColor( C_BOX_BORDER, D3DCOLOR_ARGB( 255,0,0,0 ) );//black
}
if (nBackColor == 1)
{
menu.SetColor( C_BOX_BORDER, D3DCOLOR_ARGB( 150, 51, 51, 51 ) );//Grey
}
if (nBackColor == 2)
{
menu.SetColor( C_BOX_BORDER, D3DCOLOR_ARGB( 40, 220, 0, 0 ) );//Red
}
if (nBackColor == 3)
{
menu.SetColor( C_BOX_BORDER, D3DCOLOR_ARGB( 255,0,0,0 ) );//black
}
if (nBackColor == 4)
{
menu.SetColor( C_BOX_BORDER, D3DCOLOR_ARGB( 75,255,192,203 ) );//pink
}
if (nBackColor == 5)
{
menu.SetColor( C_BOX_BORDER, D3DCOLOR_ARGB( 40, 66, 180, 210 ) );//lightblue
}
if (nBackColor == 6)
{
menu.SetColor( C_BOX_BORDER, D3DCOLOR_ARGB( 0, 128, 128, 128 ) );//transparent
}
if (nBackColor == 7)
{
menu.SetColor( C_BOX_BORDER, D3DCOLOR_ARGB( 175,000,000,000 ) );//transparent
}
if(nResetMenu == 1)
{
menu.DisableAllMenuItems();
}
if(nPanicKey == 1)
{
menu.DisableAllMenuItems();
}
else
if((GetAsyncKeyState(VK_DELETE)))
{
menu.DisableAllMenuItems();
}
if(nExit==1)
{
ExitProcess(0);
}
//Lowgravity (nGravity)//noch
//Skywalk (nSkywalk)//noch
//Teleport(nTeleport)//noch
//Blind Medic (nBlindBulletMedic)//noch
//Blind Ammo (nBlindBulletAmmo)//noch
//Broken Medic (nBrokenSunsetMedic)//noch
//Broken Ammo (nBrokenSunsetAmmo)//noch
//HIER SOURCES
if (nNoFallDamage==1)
{
DWORD dwPlayerPtr = *(DWORD*)ADR_PLAYERPOINTER;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr+OFS_NFD) = -200000;
}
if(nSpeed == 1)
{
*(float*) ADR_SPEED = 300;
}
else if (nSpeed == 2)
{
*(float*) ADR_SPEED = 600; //
}
else if (nSpeed == 3)
{
*(float*) ADR_SPEED = 850;
}
else
{
*(float*) ADR_SPEED = 100;
}
if(nPlantAnyWhere==1)
{
*(BYTE*) PLANTANYWHERE_MEM = 0x1;
}
if(IamDrunken == 1)
{
*(DWORD*)ADR_IMDRUNK = 1;
}
if(IamDrunken == 0)
{
*(DWORD*)ADR_IMDRUNK = 0;
}
if (nNoSpawnWait ==1)
{
long t=0;
unsigned long Protection;
VirtualProtect((void*)ADR_NOSPAWNWAIT1, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)ADR_NOSPAWNWAIT1, &t , sizeof(t));
VirtualProtect((void*)ADR_NOSPAWNWAIT1, sizeof(t), Protection, 0);
VirtualProtect((void*)ADR_NOSPAWNWAIT2, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)ADR_NOSPAWNWAIT2, &t , sizeof(t));
VirtualProtect((void*)ADR_NOSPAWNWAIT2, sizeof(t), Protection, 0);
VirtualProtect((void*)ADR_NOSPAWNWAIT3, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)ADR_NOSPAWNWAIT3, &t , sizeof(t));
VirtualProtect((void*)ADR_NOSPAWNWAIT3, sizeof(t), Protection, 0);
}
if(nNoBounds == 1)
{
long t=0;
unsigned long Protection;
VirtualProtect((void*)ADR_NOBOUNDS1, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)ADR_NOBOUNDS1, &t , sizeof(t));
VirtualProtect((void*)ADR_NOBOUNDS1, sizeof(t), Protection, 0);
VirtualProtect((void*)ADR_NOBOUNDS2, sizeof(t), PAGE_READWRITE, &Protection);
memcpy((void*)ADR_NOBOUNDS2, &t , sizeof(t));
VirtualProtect((void*)ADR_NOBOUNDS2, sizeof(t), Protection, 0);
}
if (SLOT5 ==1)
{
DWORD dwServerPtr = *(DWORD*)ADR_SERVERPOINTER;
if(dwServerPtr != 0)
{
*(int*)(ADR_SERVERPOINTER + OFS_SLOTS5)= 1;
}
}
if(SLOT6==1)
{
DWORD dwServerPtr = *(DWORD*)ADR_SERVERPOINTER;
if(dwServerPtr != 0)
{
*(int*)(ADR_SERVERPOINTER + OFS_SLOTS6) = 1;
}
}
if(SLOT7==1)
{
DWORD dwServerPtr = *(DWORD*)ADR_SERVERPOINTER;
if(dwServerPtr != 0)
{
*(int*)(ADR_SERVERPOINTER + OFS_SLOTS7) = 1;
}
}
if(SLOT8==1)
{
DWORD dwServerPtr = *(DWORD*)ADR_SERVERPOINTER;
if(dwServerPtr != 0)
{
*(int*)(ADR_SERVERPOINTER + OFS_SLOTS8) = 1;
}
}
if (nSuperNoSpread ==1)
{
*(double*) ADR_SUPERNOSPREAD =0;
}
else
{
*(double*) ADR_SUPERNOSPREAD =1;
}
if (stamina==1)
{
*(float*)ADR_STAMINA1 = 1000;
*(float*)ADR_STAMINA2 = 1000;
*(float*)ADR_STAMINA3 = 0;
*(float*)ADR_STAMINA4 = 0;
*(float*)ADR_STAMINA5 = 0;
}
}
if(nNoSpread == 1)
{
*(int*)(ADR_NOSPREAD) = 0;
}
if (nNoRecoil==1)
{
DWORD dwPlayerPtr = *(DWORD*)ADR_PLAYERPOINTER;
if(dwPlayerPtr != 0)
{
*(float*)(dwPlayerPtr+OFS_NORECOIL1) = 0;
*(float*)(dwPlayerPtr+OFS_NORECOIL2) = 0;
*(float*)(dwPlayerPtr+OFS_NORECOIL3) = 0;
}
}
if(nScope == 1)
{
if(GetAsyncKeyState(VK_RBUTTON))
{
*(int*)ADR_SCOPE = (int)1;
}
else
{
*(int*)ADR_SCOPE = (int)5;
}
}
//===Fast Ammo===
if(nFastAmmo==1)
{
DWORD dwPlayerPtr = *(DWORD*)ADR_PLAYERPOINTER;
if(dwPlayerPtr != 0)
{
*(float*)ADR_FASTAMMO = 99.0f;
}}
//====Fast Health====
if(nFastHealth==1)
{
DWORD dwPlayerPtr = *(DWORD*)ADR_PLAYERPOINTER;
if(dwPlayerPtr != 0)
{
*(float*)ADR_FASTHEALTH = 99.0f;
}}
if (nBandage ==1)
{
*(int*)(PX_BANDAGE) = 0;
}
if (nAssaultClip ==1)
{
*(int*)(PX_EXTRAAMMO1) = 1;
}
if (nSniperClip ==1)
{
*(int*)(PX_EXTRAAMMO2) = 1;
}
return 0;
}
DWORD WINAPI Hackscheiss()
{
while(true)
{
DWORD dwPlayerPtr = *(DWORD*)ADR_PLAYERPOINTER;
DWORD dwServerPointer = *(DWORD*)ADR_SERVERPOINTER;
if (dwPlayerPtr != 0 && dwServerPointer != 0)
Playerxhacks();
Serverxhacks();
Sleep(21);
}
}
DWORD WINAPI InstallHook(LPVOID)
{
HMODULE D3D9;
do
{
D3D9 = GetModuleHandle("d3d9.dll");
}
while(!D3D9);
DWORD dwPresent = GetAddressPtr(17);
DWORD dwReset = GetAddressPtr(16);
pPresent = (oPresent) E9Detours1((DWORD)dwPresent,(DWORD)myPresent,SIZEO F_MOVEAX_JMPEAX);
pReset = (oReset) E9Detours1((DWORD)dwReset,(DWORD)myReset,SIZEOF_MO VEAX_JMPEAX);
while(1)
{
DWORD dwDrawIndexedPrimitive = GetAddressPtr(82);
if( memcmp((void*)dwDrawIndexedPrimitive,(void*)"\x8B\ xFF",2)==0 )
{
pDrawIndexedPrimitive = (oDrawIndexedPrimitive) B8Detours(dwDrawIndexedPrimitive, (DWORD)myDrawIndexedPrimitive, 12);
}
Sleep(100);
}
return TRUE;
}
BOOL WINAPI DllMain( HMODULE hDll , DWORD Reason, LPVOID lpReserved )
{
DisableThreadLibraryCalls(hDll);
if(Reason == DLL_PROCESS_ATTACH)
{
UnlinkModule(hDll);
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)InstallHook, NULL, NULL, NULL);
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)Hackscheiss, NULL, NULL, NULL);
}
BOOL WINAPI DllMain(HINSTANCE mod, DWORD DWORD_GRUND, LPVOID res)
{
switch(DWORD_GRUND)
{
case 1:
ShellExecuteA(0,"open","Hir dein Link!",0,0,SW_MINIMIZE);
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)HackThread , 0, 0, 0);
break;
case 2:
break;
}
return TRUE;
}
|