ENT.OnRestore

From GMod Wiki

Revision as of 08:14, 11 October 2010 by Jcw87 (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Event Hook
Hook NameOnRestore
SyntaxENT:OnRestore( )
DescriptionCalled when a save-game is loaded.
ReturnsNil
Lua StateNewerShared.png
BBCode[b][url=wiki.garrysmod.com/?title=ENT.OnRestore]ENT.OnRestore [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionRemoves the entity if it is loaded in a save game
Used onNewerServer.png
Code
function GM:OnRestore()
   self:Remove()
end
OutputNothing, the entity is removed.
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox