ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. setMinuteDuration

Function

setMinuteDuration

Server and clientMiscellaneousIdentical to MTA:SA

Sets how many milliseconds one game clock minute lasts (1000 by default, so a game day lasts 24 minutes). A higher value = a slower day.

Syntax

bool setMinuteDuration(int milliseconds)

Arguments

millisecondsint
Minute length in ms (at least 1).

Returns

true on success.

Example

A game day lasts as long as a real one.

setMinuteDuration(60000)
local t = getRealTime()
setTime(t.hour, t.minute)

Notes

Client. In a client script - clock pace for this player only (the clock then runs locally from the current time). Back: resetMinuteDuration, or setTime / setMinuteDuration on the server.

See also