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?