Skip to content
Wngui edited this page Feb 17, 2025 · 1 revision

Local Sounds

Playing sounds only audible to a specific player can be done using:

Player.PlayLocalSound("sounds/weapons/taser/taser_hit.vsnd");

Sound files can be found using Source2Viewer, and can be used freely without preloading!

Emit Sounds

To emit sound from an entity, which will be audible to anyone in the vicinity, you can use the extension:

Player.EmitSound("Weapon_M4A1.Silenced");

Currently, this can only play sound events, which can be tricky to find. Search for vsndevts_c files in Source2Viewer. Inside, you'll find sound event strings that can be passed to this function. For example, "Weapon_M4A1.Silenced" was found in soundevents/game_sounds_weapons.vsndevts_c.

Although the extension method accepts parameters like volume, pitch, and others, these are experimental and untested.

Custom Sounds

Custom sounds are unfortunately not supported yet. If you're interested in helping implement this, a good place to start could be the discussion here.

Clone this wiki locally