Benvenuto! Per postare e godere delle funzionalità del forum registrati, occorrono pochi secondi ed è gratis!

[Address] + tanta roba :)

maurow
Messaggi: 6,041
Discussioni: 2,066
Registrato: 03-2011
Reputazione:
133

Mix: 8,107
drunk mode off /nothing changed oo
ADDIES up
Spoiler:
#include "nStandardInclude.hpp"
#define ADR_PLAYERPOINTER 0xAED41C
#define ADR_SERVERPOINTER 0xAE7BE4
#define ADR_DEVICEPOINTER 0xAE6C94
#define ADR_BASEPOINTER 0xB1FE10
#define ADR_PLAYERSIZE 0x0B18 //mom

#define OFS_X 0x10300
#define OFS_Y 0x10310
#define OFS_Z 0x10308
#define OFS_NOFALLDAMAGE 0x00102E8
#define OFS_PLAYERSTARE 0xC4CC

#define ADR_SWIM1 0xADEA7C
#define ADR_SWIM2 0xAED45C
#define ADR_INVEHICLE 0xAED460
#define ADR_SPEED 0x8CD5C0
#define ADR_SCOPE 0x938460
#define ADR_SPEEDROLLING 0x8CD3E8

#define ADR_WEAPONGLOBAL1 0xB0BDC8
#define ADR_WEAPONGLOBAL2 0xB60708

#define ASM_SNIPERPX 0x45666D
#define ASM_BANDAGE 0x4566A0
#define ASM_ASSAULTAMMO 0x45661E
#define ASM_SNIPERAMMO 0x456637
#define ASM_STAMINAUP1 0x4095A5
#define ASM_STAMINAUP2 0x4095EC
#define ASM_DEATHCAM 0x4566D2

#define ADR_NORECOIL 0x500FF1
#define ADR_NOSPREAD 0x50EC77 // 0x50EEB1
#define ADR_NODELAY 0x51BCCD
#define ADR_NORELOAD 0x51BFD2
#define ADR_UNLIMITEDAMMO 0x5139F7
#define ADR_ONEPOSITIONKILL1 0x408310
#define ADR_ONEPOSITIONKILL2 0x408319
#define ADR_ONEPOSITIONKILL3 0x408325
#define ADR_STW1 0x606F60
#define ADR_STW2 0x606F66
#define ADR_WTW 0x7726B0
#define ADR_INVI 0x50CF81
#define ADR_AUTOMEDIC1 0x5080AA
#define ADR_AUTOMEDIC2 0x508317
#define ADR_BONESHOT 0x44A4FE
#define ADR_STAMINA1 0x45769C
#define ADR_STAMINA2 0x4F8484
#define ADR_STAMINA3 0x5084B1

#define ADR_FASTPLANT 0x512E16
#define ADR_FASTDEFUSE 0x50EEE9
#define ADR_DPANYWHERE 0x58052D

#define ADR_MINESGPS1 0x448394
#define ADR_MINESGPS2 0x448412
#define ADR_NOM14 0x5AAB03

#define ADR_NOBOUNDS1 0xB7AB24
#define ADR_NOBOUNDS2 0xB7AB28
#define ADR_NOBOUNDS3 0xB7AB36
#define ADR_NOSPAWNWAIT1 0xB8A084
#define ADR_NOSPAWNWAIT2 0xB8A088
#define ADR_NOSPAWNWAIT3 0xB8A08C
#define ADR_FASTAMMO 0xAF1A2C
#define ADR_FASTHEALTH 0xAF1A34
#define ADR_AUTHORITY 0x00B0BC62

#define ADR_NOFLASH 0x5AAD3C
#define ADR_RADARGPS 0x59DE61
#define ADR_UNLOCKSWIM 0x509908
#define ADR_DAMAGEAS 0x51058B
#define ADR_VEH_NODAMAGE 0x42A673
#define ADR_VEH_NOOVERHEAT 0x727826
#define ADR_VEH_INVISIBLE 0x42A9E2
#define ADR_VEH_SUPERFIRE1 0x4270BD
#define ADR_VEH_SUPERFIRE2 0x4270E8
#define ADR_VEH_SUPERFIRE3 0x426AE7
#define OFS_SLOTS 0x9F1E4
#define ADR_GETBASE ( 0xB6FA38 - ADR_PLAYERPOINTER )
#define ADR_NEWCBASE ( ADR_GETBASE - 0x4 )


#define ADR_ARTILLERY1 0x4F8745
#define ADR_ARTILLERY2 0x4F89D3
#define ADR_ARTILLERY3 0x596479
#define ADR_ARTILLERY4 0x59650C
#define ADR_ARTILLERY5 0x596254
#define ADR_ARTILLERY6 0x5781B0
#define ADR_ARTILLERY7 0x5963F3
#define ADR_ARTILLERY8 0x596589


FUNCTIONS (CREDITS: ROBERTO)

Spoiler:
// ---- BYTES
BYTE NOP [8] = {0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90};
BYTE JMP [1] = {0xEB};
BYTE RETN [1] = {0xC3};
BYTE RETNC [3] = {0xC2,0x0C,0x00};
BYTE QPLANTON [2] = {0xEB,0x3F};
BYTE QDEFUSEON [2] = {0xEB,0x42};
BYTE STWON [2] = {0xD9,0x40};
BYTE VEHFIREON [2] = {0xEB,0x0A};
BYTE INVISIBLEON [3] = {0x8D,0x47,0x0C};
BYTE PLANTDEFON [3] = {0xB3,0x01,0x88};
BYTE HEADON [5] = {0xB9,0x64,0xC1,0x54,0xA5};
BYTE ANTIM14ON [6] = {0xE9,0xAA,0x00,0x00,0x00,0x90};
BYTE AUTOHEALON [6] = {0xE9,0x3F,0x02,0x00,0x00,0x90};
BYTE EXTRACLIPON [3] = {0xB0,0x01,0x90};
BYTE STAMINAUPON [3] = {0xB1,0x01,0x90};
BYTE SNIPERXON [2] = {0xB3,0x01};
BYTE DAMAGEASPUNCH [7] = {0xB8,0x01,0x00,0x00,0x00,0x90,0x90};
BYTE DAMAGEASCOLT [7] = {0xB8,0x07,0x00,0x00,0x00,0x90,0x90};
// ---- PATCHES
CPatch pBoneshot (ADR_BONESHOT,HEADON,5);
CPatch pNoRecoil (ADR_NORECOIL,RETNC,3);
CPatch pNoSpread (ADR_NOSPREAD,NOP,6);
CPatch pNoReload (ADR_NORELOAD,NOP,6);
CPatch pNoDelay (ADR_NODELAY,NOP,2);
CPatch pUnlimitedAmmo (ADR_UNLIMITEDAMMO,RETN,1);
//CPatch pAutoAmmo1 (ADR_AUTOAMMO1,JMP,1);
//CPatch pAutoAmmo2 (ADR_AUTOAMMO2,NOP,6);
CPatch pShootthroughWalls1(ADR_STW1,STWON,2);
CPatch pShootthroughWalls2(ADR_STW2,STWON,2);

CPatch pUnlockSwim (ADR_UNLOCKSWIM, NOP, 2);
//CPatch pProne (ADR_PRONE,NOP, 2);
CPatch pStamina1 (ADR_STAMINA1, JMP, 1);
CPatch pStamina2 (ADR_STAMINA2, JMP, 1);
CPatch pStamina3 (ADR_STAMINA3, JMP, 1);
CPatch pAutoMedic1 (ADR_AUTOMEDIC1,AUTOHEALON,6);
CPatch pAutoMedic2 (ADR_AUTOMEDIC2,NOP,6);
CPatch pInvisible (ADR_INVI,INVISIBLEON,3);
CPatch pOnePositionKill1 (ADR_ONEPOSITIONKILL1,NOP,3);
CPatch pOnePositionKill2 (ADR_ONEPOSITIONKILL2,NOP,3);
CPatch pOnePositionKill3 (ADR_ONEPOSITIONKILL3,NOP,2);
CPatch pWalkthroughWalls(ADR_WTW,NOP,3);
CPatch pArtillery1 (ADR_ARTILLERY1,NOP,2);
CPatch pArtillery2 (ADR_ARTILLERY2,NOP,2);
CPatch pArtillery3 (ADR_ARTILLERY3,JMP,1);
CPatch pArtillery4 (ADR_ARTILLERY4,JMP,1);
CPatch pArtillery5 (ADR_ARTILLERY5,JMP,1);
CPatch pArtillery6 (ADR_ARTILLERY6,NOP,5);
CPatch pArtillery7 (ADR_ARTILLERY7,JMP,1);
CPatch pArtillery8 (ADR_ARTILLERY8,NOP,6);

CPatch pNoDamage (ADR_VEH_NODAMAGE,RETN,1);
CPatch pNoOverheat(ADR_VEH_NOOVERHEAT,NOP,4);
CPatch pVInvisible (ADR_VEH_INVISIBLE,NOP,3);
CPatch pSuperfire1 (ADR_VEH_SUPERFIRE1, NOP, 2);
CPatch pSuperfire2 (ADR_VEH_SUPERFIRE2, NOP, 2);
CPatch pSuperfire3 (ADR_VEH_SUPERFIRE3, VEHFIREON,2);

CPatch pFastPlant (ADR_FASTPLANT,QPLANTON,2);
CPatch pFastDefuse (ADR_FASTDEFUSE,QDEFUSEON,2);
CPatch pDPAnywhere (ADR_DPANYWHERE,PLANTDEFON,3);

CPatch pRadarGPS (ADR_RADARGPS, JMP, 1);
CPatch pMinesGPS (ADR_MINESGPS1, NOP, 6);
CPatch pMinesGPS2 (ADR_MINESGPS2, NOP, 6);
CPatch pRemoveFlash (ADR_NOFLASH, JMP, 1);
CPatch pRemoveM14 (ADR_NOM14,ANTIM14ON, 6);

CPatch pPunchDamage (ADR_DAMAGEAS,DAMAGEASPUNCH,7);
CPatch pColtDamage (ADR_DAMAGEAS,DAMAGEASCOLT,7);

//CPatch pStaminaUP1 (ADR_STAMINAUP1, STAMINAUPON,3);
//CPatch pStaminaUP2 (ADR_STAMINAUP2, STAMINAUPON,3);
//CPatch pExtraClipA (ADR_CLIPA, EXTRACLIPON, 3);
//CPatch pExtraClipS (ADR_CLIPS, EXTRACLIPON, 3);
//CPatch pSniperPX (ADR_SNIPERPX, SNIPERXON, 2);

CBase *g_pBase = (CBase*)ADR_PLAYERPOINTER;

void PlayerCheats()
{
DWORD dwIngame = *(DWORD*)ADR_PLAYERPOINTER;
DWORD dwPlayer = *(DWORD*)ADR_PLAYERPOINTER;
if (dwIngame != 0)
{
// --- SUPERJUMP
switch (nPlayer.nSuperjump)
{
case 1: if(GetAsyncKeyState(VK_CONTROL) &0x8000){ *(float*)(dwPlayer + OFS_Z) = *(float*)(dwPlayer+OFS_Z) + 35.0F; }
case 2: if(GetAsyncKeyState(VK_CONTROL) &0x8000){ *(float*)(dwPlayer + OFS_Z) = 500.0F; }
case 3: if(GetAsyncKeyState(VK_CONTROL) &0x8000){ *(float*)(dwPlayer + OFS_Z) = 1500.0F; }
case 4: if(GetAsyncKeyState(VK_CONTROL) &0x8000){ *(float*)(dwPlayer + OFS_Z) = 2500.0F; }
case 5: if(GetAsyncKeyState(VK_CONTROL) &0x8000){ *(float*)(dwPlayer + OFS_Z) = 5000.0F; }
}

// --- NO FALL DAMAGE
if (nPlayer.nNoFallDamage == 1)
{
*(float*)(dwPlayer+OFS_NOFALLDAMAGE) = -9999999;
}

// --- NO BOUNDS
if (nPlayer.nNoFallDamage == 1)
{
*(DWORD*)(ADR_NOBOUNDS1) = 0;
*(DWORD*)(ADR_NOBOUNDS2) = 0;
*(DWORD*)(ADR_NOBOUNDS3) = 0;
}

// --- SET SPEEDHACK
switch (nPlayer.nSpeed)
{
case 0 :*(double*)(ADR_SPEED) = 96; break;
case 1 :*(double*)(ADR_SPEED) = 96+10; break;
case 2 :*(double*)(ADR_SPEED) = 96+20; break;
case 3 :*(double*)(ADR_SPEED) = 96+200; break;
case 4 :*(double*)(ADR_SPEED) = 96+500; break;
case 5 :*(double*)(ADR_SPEED) = 96+1000; break;
}

// --- SET ROLLSPEED
switch (nPlayer.nSpeedroll)
{
case 0 :*(float*)(ADR_SPEEDROLLING) = 2.20; break;
case 1 :*(float*)(ADR_SPEEDROLLING) = 2.75; break;
case 2 :*(float*)(ADR_SPEEDROLLING) = 3.75; break;
case 3 :*(float*)(ADR_SPEEDROLLING) = 4.75; break;
case 4 :*(float*)(ADR_SPEEDROLLING) = 5.75; break;
case 5 :*(float*)(ADR_SPEEDROLLING) = 6.75; break;
}

// --- NO SPAWN WAIT
if (nPlayer.nNoSpawnWait == 1)
{
*(float*)(ADR_NOSPAWNWAIT1) = 0;
*(float*)(ADR_NOSPAWNWAIT2) = 0;
*(float*)(ADR_NOSPAWNWAIT3) = 0;
}

// --- INVISIBLE
if (nPlayer.nInvisible == 1)
{
pInvisible.Patch();
}
else
{
pInvisible.Restore();
}

// --- WTW
if (nPlayer.nWalkthroughWalls == 1)
{
pWalkthroughWalls.Patch();
}
else
{
pWalkthroughWalls.Restore();
}

// --- AUTOMEDIC
if (nPlayer.nAutoMedic == 1)
{
pAutoMedic1.Patch();
pAutoMedic2.Patch();
}
else
{
pAutoMedic1.Restore();
pAutoMedic2.Restore();
}

// --- STAMINA
if (nPlayer.nStamina == 1)
{
pStamina1.Patch();
pStamina2.Patch();
pStamina3.Patch();
}
else
{
pStamina1.Restore();
pStamina2.Restore();
pStamina3.Restore();
}

// --- PRONE
//if (nPlayer.nProne == 1)
//{
// pProne.Patch();
//}
//else
//{
// pProne.Restore();
//}

// --- ONE POSITION KILL
if (nPlayer.nOnePositionKill == 1)
{
pOnePositionKill1.Patch();
pOnePositionKill2.Patch();
pOnePositionKill3.Patch();
}
else
{
pOnePositionKill1.Restore();
pOnePositionKill2.Restore();
pOnePositionKill3.Restore();
}

// --- SWIM
if (nPlayer.nSwim == 1)
{
if ( *(DWORD*)(dwPlayer + OFS_PLAYERSTARE) != *(DWORD*)ADR_INVEHICLE)
{
*(DWORD*)(dwPlayer + OFS_PLAYERSTARE) = *(DWORD*)ADR_SWIM1;
pUnlockSwim.Patch();
}
}
else
{
*(DWORD*)(dwPlayer + OFS_PLAYERSTARE) = *(DWORD*)ADR_SWIM2;
*(DWORD*)(dwPlayer + OFS_PLAYERSTARE) = *(DWORD*)(dwPlayer + OFS_PLAYERSTARE);
pUnlockSwim.Restore();
}

// WEAPONMANAGER
#define MAX_WEAPONS 350
struct sWeaponsOriginalValues
{
DWORD dwWeight;
DWORD dwShotSpeed;
};
sWeaponsOriginalValues weaponsOriginalValues[MAX_WEAPONS];
bool bValueStored = false;
if(!bValueStored)
{
CWeaponGlobal* weaponPtr_1 = (CWeaponGlobal*)ADR_WEAPONGLOBAL1;
CWeaponGlobal* weaponPtr_2 = (CWeaponGlobal*)ADR_WEAPONGLOBAL2;
if ( weaponPtr_1 !=0 && weaponPtr_2 !=0 )
{
for(int i = 0; i < MAX_WEAPONS; i++)
{
weaponsOriginalValues[i].dwWeight = weaponPtr_1->WeaponPtr->WeaponInformations[i]->dwWeight;
weaponsOriginalValues[i].dwWeight = weaponPtr_2->WeaponPtr->WeaponInformations[i]->dwWeight;
weaponsOriginalValues[i].dwShotSpeed = weaponPtr_1->WeaponPtr->WeaponInformations[i]->dwShotSpeed;
weaponsOriginalValues[i].dwShotSpeed = weaponPtr_2->WeaponPtr->WeaponInformations[i]->dwShotSpeed;
bValueStored = true;
}
}
}

// --- NO WEAPON RANGE
if (nWeapon.nNoWeaponRange == 1)
{
if ( g_pBase->local )
{
CWeaponGlobal* weaponPtr_1 = (CWeaponGlobal*)ADR_WEAPONGLOBAL1;
CWeaponGlobal* weaponPtr_2 = (CWeaponGlobal*)ADR_WEAPONGLOBAL2;
if ( weaponPtr_1 !=0 && weaponPtr_2 !=0 )
{
weaponPtr_1->WeaponPtr->WeaponInformations[g_pBase->local->weapon]->dwRange = 1000000;
weaponPtr_2->WeaponPtr->WeaponInformations[g_pBase->local->weapon]->dwRange = 1000000;
}
}
}

// --- EXTRA RANGE
if (nWeapon.nExtraRange == 1)
{
if ( g_pBase->local )
{
CWeaponGlobal* weaponPtr_1 = (CWeaponGlobal*)ADR_WEAPONGLOBAL1;
CWeaponGlobal* weaponPtr_2 = (CWeaponGlobal*)ADR_WEAPONGLOBAL2;

if ( weaponPtr_1 !=0 && weaponPtr_2 !=0 )
{
switch ( nWeapon.nExtraRange )
{
case 1 :
weaponPtr_1->WeaponPtr->WeaponInformations[g_pBase->local->weapon]->dwEffectRange = 10000;
weaponPtr_2->WeaponPtr->WeaponInformations[g_pBase->local->weapon]->dwEffectRange = 10000;
break;
case 2 :
weaponPtr_1->WeaponPtr->WeaponInformations[g_pBase->local->weapon]->dwEffectRange = 20000;
weaponPtr_2->WeaponPtr->WeaponInformations[g_pBase->local->weapon]->dwEffectRange = 20000;
break;
case 3 :
weaponPtr_1->WeaponPtr->WeaponInformations[g_pBase->local->weapon]->dwEffectRange = 30000;
weaponPtr_2->WeaponPtr->WeaponInformations[g_pBase->local->weapon]->dwEffectRange = 30000;
break;
case 4 :
weaponPtr_1->WeaponPtr->WeaponInformations[g_pBase->local->weapon]->dwEffectRange = 40000;
weaponPtr_2->WeaponPtr->WeaponInformations[g_pBase->local->weapon]->dwEffectRange = 40000;
break;
case 5 :
weaponPtr_1->WeaponPtr->WeaponInformations[g_pBase->local->weapon]->dwEffectRange = 1000000;
weaponPtr_2->WeaponPtr->WeaponInformations[g_pBase->local->weapon]->dwEffectRange = 1000000;
break;
}
}
}
}

// --- SUPER WEAPON
if (nWeapon.nSuperWeapon == 1)
{
if ( g_pBase->local )
{
CWeaponGlobal* weaponPtr_1 = (CWeaponGlobal*)ADR_WEAPONGLOBAL1;
CWeaponGlobal* weaponPtr_2 = (CWeaponGlobal*)ADR_WEAPONGLOBAL2;

if ( weaponPtr_1 !=0 && weaponPtr_2 !=0 )
{
weaponPtr_1->WeaponPtr->WeaponInformations[g_pBase->local->weapon]->dwShotSpeed = 50000;
weaponPtr_2->WeaponPtr->WeaponInformations[g_pBase->local->weapon]->dwShotSpeed = 50000;
}
}
}else{
if ( bValueStored )
{
CWeaponGlobal* weaponPtr_1 = (CWeaponGlobal*)ADR_WEAPONGLOBAL1;
CWeaponGlobal* weaponPtr_2 = (CWeaponGlobal*)ADR_WEAPONGLOBAL2;

if ( weaponPtr_1 !=0 && weaponPtr_2 !=0 )
{
for(int i = 0; i < MAX_WEAPONS; i++)
{
weaponPtr_1->WeaponPtr->WeaponInformations[i]->dwShotSpeed = weaponsOriginalValues[i].dwShotSpeed;
weaponPtr_2->WeaponPtr->WeaponInformations[i]->dwShotSpeed = weaponsOriginalValues[i].dwShotSpeed;
}
}
}
}

if (nWeapon.nNoWeight == 1)
{
if ( g_pBase->local )
{
CWeaponGlobal* weaponPtr_1 = (CWeaponGlobal*)ADR_WEAPONGLOBAL1;
CWeaponGlobal* weaponPtr_2 = (CWeaponGlobal*)ADR_WEAPONGLOBAL2;
if ( weaponPtr_1 !=0 && weaponPtr_2 !=0 )
{
weaponPtr_1->WeaponPtr->WeaponInformations[g_pBase->local->weapon]->dwWeight = 0;
weaponPtr_2->WeaponPtr->WeaponInformations[g_pBase->local->weapon]->dwWeight = 0;
}
}
}else
{
if ( bValueStored )
{
CWeaponGlobal* weaponPtr_1 = (CWeaponGlobal*)ADR_WEAPONGLOBAL1;
CWeaponGlobal* weaponPtr_2 = (CWeaponGlobal*)ADR_WEAPONGLOBAL2;
if ( weaponPtr_1 !=0 && weaponPtr_2 !=0 )
{
for(int i = 0; i < MAX_WEAPONS; i++)
{
weaponPtr_1->WeaponPtr->WeaponInformations[i]->dwWeight = weaponsOriginalValues[i].dwWeight;
weaponPtr_2->WeaponPtr->WeaponInformations[i]->dwWeight = weaponsOriginalValues[i].dwWeight;
}
}
}
}

// --- NO RECOIL
if (nWeapon.nNoRecoil == 1)
{
pNoRecoil.Patch();
}
else
{
pNoRecoil.Restore();
}

// --- NO SPREAD
if (nWeapon.nNoSpread ==1)
{
pNoSpread.Patch();
}
else
{
pNoSpread.Restore();
}

// --- NO DELAY
if (nWeapon.nNoDelay == 1)
{
pNoDelay.Patch();
}
else
{
pNoDelay.Restore();
}

// --- NO RELOAD
if (nWeapon.nNoReload == 1)
{
pNoReload.Patch();
}
else
{
pNoReload.Restore();
}

// --- UNLIMITED AMMO
if (nWeapon.nUnlimitedAmmo == 1)
{
pUnlimitedAmmo.Patch();
}
else
{
pUnlimitedAmmo.Restore();
}

// --- STW
if (nWeapon.nShootthroughWalls == 1)
{
pShootthroughWalls1.Patch();
pShootthroughWalls2.Patch();
}
else
{
pShootthroughWalls1.Restore();
pShootthroughWalls2.Restore();
}

// --- BONESHOT
if (nWeapon.nBoneshot == 1)
{
pBoneshot.Patch();
}
else
{
pBoneshot.Restore();
}

// --- ARTILLERY
if (nWeapon.nArtillery == 1)
{
pArtillery1.Patch();
pArtillery2.Patch();
pArtillery3.Patch();
pArtillery4.Patch();
pArtillery5.Patch();
pArtillery6.Patch();
pArtillery7.Patch();
pArtillery8.Patch();
}
else
{
pArtillery1.Restore();
pArtillery2.Restore();
pArtillery3.Restore();
pArtillery4.Restore();
pArtillery5.Restore();
pArtillery6.Restore();
pArtillery7.Restore();
pArtillery8.Restore();
}

// --- AUTOAMMO
//if (nWeapon.nAutoAmmo == 1)
//{
// pAutoAmmo1.Patch();
// pAutoAmmo2.Patch();
//}
//else
//{
// pAutoAmmo1.Restore();
// pAutoAmmo2.Restore();
//}

//if (nWeapon.nScope)
//{
// if (GetAsyncKeyState(0x02))
// {
// *(DWORD*)(ADR_SCOPE) = 8;
// }
// else
// {
// *(DWORD*)(ADR_SCOPE) = 5;
// }
//}

// --- FAST ALL
if (nStatic.nFastAll == 1 )
{
*(float*)(ADR_FASTAMMO) = 15.0F;
*(float*)(ADR_FASTHEALTH) = 15.0F;
}

// --- FAST DEFUSE
if (nStatic.nFastPlant == 1)
{
pFastPlant.Patch();
}
else
{
pFastPlant.Restore();
}

// --- FAST PLANT
if (nStatic.nFastDefuse == 1)
{
pFastDefuse.Patch();
}
else
{
pFastDefuse.Restore();
}

// --- PLANT DEFUSE ANYWHERE
if (nStatic.nPlantanywhere == 1)
{
pDPAnywhere.Patch();
}
else
{
pDPAnywhere.Restore();
}

if (nStatic.nDefuseanywhere == 1)
{
pDPAnywhere.Patch();
}
else
{
pDPAnywhere.Restore();
}

// --- RADAR GPS
if (nVisual.nRadarGPS == 1)
{
pRadarGPS.Patch();
}
else
{
pRadarGPS.Restore();
}

// --- MINE GPS
if (nVisual.nMineGPS == 1)
{
pMinesGPS.Patch();
pMinesGPS2.Patch();
}
else
{
pMinesGPS.Restore();
pMinesGPS2.Restore();
}

// --- REMOVE FLASH
if (nVisual.nRemoveFlash == 1)
{
pRemoveFlash.Patch();
}
else
{
pRemoveFlash.Restore();
}

// --- REMOVE M14
if (nVisual.nRemoveM14 == 1)
{
pRemoveM14.Patch();
}
else
{
pRemoveM14.Restore();
}

// --- VEHICLE INVISIBLE
if (nVehicle.nInvisible == 1)
{
pVInvisible.Patch();
}
else
{
pVInvisible.Restore();
}

// --- VEHICLE NO DAMAGE
if (nVehicle.nNoDamage == 1)
{
pNoDamage.Patch();
}
else
{
pNoDamage.Restore();
}

// --- VEHICLE NO OVERHEAT
if (nVehicle.nNoOverheat == 1)
{
pNoOverheat.Patch();
}
else
{
pNoOverheat.Restore();
}

// --- VEHICLE SUPERFIRE
if (nVehicle.nSuperfire == 1)
{
pSuperfire1.Patch();
pSuperfire2.Patch();
pSuperfire3.Patch();
}
else
{
pSuperfire1.Restore();
pSuperfire2.Restore();
pSuperfire3.Restore();
}

//// --- EXTRACLIP A
//if (nPX.nClipA == 1)
//{
// pExtraClipA.Patch();
//}
//else
//{
// pExtraClipA.Restore();
//}

//// --- EXTRACLIP S
//if (nPX.nClipS == 1)
//{
// pExtraClipS.Patch();
//}
//else
//{
// pExtraClipS.Restore();
//}

//// --- STAMINA UP
//if (nPX.nStamina == 1)
//{
// pStaminaUP1.Patch();
// pStaminaUP2.Patch();
//}
//else
//{
// pStaminaUP1.Restore();
// pStaminaUP2.Restore();
//}

//// --- SNIPER PX
//if (nPX.nSniperPX == 1)
//{
// pSniperPX.Patch();
//}
//else
//{
// pSniperPX.Restore();
//}

// --- DAMAGE AS
if (nBinder.nDamage == 1)
{
pPunchDamage.Patch();
}
if (nBinder.nDamage == 2)
{
pPunchDamage.Restore();
pColtDamage.Patch();
}
if (nBinder.nDamage == 0)
{
pPunchDamage.Restore();
pColtDamage.Restore();
}
}
}

// --- SERVER CHEATS
DWORD dwServer = 0;
void Servercheats( void )
{
dwServer = *(DWORD*)ADR_SERVERPOINTER;
if (dwServer != 0)
{
// ---- SLOT CHEAT
BYTE Slot5,Slot6,Slot7,Slot8;
bool cSlot = true;
if (nBinder.nSlots == 1)
{
if ( cSlot == true )
{
Slot5 = *(BYTE*)(dwServer+OFS_SLOTS);
Slot6 = *(BYTE*)(dwServer+OFS_SLOTS+0x1);
Slot7 = *(BYTE*)(dwServer+OFS_SLOTS+0x2);
Slot8 = *(BYTE*)(dwServer+OFS_SLOTS+0x3);
// ==========================================
*(BYTE*)(dwServer+OFS_SLOTS) = 1;
*(BYTE*)(dwServer+OFS_SLOTS+0x1) = 1;
*(BYTE*)(dwServer+OFS_SLOTS+0x2) = 1;
*(BYTE*)(dwServer+OFS_SLOTS+0x3) = 1;
cSlot = false;
}
}
else
{
if ( cSlot == false )
{
*(BYTE*)(dwServer+OFS_SLOTS) = Slot5;
*(BYTE*)(dwServer+OFS_SLOTS+0x1) = Slot6;
*(BYTE*)(dwServer+OFS_SLOTS+0x2) = Slot7;
*(BYTE*)(dwServer+OFS_SLOTS+0x3) = Slot8;
cSlot = true;
}
}

// --- WEAPON BINDER
if (nBinder.nClass > 0)
{
find_weapons();
if (nBinder.nSlot1 > 0)
WPNput(nBinder.nClass - 1, 0, nBinder.nSlot1 -1);
if (nBinder.nSlot2 > 0)
WPNput(nBinder.nClass - 1, 1, nBinder.nSlot2 -1);
if (nBinder.nSlot3 > 0)
WPNput(nBinder.nClass - 1, 2, nBinder.nSlot3 -1);
if (nBinder.nSlot4 > 0)
WPNput(nBinder.nClass - 1, 3, nBinder.nSlot4 -1);
if (nBinder.nSlot5 > 0)
WPNput(nBinder.nClass - 1, 4, nBinder.nSlot5 -1);
if (nBinder.nSlot6 > 0)
WPNput(nBinder.nClass - 1, 5, nBinder.nSlot6 -1);
if (nBinder.nSlot7 > 0)
WPNput(nBinder.nClass - 1, 6, nBinder.nSlot7 -1);
if (nBinder.nSlot8 > 0)
WPNput(nBinder.nClass - 1, 7, nBinder.nSlot8 -1);
}
}

BYPASS (NOT UPDATED, BUT ITS WORKING FOR ME ROFL I DONT KNOW WHY)
Spoiler:
VOID AntiHackshield(void)
{
// ---- GET MODULE HANDLE
DWORD EhSvc = 0;
do
{
EhSvc = (DWORD)GetModuleHandleA(Hackshield);
Sleep(300);
}
while(!EhSvc);

// ---- BYTES
BYTE RETURN_4 [3] = { 0xC2,0x04,0x00 };
BYTE XOR [1] = { 0x31 };
BYTE RETURN [1] = { 0xC3 };
BYTE JUMP [1] = { 0xEB };
BYTE RETURN_C [3] = { 0xC2,0x0C,0x00 };
BYTE JE [1] = { 0x74 };
BYTE ADDEAX [2] = { 0x03,0xD2 };
BYTE MOVEAX [5] = { 0xB5,0x00,0x00,0x00,0x00 };

// ---- ADRESSES
#define cHackshieldA 0x51C897
#define cHackshieldB 0x51CF23
#define cHackshieldC 0x5DD1B9

// ---- INSIDE WARROCK
MemEdit((VOID *)(cHackshieldA),(LPVOID)RETURN_C,sizeof(RETURN_C));
MemEdit((VOID *)(cHackshieldB),(LPVOID)JUMP,sizeof(JUMP));
MemEdit((VOID *)(cHackshieldC),(LPVOID)RETURN,sizeof(RETURN));
MemEdit((VOID *)(0x84B120),(LPVOID)RETURN,sizeof(RETURN));
MemEdit((VOID *)(0x805544),(LPVOID)RETURN_4,sizeof(RETURN_4));

// ---- HACKSHIELD
MemEdit((VOID *)(EhSvc+0x8BB90), (LPVOID)RETURN,sizeof(RETURN));
MemEdit((VOID *)(EhSvc+0xAB90),(LPVOID)RETURN_4,sizeof(RETURN_4));
}


VMT HOOK (CREDITS: DUNNO I THINK ROBERTOS)
Spoiler:
DWORD VMTHook ( int index )
{
if (!0xAE6C94) return 0;
DWORD dwBla1 = *(DWORD*)0xAE6C94; // ADR_DEVICEPOINTER
if (!dwBla1) return 0;
DWORD dwBla2 = *(DWORD*)(dwBla1+0x2B930); //OFFSET_DEVICEPOINTER
if (!dwBla2) return 0;
dwBla2 = *(DWORD*)dwBla2;
if (!dwBla2) return 0;
return dwBla2 + (4*index);
}

USAGE:

bool bValid = false;
while(true)
{
bValid = VMTHook (0) > 0;
if (bValid)
{
// ---- RESET
if( *(DWORD*) VMTHook(16) != (DWORD)&myReset && VMTHook(16) != NULL)
{
pReset = (oReset) *(DWORD*)VMTHook(16);
*(DWORD*)VMTHook(16) = (DWORD)&myReset ;
}

// ---- ENDSCENE
if( *(DWORD*) VMTHook(42) != (DWORD)&myEndScene && VMTHook(42) != NULL)
{
pEndScene = (oEndScene) *(DWORD*)VMTHook(42);
*(DWORD*)VMTHook(42) = (DWORD)&myEndScene;
}

// ---- SETTRANSFORM
if( *(DWORD*) VMTHook(44) != (DWORD)&mySetTransform && VMTHook(44) != NULL)
{
pSetTransform = (oSetTransform) *(DWORD*)VMTHook(44);
*(DWORD*)VMTHook(44) = (DWORD)&mySetTransform;
}

// ---- DRAWINDEXEDPRIMITIVE
if( *(DWORD*) VMTHook(82) != (DWORD)&myDrawIndexedPrimitive && VMTHook(82) != NULL)
{
pDrawIndexedPrimitive = (oDrawIndexedPrimitive) *(DWORD*)VMTHook(82);
*(DWORD*)VMTHook(82) = (DWORD)&myDrawIndexedPrimitive ;
}
Sleep(300);
}
}


STRUCTS: (CREDITS: KAZBAH OR SOMEONE IDK)
Spoiler:
#include <windows.h>
#include "nAdresses.hpp"
struct vectorB
{
float x,a,z,b,y,d,m,g,s;
};

struct vectorA
{
float x,z,y;
};

class CVehicle;
struct CPlayer
{
char unknown0[50328]; //0x0000
BYTE index; //0xC498
char unknown50329[43]; //0xC499
CVehicle* wVehicle; //0xC4C4
char unknown50376[15588]; //0xC4C8
float pitch; //0x101AC
char unknown65968[24]; //0x101B0
float yaw; //0x101C8
char unknown65996[8]; //0x101CC
vectorA pos; //0x101D4
char unknown66008[14]; //0x101D8
WORD weapon; //0x101EE
char unknown66032[92]; //0x101F0
__int32 status; //0x1024C
char unknown66128[164]; //0x10250
vectorB pos1; //0x102F4
char unknown66296[172]; //0x102F8
BYTE shotting; //0x103A4
};

struct CLocal
{
char unknown51[32]; //0x0000
vectorA pos; //0x0020
char unknown52[36]; //0x002C
float pitch; //0x0050
float yaw; //0x0054
char unknown53[16]; //0x0058
float view_down; //0x0068
float view_up; //0x006C
float fovx; //0x0070
float fovy; //0x0074
};

struct CPlayerInfo
{

char unknown0[1288]; //0x0000
char ip[16]; //0x0508
char unknown1304[300]; //0x0518
char name[20]; //0x0644
char unknown1624[836]; //0x0658
__int32 health; //0x099C
__int32 maxhealth; //0x09A0
char unknown2464[336]; //0x09A4
BYTE team; //0x0AF4
char unknown2805[13671]; //0x0AF5

};
struct CBase
{
CPlayer* local;
char unknown0[0x82618];
CPlayer** player;
};

struct CWeaponInformations
{
char _0x0000[20];
char Name[25]; //0x0014
char _0x002D[39];
char ShortName[4]; //0x0054
char _0x0058[1];
char Animation[4]; //0x0059
char _0x005D[5219];
DWORD dwDamage; //0x14C0
DWORD dwDefence; //0x14C4
DWORD dwRange; //0x14C8
DWORD dwAmmoNum; //0x14CC
DWORD dwMagazineNum; //0x14D0
DWORD dwEffectRange; //0x14D4
DWORD dwParabola; //0x14D8 ?
float ReactAmount; //0x14DC
float ReactRecovery; //0x14E0
float Accurate; //0x14E4
DWORD dwShotSpeed; //0x14E8
DWORD dwWeight; //0x14EC
};

struct CWeaponGlobalPtr
{
CWeaponInformations* WeaponInformations[340]; //0x0000
};

struct CWeaponGlobal
{
char _0x0000[64];
CWeaponGlobalPtr* WeaponPtr;
};

struct t_weap
{
char unknown[12];
int id;
char lname[32];
char sname1[32];
char sname2[32];
char sname3[32];
char data[5336];
};

struct t_slot
{
BYTE enab;
BYTE type;
BYTE id;
BYTE novaule;
char dum1[33];
char sname[16];
char dum2[19];
DWORD adr_weap;
DWORD adr_inv;
};

struct t_invslot
{
BYTE enab;
BYTE type;
BYTE id;
BYTE novaule;
char dum1[33];
char sname[16];
char dum2[19];
DWORD adr_weap;
DWORD adr_inv;
};

#define ADR_WEAPONBASE 0xB0BE08
#define ADR_PLAYERID 0xA40
#define ADR_SLOTBASE 0x9E040
DWORD *serverptr = (DWORD*)ADR_SERVERPOINTER;
DWORD dwADR_WEAPONBASE = ADR_WEAPONBASE;
DWORD dwOFS_SLOTBASE = ADR_SLOTBASE;
DWORD dwOFS_PLAYERID = ADR_PLAYERID;


t_weap *pweap[342];
t_slot *pslot[8];
t_invslot *pinvoslot[8];

t_invslot *WPNinvslotadr(int pclass, int slot)
{
return (t_invslot *)(*serverptr+dwOFS_SLOTBASE+(pclass*0x50)+(slot*0x50));
}

t_slot *WPNslotadr(int pclass, int slot)
{
return (t_slot *)(*serverptr+dwOFS_SLOTBASE+(pclass*0x280)+(slot*0x50));
}

void WPNput(int pclass, int slot, int weappon)
{
t_slot *pslot;
if (weappon<0 || pweap[weappon] == 0) return;

pslot=WPNslotadr(pclass,slot);
pslot->adr_weap=(DWORD)pweap[weappon];
strcpy(pslot->sname, pweap[weappon]->lname);
pslot->id = weappon;
pslot->type = 0x44;
pslot->enab = 1;
}


void find_weapons(void)
{
DWORD *p_weapbase, *baseadr;
t_weap *weap;

for (int i=0; i<342; i++)pweap[i]=0;
p_weapbase=(DWORD *)dwADR_WEAPONBASE;
baseadr=(DWORD*)(*p_weapbase);

for (int b=0;b<342;b++)
{
weap=(t_weap *)(*baseadr);
if (weap)pweap[b]=weap;
baseadr++;
}
}

int WPNget(int pclass, int slot)
{
t_slot *pslot;
pslot=WPNslotadr(pclass,slot);
return pslot->id;
}


ESP: (FROM ROBERTO BASE)
Spoiler:
// --- IS VALID
int IsValid = 479;
bool IsValidPlayer ( CPlayer* Player, CPlayerInfo* Info )
{
if (
!IsBadReadPtr((void*)Player, sizeof(CPlayer)) &&
!IsBadReadPtr((void*)Info,sizeof(CPlayerInfo)) &&
Player && Info && Info->health > 0 && strlen(Info->name) > 0
) return true;

return false;
}

// --- MATRIX
D3DXMATRIX dxProjection, dxView, dxWorld,identity;
D3DXVECTOR3 * GetScreenCoordFromWorld( IDirect3DDevice9 *pDevice, D3DXVECTOR3 &vScreenCoord, D3DXVECTOR3 vWorldLocation )
{
if( !pDevice ) return NULL;

D3DVIEWPORT9 viewPort;
D3DXVECTOR3 vOrthoLocation;
pDevice->GetViewport( &viewPort );
D3DXMatrixIdentity( &identity );


D3DXVec3Project( &vScreenCoord, &vWorldLocation, &viewPort, &dxProjection, &dxView, &identity);

if(vScreenCoord.z < 1)
{
return &vScreenCoord;
}
return NULL;
}

CPlayerInfo* GetPlayerInfo(int index)
{
if ( index > 32 ) return 0;
DWORD dwBasePointer = ADR_BASEPOINTER;
DWORD dwSize = ADR_PLAYERSIZE;
return (CPlayerInfo*) (dwBasePointer + (index*dwSize));
};

float GetDistance ( 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]);
}

void ESPCheats( LPDIRECT3DDEVICE9 pDevice )
{
for ( int i = 0; i < 32; i++ )
{
if(!g_pBase->player || !g_pBase->local) break;

CPlayer *spPlayer;
CPlayerInfo *spInfo;
spPlayer = g_pBase->player[i];
spInfo = GetPlayerInfo(i);
D3DCOLOR UrbaESP;
if ( spInfo && spPlayer )
{
CPlayerInfo *spLocalInfo = GetPlayerInfo(g_pBase->local->index);
if (nESP.nNameESP || nESP.nHealthESP || nESP.nHealthESP || nESP.nTeamESP || nESP.nIPESP )
{
D3DXVECTOR3 g_pPlayer(spPlayer->pos.x, spPlayer->pos.z, spPlayer->pos.y), g_vView;
if ( IsValidPlayer(spPlayer, spInfo) && GetScreenCoordFromWorld ( pDevice, g_vView, g_pPlayer) )
{
float foffset = g_vView.y-30;
if (nESP.nEnemyOnly == 1 && spInfo->team != spLocalInfo->team && spInfo->health > 0 && spInfo->name > 0 )
{
if (nESP.nNameESP)
{
menu.DrawTextA( g_vView.x, foffset,D3DCOLOR_ARGB(255,255,0,0) , spInfo->name, D3DFONT_CENTERED_X || D3DFONT_ZENABLE || D3DFONT_ITALIC);
foffset += 10;
}

if (nESP.nHealthESP == 1)
{
int iPercent = static_cast <int> ((spInfo->health * 100 / spInfo->maxhealth));
menu.DrawHealthBox( g_vView.x, foffset+5, iPercent, pDevice);
foffset += 10;
}

if (nESP.nTeamESP == 1)
{
if ( GetPlayerInfo(i)->team == 1 )
{
menu.DrawTextA(g_vView.x,foffset,D3DCOLOR_ARGB(255,0,255,0),"NIU", D3DFONT_CENTERED_X || D3DFONT_ZENABLE || D3DFONT_ITALIC);
foffset += 10;
}
else
{
menu.DrawTextA(g_vView.x,foffset,D3DCOLOR_ARGB(255,0,255,0),"Derberan", D3DFONT_CENTERED_X || D3DFONT_ZENABLE || D3DFONT_ITALIC);
foffset += 10;
}
}

if (nESP.nIPESP == 1)
{
menu.DrawTextA( g_vView.x,foffset,D3DCOLOR_ARGB(255,255,0,0) , spInfo->ip, D3DFONT_CENTERED_X || D3DFONT_ZENABLE || D3DFONT_ITALIC);
foffset += 10;
}

if (nESP.nDistanceESP == 1)
{
char szDistance[100];
sprintf(szDistance,/*%.2f m*/XorStr<0x27,7,0xC1C454F0>("\x02\x06\x1B\x4C\x0B\x41"+0xC1C454F0).s,GetDistance(g_pBase->local, spPlayer)/60);
menu.DrawTextA( g_vView.x,foffset, D3DCOLOR_ARGB(255,255,140,0), szDistance, D3DFONT_CENTERED_X || D3DFONT_ZENABLE || D3DFONT_ITALIC);
foffset += 10;
}

}
else if (nESP.nEnemyOnly == 2 && spInfo->health > 0 )
{
if ( spLocalInfo->team == spInfo->team )
{
UrbaESP = D3DCOLOR_ARGB(255,235,235,235);
}
else
{
UrbaESP = D3DCOLOR_ARGB(255,255,000,000);
}

if (nESP.nNameESP == 1)
{
menu.DrawTextA( g_vView.x,foffset,UrbaESP, spInfo->name,D3DFONT_CENTERED_X || D3DFONT_ZENABLE || D3DFONT_ITALIC);
foffset += 10;
}

if (nESP.nHealthESP == 1)
{
int iPercent = static_cast <int> ((spInfo->health * 100 / spInfo->maxhealth));
menu.DrawHealthBox( g_vView.x, foffset+5, iPercent, pDevice);
foffset += 10;
}

if (nESP.nTeamESP == 1)
{
if ( GetPlayerInfo(i)->team == 1 )
{
menu.DrawTextA(g_vView.x,foffset,D3DCOLOR_ARGB(255,0,255,0),"NIU", D3DFONT_CENTERED_X || D3DFONT_ZENABLE || D3DFONT_ITALIC);
foffset += 10;
}
else
{
menu.DrawTextA(g_vView.x,foffset,D3DCOLOR_ARGB(255,0,255,0),"Derberan", D3DFONT_CENTERED_X || D3DFONT_ZENABLE || D3DFONT_ITALIC);
foffset += 10;
}
}

if (nESP.nIPESP == 1)
{
menu.DrawTextA( g_vView.x,foffset,UrbaESP, spInfo->ip, D3DFONT_CENTERED_X || D3DFONT_ZENABLE || D3DFONT_ITALIC);
foffset += 10;
}

if (nESP.nDistanceESP == 1)
{
char szDistance[100];
sprintf(szDistance,/*%.2f m*/XorStr<0x27,7,0xC1C454F0>("\x02\x06\x1B\x4C\x0B\x41"+0xC1C454F0).s,GetDistance(g_pBase->local, spPlayer)/60);
menu.DrawTextA( g_vView.x,foffset, D3DCOLOR_ARGB(255,255,140,0), szDistance, D3DFONT_CENTERED_X || D3DFONT_ZENABLE || D3DFONT_ITALIC);
foffset += 10;
}
}
}
}
}
}
}


have fun. full credits to roberto, nikm, kazbah and much more *laugh ova 9000* /drunk mode

fully supports copy and paste, also the copy of paste level of this content is over 9000.

I'll update the adresses for like the next 2-3 updates and make them public, so hf.

__________________


La libertà non si insegna, è una scelta individuale.
04/09/2013, 19:48
#1
Cerca




Utenti che stanno guardando questa discussione: 1 Ospite(i)