ConVars
Console Variables (convar) are a great way to tweak and control game features or debugging tools dynamically during runtime. They can be defined and accessed through different types depending on where they are used.
Types
Client: Console variable that is available on the client
ClientData: A property with this attribute will be made a ClientData ConVar. It will be able to be changed by the client at any time and changes will be sent to the server. The variables will be accessible on the server by name on the Client object.
Engine: Console variable that is available everywhere, always
Menu: Console variable that is available via the menu
Replicated: Properties with this attribute will be replicated from the server to each client. The value can only be changed by the server or the server admin, but clients can read the value at any time.
Server: Console variable that is available on the server
Defining
Convars must be static.
ClientData
ClientData doesn't need to be static - you can also (optionally) store ClientData convars as a member on an Entity.
Accessing
ClientData
To access static ClientData convars on the server, you need to go through a Client object.
If your ClientData convar is a member of an entity, it can be accessed directly.