Garry's Mod Wiki

Entity:GetNWVarProxy

  function Entity:GetNWVarProxy( any key )

Description

Returns callback function for given NWVar of this entity.

This function was superseded by Entity:GetNW2VarProxy. This page still exists an archive in case anybody ever stumbles across old code and needs to know what it is

Arguments

1 any key
The key of the NWVar to get callback of.

Returns

1 function
The callback of given NWVar, or nil if not found.

Example

Prints callback function of a NWVar called "Key" of Player 1.

print( Entity(1):GetNWVarProxy( "Key" ) ) Entity(1):SetNWVarProxy( "Key", print ) print( Entity(1):GetNWVarProxy( "Key" ) )
Output:
nil function: builtin#25