Difference between revisions of "00C0"

From GTAMods Wiki
Jump to navigation Jump to search
(New page: <code>00C0=2,%1d% %2d%</code><br> '''Description''': Sets the current game clock<br> '''Parameter 1''': Integer (hour)<br> '''Parameter 2''': Integer (minute)<br> '''Supports''': GTA3, Vic...)
 
(clarified bug)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<code>00C0=2,%1d% %2d%</code><br>
+
{{OpCode
'''Description''': Sets the current game clock<br>
+
| games      = {{Icon|t}}
'''Parameter 1''': Integer (hour)<br>
+
| command    = SET_TIME_OF_DAY
'''Parameter 2''': Integer (minute)<br>
+
| description = Sets the current game clock
'''Supports''': GTA3, Vice City, San Andreas<br>
+
| syntax1    = 00C0: set_current_time [''int1''] [''int2'']
 +
| p1t        = [''int1'']
 +
| p1d        = Game hour
 +
| p2t        = [''int2'']
 +
| p2d        = Game minute
 +
| native      = [[SET_TIME_OF_DAY]]
 +
}}
  
This sets the current game clock. The hours are from 0 to 23 and the minutes are from 0 to 59. You can set the numbers higher but the game will reset it to the appropriate time, like hour 25 will be hour 1 and minute 65 would be hour 1 and minute 5.
+
This opcode sets the current game clock. Valid values for hours are between 0 and 23, and for minutes are between 0 and 59. In Vice City, it is not possible to set a time outside the range as the game takes the [[wikipedia:Modulo operation|modulo]] of 24 with the hour and modulo of 60 with the minute.
  
==Keywords==
+
Due to a bug in Vice City when starting a new game, setting the clock before a timer update (which can happen through [[0001]] or [[03CB]], among others) can cause the clock to speed forward similar in effect to inputting the "faster game clock" cheat. Either don't set the time at all (which will initialize the clock to 12:00) or set it after a timer update. An example of correct usage can be seen [[Sanny Builder/stripped.txt#Vice City|here]].
set, current, time, clock
 
  
[[Category:OpCodes]]
+
== Keywords ==
 +
set, current, time, clock, day
 +
 
 +
== See also ==
 +
* {{Icon|t}} [[00BF]], gets time of day
 +
* {{Icon|t}} [[00C1]], gets minutes left to time

Latest revision as of 17:14, 14 January 2017

GTA III Vice City San Andreas SET_TIME_OF_DAY


Description
Sets the current game clock
Syntax
00C0: set_current_time [int1] [int2]
Parameter
[int1]
Game hour
[int2]
Game minute
Native analog
SET_TIME_OF_DAY

This opcode sets the current game clock. Valid values for hours are between 0 and 23, and for minutes are between 0 and 59. In Vice City, it is not possible to set a time outside the range as the game takes the modulo of 24 with the hour and modulo of 60 with the minute.

Due to a bug in Vice City when starting a new game, setting the clock before a timer update (which can happen through 0001 or 03CB, among others) can cause the clock to speed forward similar in effect to inputting the "faster game clock" cheat. Either don't set the time at all (which will initialize the clock to 12:00) or set it after a timer update. An example of correct usage can be seen here.

Keywords

set, current, time, clock, day

See also

  • GTA III Vice City San Andreas 00BF, gets time of day
  • GTA III Vice City San Andreas 00C1, gets minutes left to time