From GMod Wiki
SetGlobalString( Var index, String value )
Where is this used?
|Similiar to the function Entity:SetNetworkedString - Sets a networked String , but outside of the entity.|
|Part of Library:||Global Functions|
|BBCode Link:||[b][url=http://wiki.garrysmod.com/?title=G.SetGlobalString]G.SetGlobalString [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]|
|Description||Sets 2 global strings which you can later get with GetGlobalString.|
SetGlobalString( 1337, "This is one l33t string!" ) SetGlobalString( "GameDescription", "Shoot all the apples to win!" )
- Running a networked function will cause it to synchronize the networked data with the clients.
- Index can be a String or Integer - however, when dealing with global networked variables, it's suggested that you use a string with part of the name of your script in it - like "mygamemode_tickrate", for example.
- Running this function clientside will only set it clientside - not serverside.
- Only set networked variables when necessary - sending networked variables constantly is expensive.
- The string length seems to be capped at 199 characters