Garry's Mod Wiki

Entity:GetNetworkedVarProxy

Description

We advise against using this. It may be changed or removed in a future update. You should be using Entity:GetNWVarProxy instead.

Returns callback function for given NWVar of this entity.

Currently this function only works for the NW2Var system (accessed by adding a 2 in between Networked and Var for most NetworkedVar functions), which will replace the original one at some point in the future

Arguments

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

Returns

1 function
The callback of given NWVar, if any.

Example

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

print( Entity(1):GetNetworkedVarProxy( "Key" ) ) Entity(1):SetNetworkedVarProxy( "Key", print ) print( Entity(1):GetNetworkedVarProxy( "Key" ) )
Output: nil function: builtin#25

Page Links


Special Pages


Wikis

?

Render Time: 32ms

Session 0
DB GetPage 4
Generate Html 2
SaveChanges 9
Render Body 0
Render Sidebar 12