1. Can be done -- hackily. Here's how to do it hackily, not suggested.
function Player::scanForProjectiles(%this) {
cancel(%this.projectileCounterSchedule);
if(!isObject(%this.client))
return;
initContainerRadiusSearch(%this.getTransform(), 5, $TypeMasks::ProjectileObjectType);
while(%obj = containerSearchNext())
if(!%obj.passed[%this]) {
%this.projectileNear++;
%obj.passed[%this] = true;
}
if((%this.projectileNear %= 25)) == 0 && %obj)
%this.client.play2d(YourAudioProfile);
%this.projectileCounterSchedule = %this.schedule(100, scanForProjectiles);
}
package projectileCounter {
function GameConnection::spawnPlayer(%this) {
%ret = parent::spawnPlayer(%this);
%this.player.scanForProjectiles();
return %ret;
}
};
activatePackage(projectileCounter);
2. function YourWeaponImage::onFire(%db, %player, %slot) {
if((%player.fireCount = (%player.fireCount + 1) % 25) == 0)
if(%player.getClassName() $= "player" && isObject(%player.client))
%player.client.play2d(YourSoundProfile);
return Parent::onFire(%db, %player, %slot);
}
Yeah, I know I spoon fed him. Frankly, I can't be bothered to explain everything right now. If you have any questions, OP, just ask and I'll answer them.