Gameplay::getGameTimer

From RAGE Multiplayer Wiki
Revision as of 09:50, 29 April 2024 by Shr0x (talk | contribs) (Created page with "{{ClientsideJsFunction}} {{JSContainer| Gets the current game timer in ms (game time starts when the game begins). ===Return value=== *''' {{RageType|number}} ''' ==Syntax== <syntaxhighlight lang="javascript"> mp.game.gameplay.getGameTimer(); </syntaxhighlight> ==Example== <syntaxhighlight lang="javascript"> const gameTime = mp.game.gameplay.getGameTimer(); mp.console.logInfo(`Game time is ${gameTime}`); </syntaxhighlight> }} ==See also== {{Gameplay_definition_c}} C...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Client-Side
Function

 JavaScript



JavaScript Syntax

Gets the current game timer in ms (game time starts when the game begins).

Return value

  • number

Syntax

mp.game.gameplay.getGameTimer();

Example

const gameTime = mp.game.gameplay.getGameTimer();
mp.console.logInfo(`Game time is ${gameTime}`);


See also