Skip to main content

Gameplay::getGameTimer

Client-side function

JavaScript​

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}`);