SWEP.Precache
From GMod Wiki
Revision as of 07:33, 9 November 2009 by Unrealomega (Talk | contribs)
| Event Hook | |
| Hook Name | Precache |
| Syntax | SWEP:Precache( ) |
| Description | A function specifically for precaching materials and resources. |
| Returns | Nil |
| Lua State | |
| BBCode | [b][url=wiki.garrysmod.com/?title=SWEP.Precache]SWEP.Precache [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Example
| Description | Precaching the weapon's shoot sound. |
|---|---|
| Used on | |
| Code | function SWEP:Precache() util.PrecacheSound( self.ShootSound ) end |
| Output | N/A |
Additional Notes
- Called every time the weapon is created.