Garry's Mod Wiki

Garry's Mod Wiki

  Entity:CallDTVarProxies( string type, number slot, any newValue )

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. Supported choices:
  • String (up to 511 characters)
  • Bool
  • Float
  • Int (32-bit signed integer)
  • Vector
  • Angle
  • Entity
2 number slot
The NetworkVar slot. See Entity:NetworkVar for more detailed explanation.
3 any newValue
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

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 four times a day. Edits and history are not available.

Last Parsed: Loading...