Playing
In order to into sounds, you need to be able to use the Dev console. it may need to be enabled:
When in game, press tilde (this key: '~') to bring up the console.
The command to play a sound is
ulx playsound [filename]
where [filename] is the sound you want to play. For example,
ulx playsound simpsons/obey.mp3
will play the simpsons obey file. Once you have typed in the folder name and the slash,
the console should help you by giving you a list of files in that folder. Use the arrow
keys to select one quickly. The Tab key will immediately select the top listed item. When
you type, the list will automatically reduce to only files that start with what you have
typed. So, to play the file "oney/virginia.mp3", one can type the following:
ulx p[TAB] oney/v[TAB]
and the command will be autocompleted for you to the full "ulx playsound oney/virginia.mp3"
Binding
Binding allows you to set an input that runs a command in the console.
It works like so:
bind [input] [command]
Where [input] is the key or mouse button you wish to bind to
and [command] is the desired command. Note, the command may
need to be put in quotes if it's more than one word.
Valve sample list of keys
Sample Binds
bind k kill
Makes the 'k' key a suicide button.
bind p stopsound
When 'p' is pressed, stop all playing sounds.
bind kp_0 "ulx playsound weapons/pingu/nootnoot2.wav"
Pressing zero on the keypad plays the pengu gun sound effect.