Garry's Mod Wiki

sound.GetTable

  table sound.GetTable()

Description

Returns a list of all registered sound scripts.

New ones can be registered using sound.Add, and detailed information about each one can be retrieved via sound.GetProperties.

Returns

1 table
The list/array of all registered sound scripts ( No other information is provided )

Example

Writes all the sound scripts to a file in the data folder for easy searching.

file.Write("soundscripts.txt",table.concat(sound.GetTable(),"\n"))
Output: data/soundscripts.txt:
... Event.HostageKilled PhxMetal.ImpactHard PhxMetal.ImpactSoft EpicMetal.ImpactHard EpicMetal.ImpactSoft EpicMetal_Heavy.ImpactHard EpicMetal_Heavy.ImpactSoft Egg.Crack Phx.HoverLight Phx.HoverStandard Phx.HoverHeavy Phx.Afterburner1 Phx.Afterburner2 Phx.Afterburner3 Phx.Afterburner4 Phx.Afterburner5 Phx.Turbine Phx.Alien1 Phx.Alien2 Phx.Jet1 Phx.Jet2 Phx.Jet3 Phx.Jet4 Phx_Rubber_Tire.Strain Explo.ww2bomb AI_BaseNPC.BodyDrop_Heavy AI_BaseNPC.BodyDrop_Light AI_BaseNPC.SwishSound AI_BaseNPC.SentenceStop BaseCombatCharacter.CorpseGib BaseCombatCharacter.StopWeaponSounds BaseCombatCharacter.AmmoPickup ...