Garry's Mod Wiki

ISave

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

It allows you to write blocks directly into the save game files used by Half-Life 2 save system when such save is being saved.

Methods

ISave:EndBlock()
Ends current data block started with ISave:StartBlock and returns to the parent block. To avoid all sorts of errors, you must end all blocks you start.
ISave:StartBlock( string name )
Starts a new block of data that you can write to inside current block. Blocks must be ended with ISave:EndBlock.
ISave:WriteAngle( Angle ang )
Writes an Angle to the save object.
ISave:WriteBool( boolean bool )
Writes a boolean to the save object.
ISave:WriteEntity( Entity ent )
Writes an Entity to the save object.
ISave:WriteFloat( number float )
Writes a floating point number to the save object.
ISave:WriteInt( number int )
Writes an integer number to the save object.
ISave:WriteString( string str )
Writes a null terminated string to the save object.
ISave:WriteVector( Vector vec )
Writes a Vector to the save object.