Originally Posted by
n4n033
just search in old and new dump occurence then you can find the good address
Thanks and I did what you said, compared the old and new dump occurrences and i found out that it is still the same(Not sure though if i found the right one, but i guess i did).
The old addies from here: https://www.mpgh.net/forum/showthread...=803585&page=5
Code:
Damage = 0x84;
Defence = 0x88;
Range = 0x8C;
AmmoNum = 0x90;
MagazineNum = 0x94;
EffectRange = 0x98;
Parabola = 0x9C;
ShotSpeed = 0xAC;
Weight = 0xB0;
I tried it and warrock crashed.
The code that i am using
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;
}
@RED Originally it's WEAPONINDEX and i just changed it to 66 which is SPG_1 index number. Did I changed it correctly?