SetSunColor
Jump to navigation
Jump to search
This function is used to set the color of the sun.
Syntax
bool setSunColor ( int Red, int Green, int Blue )
Required Arguments
- Red: The amount of red (0-255) you want the sun to be.
- Green: The amount of green (0-255) you want the sun to be.
- Blue: The amount of blue (0-255) you want the sun to be.
Returns
Returns true if the color of the sun was set, false otherwise.
Example
This example lets any player set the color of the sun like /setsuncolor 255 0 0
function commandSetSunColor(player, command, r, g, b) local r, g, b = tonumber(r), tonumber(g), tonumber(b) if (r and g and b) then setSunColor(r, g, b) outputChatBox("Color of sun now set", player, 0, 255, 0) else outputChatBox("Usage: /setsuncolor r g b (eg: /setsuncolor 255 0 0)", player, 255, 0, 0) end end addCommandHandler("setsuncolor", commandSetSunColor)
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