GameSettings
constGameSettings:object
Defined in: client/api.d.ts:728
The game’s own tuning values (game settings, GMST) in this player’s game: how high a jump goes, how fast a sprint is, what a lock costs to pick. The game reads them where they stand, so a change takes effect at once, for this player alone; a server sets the same on every client to make it a rule. What a script changed goes back to what it was when the session ends.
Type Declaration
Section titled “Type Declaration”get(
name):string|number|boolean|null
A game setting’s value.
Parameters
Section titled “Parameters”string
The setting’s name as the game’s data defines it: “fJumpHeightMin”, “fSprintSpeedMult”, “iMaxCharacterLevel”. The first letter says what it holds: f a number, i and u a whole number, b a boolean, s a text.
Returns
Section titled “Returns”string | number | boolean | null
Null when the game has no setting of that name.
set(
name,value):boolean
Changes a game setting for this player’s game, until the session ends.
Parameters
Section titled “Parameters”string
The setting’s name as the game’s data defines it: “fJumpHeightMin”, “fSprintSpeedMult”, “iMaxCharacterLevel”. The first letter says what it holds: f a number, i and u a whole number, b a boolean, s a text.
number | boolean
The new value, of the setting’s kind.
Returns
Section titled “Returns”boolean
False when the game has no setting of that name, it holds a text, or the value is not of its kind.