function WeaponImage::onFire(%this, %obj, %slot)
{
if(%obj.[%this]ammo $= ""){
%obj.[this]ammo = %this.ammo; //If you have not fired yet, reset the ammo to "ammo =" in the datablock
}
if(%obj.[%this]ammo == 0){
return;
}
%obj.[%this]ammo--;
parent::onFire(%this, %obj, %slot);
}
Or if you wanted it constant for every weapon, and not have to change it all, just change the "%obj.[this]ammo = %this.ammo;" to "%obj.[this]ammo = #;"