Garry's Mod Wiki

Garry's Mod Wiki

  DTVar_ReceiveProxyGL( Entity entity, string Type, number index, any new value )

Description

Calls all NetworkVarNotify functions of the given entity with the given new value, but doesn't change the real value.
internally uses Entity:CallDTVarProxies

Arguments

1 Entity entity
The Entity to run the NetworkVarNotify functions from.
2 string Type
The NetworkVar Type.
  • String
  • Bool
  • Float
  • Int (32-bit signed integer)
  • Vector
  • Angle
  • Entity
3 number index
The NetworkVar index.
4 any new value
The new value.

Example

Calls the NetworkVarNotify function with the given new value but doesn't changes the real value.

Entity(1):NetworkVar("String", 0, "Example") Entity(1):SetExample("hello") Entity(1):NetworkVarNotify("Example", function(ent, var, old, new) print(ent, var, old, new) end) DTVar_ReceiveProxyGL(Entity(1), "String", 0, "world") print("Value:" .. Entity(1):GetExample())
Output: Player [1][Raphael] Example hello world
Value: hello

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...