ok, i got this script from Weapon_Repeater (an awesome weapon) and i am wondering how to make it make my weapon fire different sounds randomly. This is my redo of the code, whats wrong?
function WeaponNameImage::onFire(%this,%obj,%slot)
{
Parent::onFire(%this,%obj,%slot);
%random = getRandom(1,3);
switch(%random)
{
case 1:
serverplay3d(WeaponNameFire1Sound,%pos);
case 2:
serverplay3d(WeaponNameFire2Sound,%pos);
case 3:
serverplay3d(WeaponNameFire3Sound,%pos);
default:
echo("Error on WeaponName");
}
}