Garry's Mod Wiki

Garry's Mod Wiki

  number GetGlobal2Int( string index, number default = 0 )

Description

Returns an integer that is shared between the server and all clients.

The integer has a 32 bit limit. Use GetGlobalInt for a higher limit

Arguments

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

Returns

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

Example

Prints the current round number if set, otherwise 0.

print(GetGlobalInt("RoundNumber", 0))

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...