Hi guys,
I wanted to make an class hack but i am having trouble with the weapon mgr hacks... i mean BasicPlayerInfo hacks are working but... no need more comments this is the code that i made (actually i wont post the whole base... only the problem code) :
Code:
DWORD cshell = (DWORD)GetModuleHandleA("CShell.dll");
#define weaponMgr 0xAAC3D0
#define basicPlayerInfo 0xA452C8
DWORD pWeaponMgr = *(DWORD*)(cshell + weaponMgr);
DWORD pBasicPlayerInfo = *(DWORD*)(cshell + basicPlayerInfo);
class cWeaponList
{
public:
char spacer00[2];
unsigned short WeaponClass;
int WeaponIndex;
char WeaponName[12];
char spacer02[1288];
float SpreadMin[9];
char spacer03[324];
float SpreadMax[9];
char spacer04[324];
float WeaponRange;
unsigned short MaxAmmo;
unsigned short AmmoPerMagazine;
unsigned short NanoMaxAmmo;
unsigned short NanoAmmoPerMagazine;
float AmmoDamage;
float UnlimitedAmmo;
int TargetSlot;
int SubType;
float DamageFactorByDistance;
float DamageVariationFactor;
float ShotsPerMinute;
char spacer05[24];
unsigned char ShotsPerAmmo;
char spacer06;
unsigned short WeaponPrice;
unsigned short AmmoPrice;
bool ReloadSingleAmmo;
char spacer07[3];
float BoomDuration;
char spacer08[480];
float KnifeNormalRange[4];
float KnifeYawPitch[2];
float KnifeNormalAnimationRate[3];
float KnifeBigshotRange[4];
float KnifeBigshotYawPitch[2];
float KnifeBigshotAnimationRate[3];
char spacer9[72];
unsigned char FireMode;
char spacer10[3];
unsigned char ZoomMode;
char spacer11[3];
unsigned char ZoomAttributes;
char spacer12[3];
unsigned char ReloadAttributes;
char spacer13[3];
unsigned char KnifeAttributes;
char spacer14[3];
bool IsDroppedWhenDie;
char spacer15[8];
float StunTime;
int SubWeaponIndex;
float DamageRatioPerNode;
char spacer16[236];
float KnifeNormalAmmoDamage[3];
float KnifeBigShotAmmoDamage[3];
char spacer17[28];
float SmokeAlpha;
char spacer18[3416];
D3DXVECTOR3 BulletPosOffset;
char spacer19[2848];
float SpeedPenalty[3];
char spacer20[4];
float FireAnimationMultiplier[3];
char spacer21[164];
int DelayOneShootTime[3];
char spacer22[276];
float ThrowVelAngleGravityAirResTime[3];
char spacer23[4];
unsigned char BoomType;
unsigned char BoomDurationDamage;
char spacer24[2];
float BoomDamageCheckInterval;
float SideEffectDamage;
float SideEffectTimeGap;
float DamagePenaltyTimeAndMoveRate[2];
float NanoDamagePenaltyTimeAndMoveRate[2];
float WallShotDamageRatio;
float ReloadAnimRatio;
float ChangeWeaponAnimRatio;
char spacer25[188];
bool HaveKnife;
char spacer26[39];
float KnockBack;
};
if(pWeaponMgr)
{
for (int i=0;i<601;i++)
{
cWeaponList * WeaponList = *(cWeaponList ** )(cshell + weaponMgr + (4*i));
if (WeaponList)
{
WeaponList->ReloadAnimRatio = 150.0f;
WeaponList->ChangeWeaponAnimRatio = 100.0f;
}
}
}
i get an send error report then the game crashes