Like as I said, use this function instead of using GameConnection::OnDeath.
I tried that, but now the neither, pain or death sounds will play.
Heres what I got.
package DeathYells
{
function gameConnection::onDeath(%this)
{
serverplay3d("scream" @ getRandom(1, 7), %this.player.getHackPosition() SPC "0 0 1 0");
return parent::onDeath(%this);
}
};
{
function Armor::OnDamage(%this)
{
serverplay3d("scream" @ getRandom(7, 14), %this.player.getHackPosition() SPC "0 0 1 0");
return parent::onDamage(%this);
}
};
activatepackage (DeathYells);
datablock AudioProfile(DeathSound)
{
filename = "./Da_Death.wav";
description = AudioClosest3d;
preload = false;
};
package customDeathSound
{
function player::playDeathCry(%this)
{
serverPlay3D(DeathSound, %this.getHackPosition());
}
};
activatePackage("customDeathSound");