Garry's Mod Wiki

Garry's Mod Wiki

  saverestore.AddRestoreHook( string identifier, function callback )

Description

Adds a restore/load hook for the Half-Life 2 save system.

Arguments

1 string identifier
The unique identifier for this hook.
2 function callback
The function to be called when an engine save is being loaded.
Function argument(s):
1 IRestore save - The restore object to be used to read data from save file that is being loaded.

You can also use those functions to read data:

Example

Example usage.

saverestore.AddRestoreHook( "HookNameHere", function( save ) PrintTable( saverestore.ReadTable( save ) ) end )
Output: If you used example from saverestore.AddSaveHook
1 = Test

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...