Sound
StopMicrophone
Sound.StopMicrophone( );
[EN] Used to stop Sound.PlayMicrophone. [RU] Используется для остановки звука.
PlayMicrophone
Sound.PlayMicrophone(path);
[EN] Plays a sound on microphone. [RU] Воспроизводит звук в микрофон.
Play
If you place the sound in ot/scripts/ folder, you would call it as below script shows:
function playSoundOnKill()
{
localplayer_index = Entity.GetLocalPlayer();
attacker = Event.GetInt("attacker");
attacker_index = Entity.GetEntityFromUserID(attacker);
if (attacker_index == localplayer_index)
{
Sound.Play("C:\\Program Files (x86)\\Steam\\steamapps\\common\\Counter-Strike Global Offensive\\ot\\scripts\\headshot.wav");
}
}
Cheat.RegisterCallback("player_death", "playSoundOnKill");
[EN] Plays a sound. [RU] Воспроизводит звук.
Last updated
Was this helpful?