G.Sound

From GMod Wiki

Jump to: navigation, search
Function
Syntax Sound( String soundname )
Where is this used?
Description:
Uses util.PrecacheSound on the string and then returns said string. Just a utility function.
Returns: String soundname.
Part of Library: Global Functions
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=G.Sound]G.Sound [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Example

DescriptionPrecaches a sound.
Used onNewerShared.png
Code
local snd = Sound("Weapon_SMG1.Single")
print(snd)
Output'Weapon_SMG1.Single' printed in console.


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox