Garry's Mod Wiki
sound.Play( string snd, Vector pos, number level = 75, number pitch = 100, number volume = 1, number dsp = 0 )
Description
Plays a sound from the specified position in the world. If you want to play a sound without a position, such as a UI sound, use surface.PlaySound instead.
This function is similar to EmitSound, but with less options.
Arguments
1 string snd
The sound to play. This should either be a sound script name (sound.Add) or a file path relative to the
sound/
folder. (Make note that it's not sounds)3 number level = 75
Sound level in decibels. 75 is normal. Ranges from 20 to 180, where 180 is super loud. This affects how far away the sound will be heard, see SNDLVL enum.
6 number dsp = 0
The DSP preset for this sound. List of DSP presets
This was recently added in version (2024.02.26). It might only be available on the Dev Branch right now.
Example
This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.
Page content is automatically updated twice a day. Edits and history are not available.
Last Parsed: Loading...