SWEP.Precache

From GMod Wiki

Jump to: navigation, search
Event Hook
Hook NamePrecache
SyntaxSWEP:Precache( )
DescriptionA function specifically for precaching materials and resources.
ReturnsNil
Lua StateNewerShared.png
BBCode[b][url=wiki.garrysmod.com/?title=SWEP.Precache]SWEP.Precache [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]

Example

DescriptionPrecaching the weapon's shoot sound.
Used onNewerShared.png
Code
 function SWEP:Precache() 
 	util.PrecacheSound( self.ShootSound ) 
 end 
OutputN/A

Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox