GetGlobalString

From Garry's Mod
Jump to: navigation, search
 GetGlobalString( )

Contents

Description

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

Arguments

string index

The unique index to identify the global value with.

Arguments

string default=""

The value to return if the global value is not set.

Returns

string

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

Examples

Example

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

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


Personal tools
Navigation