First, request a fired event:
SelectEx(s.weapon & s.devtype = #yourWeapon'sDevtype ,
requestFiredEvent(s.this,1);
);
That'll make it so that when the weapon fires, a "fired" event will be triggered.
Rule event Fired
condition IsValid(e.location)&e.location:devtype=#yourWeapon'sDevtype
:action
///Now, how do you want to inflict the damage? Percentage? fixed value? (recommend percentage)
e.location:damage := e.location:damage + 10; //This means that the weapon's will be damaged by 10% of it's hp. if the damage was, let's say, 50%, after that it'll be 60% and so on.
requestFiredEvent(e.location,1); //We re-request the fired event for when the weapon fires again.
:end
END
And that should do it.