ENT.OnRestore

From GMod Wiki

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