Garry's Mod Wiki

Garry's Mod Wiki

  any Entity:GetVar( any key, any default = nil )

Description

Retrieves a value from entity's Entity:GetTable. Set by Entity:SetVar.

Arguments

1 any key
Key of the value to retrieve
2 any default = nil
A default value to fallback to if we couldn't retrieve the value from entity

Returns

1 any
Retrieved value

Example

The 2 lines of code are functionally identical.

print( Entity( 1 ):GetVar( "Test" ) ) print( Entity( 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 twice a day. Edits and history are not available.

Last Parsed: Loading...