SetMinuteDuration: Difference between revisions
Jump to navigation
Jump to search
CrosRoad95 (talk | contribs) No edit summary |
(Replace to predefined variables.) |
||
(One intermediate revision by one other user not shown) | |||
Line 9: | Line 9: | ||
===Required Arguments=== | ===Required Arguments=== | ||
*'''milliseconds''': the new duration of an ingame minute, accepted values 0 - | *'''milliseconds''': the new duration of an ingame minute, accepted values 0 - 2147483647. | ||
===Returns=== | ===Returns=== | ||
Line 24: | Line 24: | ||
setMinuteDuration(60000) | setMinuteDuration(60000) | ||
end | end | ||
addEventHandler("onResourceStart", | addEventHandler("onResourceStart", resourceRoot, resourceStart) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | </section> |
Latest revision as of 23:14, 11 January 2023
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 - 2147483647.
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 [-]
Serverfunction resourceStart() local realtime = getRealTime() setTime(realtime.hour, realtime.minute) setMinuteDuration(60000) end addEventHandler("onResourceStart", resourceRoot, resourceStart)
See Also
- areTrafficLightsLocked
- getAircraftMaxHeight
- getAircraftMaxVelocity
- getCloudsEnabled
- getFarClipDistance
- getFogDistance
- getGameSpeed
- getGravity
- getHeatHaze
- getInteriorSoundsEnabled
- getJetpackMaxHeight
- getMinuteDuration
- getMoonSize
- getOcclusionsEnabled
- getRainLevel
- getSunColor
- getSunSize
- getTime
- getTrafficLightState
- getWeather
- getWindVelocity
- getSkyGradient
- getPlayerBlurLevel
- getZoneName
- isGarageOpen
- removeWorldModel
- resetFarClipDistance
- resetFogDistance
- resetHeatHaze
- resetMoonSize
- resetRainLevel
- resetSkyGradient
- resetSunColor
- resetSunSize
- resetWindVelocity
- restoreAllWorldModels
- restoreWorldModel
- setAircraftMaxHeight
- setAircraftMaxVelocity
- setCloudsEnabled
- setFarClipDistance
- setFogDistance
- setGameSpeed
- setGarageOpen
- setGravity
- setHeatHaze
- setInteriorSoundsEnabled
- setMinuteDuration
- setMoonSize
- setOcclusionsEnabled
- setRainLevel
- setSkyGradient
- setSunColor
- setSunSize
- setTime
- setTrafficLightState
- setTrafficLightsLocked
- setWeather
- setWeatherBlended
- setWindVelocity
- setJetpackMaxHeight
- setPlayerBlurLevel