Garry's Mod Wiki

SetGlobalVar

  SetGlobalVar( any index, any value )

Description

Defines a variable to be automatically networked to clients

Allowed Types
Angle
Boolean
Entity
Float
Int
String
Vector
Trying to network a type that is not listed above will result in an error!
There's a 4095 slots Network limit. If you need more, consider using the net library or SetGlobal2Var. You should also consider the fact that you have way too many variables. You can learn more about this limit here: Networking_Usage
Running this function clientside will only set it clientside for the client it is called on!

Arguments

1 any index
Index to identify the global vector with
2 any value
Value to be networked