Garry's Mod Wiki

GetGlobalString

string GetGlobalString( string index, string default )

Description

Returns a string that is shared between the server and all clients.

Arguments

1 string index
The unique index to identify the global value with.
2 string default
The value to return if the global value is not set.

Returns

1 string
The global value, or the default if the global value is not set.

Example

Prints the current server name if set, otherwise "Garry's Mod 13".

print( GetGlobalString("ServerName", "Garry's Mod 13") )

Page Links


Special Pages


Wikis

?

Render Time: 132ms

DB GetPage 72
Generate Html 8
SaveChanges (1) 36
Render Body 0
Render Sidebar 13