πŸ–ŠοΈ
onecrack
  • Onecrack
  • onecrack api
    • Autostop
    • UserCMD
    • Exploit
    • Globals
    • General
    • GrenadePrediction
    • UI
    • Entity
    • Render
    • Convar
    • Event
    • Trace
    • Sound
    • Local
    • Cheat
    • Input
    • World
    • AntiAim
    • Ragebot
    • Material
    • View
    • DataFile
Powered by GitBook
On this page
  • StopMicrophone
  • PlayMicrophone
  • Play

Was this helpful?

  1. onecrack api

Sound

StopMicrophone

Sound.StopMicrophone( );

[EN] Used to stop Sound.PlayMicrophone. [RU] Π˜ΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠ΅Ρ‚ΡΡ для остановки Π·Π²ΡƒΠΊΠ°.

PlayMicrophone

Parameters: path (has to be full path)

Sound.PlayMicrophone(path);

[EN] Plays a sound on microphone. [RU] Воспроизводит Π·Π²ΡƒΠΊ Π² ΠΌΠΈΠΊΡ€ΠΎΡ„ΠΎΠ½.

Play

Parameters: path

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] Воспроизводит Π·Π²ΡƒΠΊ.

PreviousTraceNextLocal

Last updated 3 years ago

Was this helpful?