Garry's Mod Wiki

IRestore

The object used in the saverestore, mainly in saverestore.AddRestoreHook.

It allows you to read blocks directly from the save game files used by Half-Life 2 save system when such save is loaded.

Methods

IRestore:EndBlock()
Ends current data block started with IRestore:StartBlock and returns to the parent block. To avoid all sorts of errors, you must end all blocks you start.
Angle IRestore:ReadAngle()
Reads next bytes from the restore object as an Angle.
boolean IRestore:ReadBool()
Reads next bytes from the restore object as a boolean.
Entity IRestore:ReadEntity()
Reads next bytes from the restore object as an Entity.
number IRestore:ReadFloat()
Reads next bytes from the restore object as a floating point number.
number IRestore:ReadInt()
Reads next bytes from the restore object as an integer number.
string IRestore:ReadString()
Reads next bytes from the restore object as a string.
Vector IRestore:ReadVector()
Reads next bytes from the restore object as a Vector.
string IRestore:StartBlock()
Loads next block of data to be read inside current block. Blocks must be ended with IRestore:EndBlock.