SetMinuteDuration

From Multi Theft Auto: Wiki
Revision as of 08:23, 7 October 2018 by CrosRoad95 (talk | contribs)
Jump to navigation Jump to search

Sets the real-world duration of an ingame minute. The GTA default is 1000.

Syntax

bool setMinuteDuration ( int milliseconds )

Required Arguments

  • milliseconds: the new duration of an ingame minute, accepted values 0 - 4294967296.

Returns

Returns true if successful, false otherwise.

Example

This example will make the ingame time correspond to the real-world time of the server.

Click to collapse [-]
Server
function resourceStart()
    local realtime = getRealTime()

    setTime(realtime.hour, realtime.minute)
    setMinuteDuration(60000)
end
addEventHandler("onResourceStart", getResourceRootElement(), resourceStart)

See Also