GetSkyGradient: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ {{Server client function}} This function will return the current sky color. '''Note:''' The server can only return the sky color if it has actually been set by script....") |
|||
Line 14: | Line 14: | ||
==Example== | ==Example== | ||
<section name="Client" class="client" show="true"> | |||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
function check() | |||
local r1, g1, b1, r2, g2, b2 = getSkyGradient() | |||
outputChatBox("Sky gradient colors is R: "..r1.." G: "..g1.." B: "..b1.." and R: "..r2.." G: "..g2.." B: "..b2) | |||
end | |||
addCommandHandler("skygradient", check) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | |||
==See Also== | ==See Also== |
Revision as of 21:59, 22 December 2011
This function will return the current sky color.
Note: The server can only return the sky color if it has actually been set by script.
Syntax
int, int, int, int, int, int getSkyGradient ( )
Returns
Returns 6 ints, of which the first 3 represent the sky's "top" color, (in RGB) and the last 3 represent the bottom colors.
Example
Click to collapse [-]
Clientfunction check() local r1, g1, b1, r2, g2, b2 = getSkyGradient() outputChatBox("Sky gradient colors is R: "..r1.." G: "..g1.." B: "..b1.." and R: "..r2.." G: "..g2.." B: "..b2) end addCommandHandler("skygradient", check)
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