Garry's Mod Wiki

Entity:CallDTVarProxies

  Entity:CallDTVarProxies( string Type, number index, any new value )

Description

Calls all Entity:NetworkVarNotify functions with the given new value, but doesn't change the real value.

Arguments

1 string Type
The NetworkVar Type.
  • String
  • Bool
  • Float
  • Int (32-bit signed integer)
  • Vector
  • Angle
  • Entity
2 number index
The NetworkVar index.
3 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) Entity(1):CallDTVarProxies("String", 0, "world") print("Value:" .. Entity(1):GetExample())
Output: Player [1][Raphael] Example hello world
Value: hello