Garry's Mod Wiki

SetGlobalInt

SetGlobalInt( string index, number value )

Description

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

Running this function clientside will only set it clientside for the client it is called on!
This function will not round decimal values as it actually networks a float internally.

Arguments

1 string index
The unique index to identify the global value with.
2 number value
The value to set the global value to

Example

Sets the current round number.

SetGlobalInt("RoundNumber", 4)

Page Links


Special Pages


Wikis

?

Render Time: 31ms

Session 0
DB GetPage 4
Generate Html 5
SaveChanges 8
Render Body 0
Render Sidebar 12