<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>https://rage.grandroleplay.ru/index.php?action=history&amp;feed=atom&amp;title=Time%3A%3AsetClockTime</id>
	<title>Time::setClockTime - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://rage.grandroleplay.ru/index.php?action=history&amp;feed=atom&amp;title=Time%3A%3AsetClockTime"/>
	<link rel="alternate" type="text/html" href="https://rage.grandroleplay.ru/index.php?title=Time::setClockTime&amp;action=history"/>
	<updated>2026-07-24T20:12:43Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://rage.grandroleplay.ru/index.php?title=Time::setClockTime&amp;diff=14966&amp;oldid=prev</id>
		<title>imported&gt;Shr0x в 12:44, 10 декабря 2024</title>
		<link rel="alternate" type="text/html" href="https://rage.grandroleplay.ru/index.php?title=Time::setClockTime&amp;diff=14966&amp;oldid=prev"/>
		<updated>2024-12-10T12:44:38Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{ClientsideJsFunction}}&lt;br /&gt;
{{JSContainer|&lt;br /&gt;
&lt;br /&gt;
=== Summary ===&lt;br /&gt;
Sets the in-game clock to a specific hour, minute, and second. This function is useful for synchronizing game time with real-world or custom timelines.&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
mp.game.time.setClockTime(hour, minute, second);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Required Parameters ===&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;hour:&amp;#039;&amp;#039;&amp;#039; {{RageType|int}} - The hour (0–23).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;minute:&amp;#039;&amp;#039;&amp;#039; {{RageType|int}} - The minute (0–59).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;second:&amp;#039;&amp;#039;&amp;#039; {{RageType|int}} - The second (0–59).&lt;br /&gt;
&lt;br /&gt;
=== Return Value ===&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;undefined&amp;#039;&amp;#039;&amp;#039; - No value is returned.&lt;br /&gt;
&lt;br /&gt;
=== Example ===&lt;br /&gt;
This example synchronizes the in-game clock with real-world time:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
const syncTime = () =&amp;gt; {&lt;br /&gt;
    const date = new Date();&lt;br /&gt;
    mp.game.time.setClockTime(date.getHours(), date.getMinutes(), date.getSeconds());&lt;br /&gt;
};&lt;br /&gt;
setInterval(syncTime, 2000); // Update clock every 2 seconds&lt;br /&gt;
mp.gui.chat.push(&amp;quot;The in-game time is now synchronized with real-world time.&amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
{{Time_functions_c}}&lt;br /&gt;
[[Category:Clientside API]]&lt;br /&gt;
[[Category:Time API]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Shr0x</name></author>
	</entry>
</feed>