SWEP.OnRestore

From GMod Wiki

Revision as of 01:11, 24 October 2009 by Crazy Quebecer (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Event Hook
Hook NameOnRestore
SyntaxSWEP:OnRestore( )
DescriptionCalled whenever loaded a saved game (or changelevel)
ReturnsNil
Lua StateNewerShared.png
BBCode[b][url=wiki.garrysmod.com/?title=SWEP.OnRestore]SWEP.OnRestore [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionTaken exactly from addons/counter-strike/lua/weapons/weapon_cs_base/shared.lua
Used onNewerShared.png
Code
/*---------------------------------------------------------
	onRestore
	Loaded a saved game (or changelevel)
---------------------------------------------------------*/
function SWEP:OnRestore()
 
	self.NextSecondaryAttack = 0
	self:SetIronsights( false )
 
end
 
OutputN/A
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox