WEAPON AMMO NUMBER
Hi it's me again. I was surfing the net for warrock hacks tutorials and C++ tutorials and then i found a code for changing some weapon data(I'm not sure though). Modified some of it and i'm not quite sure if i did it correctly. so here's the code.
after compiling and tested it in-game, the game crash after the spawn wait counter set to 0. Can someone help me out on how to fix this?
Code:
class CWeaponInformations
{
public:
char padd1[132];
DWORD dwDamage; // 0x84
DWORD dwDefence; //0x88
DWORD dwRange; // 0x8C
DWORD dwAmmoNum; //0x90
DWORD dwMagazineNum; //0x94
DWORD dwEffectRange; //0x98
DWORD dwParabola; // 0x9C
char padd2[12];
DWORD dwShotSpeed; //0xAC
DWORD dwWeight; //0xB0
};
CWeaponInformations* getWeaponInfo(int index, DWORD ptr)
{
DWORD dwPtrToWeapons = *(DWORD *)(ptr + 0x40);
if(!dwPtrToWeapons)
return 0;
DWORD dwPtrToDesiredWeapon = *(DWORD *)(dwPtrToWeapons + index);
if(!dwPtrToDesiredWeapon)
return 0;
return (CWeaponInformations*)(dwPtrToDesiredWeapon);
}
// Initialize Class
CWeaponInformations* weaponInformations = getWeaponInfo(66, ADR_WeaponGlobal1);
CWeaponInformations* weaponInformations2 = getWeaponInfo(66, ADR_WeaponGlobal2);
// How To Use
void AMMO()
{
weaponInformations->dwAmmoNum = 9;
weaponInformations->dwRange = 9000000;
weaponInformations->dwEffectRange = 90000;
}


tested 