10-27-2011, 19:39
I was playing today BF1942 and thought of this. This code will make that when you reload you lose the magazine.
Code:
WasteMagsWhenReloading()
{
self endon("death");
self endon("disconnect");
while(1)
{
waitframe();
weapon = self getCurrentWeapon();
while(1)
{
previousammo = self getWeaponAmmoClip(weapon);
waitframe();
if(self getWeaponAmmoClip(weapon)>previousammo)
self setWeaponAmmoStock(weapon,self getWeaponAmmoStock(weapon)-previousammo);
if(weapon != self getCurrentWeapon())
break;
}
}
}