Time::setClockDate

From RAGE Multiplayer Wiki

Client-Side
Function

 JavaScript



JavaScript Syntax


Summary

Sets the in-game date by specifying the day, month, and year. This function is useful for synchronizing the game environment with custom timelines or events.

Syntax

mp.game.time.setClockDate(day, month, year);

Required Parameters

  • day: int - The day of the month (1–31).
  • month: int - The month (1–12).
  • year: int - The year to set.

Return Value

  • undefined - No value is returned.

Example

This example sets the in-game date to January 1st, 2025:

mp.game.time.setClockDate(1, 1, 2025);
mp.gui.chat.push("The in-game date has been updated to 01/01/2025.");


See Also