Garry's Mod Wiki


  function Entity:GetNWVarProxy( string key )


Returns callback function for given NWVar of this entity, previously set by Entity:SetNWVarProxy.

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


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


1 function
The callback of given NWVar, or nil if not found.
Function argument(s):
1 Entity ent - The entity
2 string name - Name of the NWVar that has changed
3 any oldval - The old value
4 any newval - The new value


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" ) )
nil function: builtin#25