Skip to content

clock


set_clock_time

void native.clock.set_clock_time(int hour, int minute, int second)

SET_CLOCK_TIME(12, 34, 56);

pause_clock

void native.clock.pause_clock(bool toggle, int unused)


_pause_clock_this_frame

void native.clock._pause_clock_this_frame(bool toggle)


advance_clock_time_to

void native.clock.advance_clock_time_to(int hour, int minute, int second)


add_to_clock_time

void native.clock.add_to_clock_time(int hours, int minutes, int seconds)


get_clock_hours

int native.clock.get_clock_hours()

Gets the current ingame hour, expressed without zeros. (09:34 will be represented as 9)

get_clock_minutes

int native.clock.get_clock_minutes()

Gets the current ingame clock minute.

get_clock_seconds

int native.clock.get_clock_seconds()

Gets the current ingame clock second. Note that ingame clock seconds change really fast since a day in RDR is only 48 minutes in real life.

_set_milliseconds_per_game_minute

void native.clock._set_milliseconds_per_game_minute(int ms)


_get_seconds_since_base_year

int native.clock._get_seconds_since_base_year()

Base year is 1898.

set_clock_date

void native.clock.set_clock_date(int day, int month, int year)


get_clock_day_of_week

int native.clock.get_clock_day_of_week()

Gets the current day of the week.

0: Sunday
1: Monday
2: Tuesday
3: Wednesday
4: Thursday
5: Friday
6: Saturday

get_clock_day_of_month

int native.clock.get_clock_day_of_month()


get_clock_month

int native.clock.get_clock_month()


get_clock_year

int native.clock.get_clock_year()


get_milliseconds_per_game_minute

int native.clock.get_milliseconds_per_game_minute()


get_posix_time

void native.clock.get_posix_time(ptr int year, ptr int month, ptr int day, ptr int hour, ptr int minute, ptr int second)


_get_posix_time_struct

void native.clock._get_posix_time_struct(ptr int out_time)

Same as GET_POSIX_TIME except that it takes a single pointer to a struct.

_add_time_to_date_time

void native.clock._add_time_to_date_time(ptr int in_date_time, ptr int time_to_add, ptr int out_date_time)