Entity:GetSaveTable
Description
Returns a table of save values for an entity.
These tables are not the same between the client and the server, and different entities may have different fields.
It is highly recommended to use Entity:GetInternalVariable for retrieving a single key of the save table for performance reasons.
You can get the list different fields an entity has by looking at it's source code (the 2013 SDK can be found online). Accessible fields are defined by each DEFINE_FIELD
and DEFINE_KEYFIELD
inside the DATADESC
block.
Take the headcrab, for example:
- For each DEFINE_FIELD, the save table will have a key with name of first argument.
- For each DEFINE_KEYFIELD, the save table will have a key with name of the third argument.
Arguments
Returns
1 table
A table containing all save values in key/value format.
The value may be a sequential table (starting with 1) if the field in question is an array in engine.