setSunColor
Client-side
Server-side
Shared
Manual Review Required
Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.
This function is used to set the color of the sun.
Syntax
bool setSunColor ( int aRed, int aGreen, int aBlue, int bRed, int bGreen, int bBlue )Required Arguments
- aRed: The amount of red (0-255) you want the sun to be.
- aGreen: The amount of green (0-255) you want the sun to be.
- aBlue: The amount of blue (0-255) you want the sun to be.
- bRed: The amount of red (0-255) you want the sun to be.
- bGreen: The amount of green (0-255) you want the sun to be.
- bBlue: The amount of blue (0-255) you want the sun to be.
Returns
- bool: value
Returns true if the color of the sun was set, false otherwise.
Code Examples
shared
This example lets any player set the color of the sun like /setsuncolor 255 0 0
function commandSetSunColor(player, command, r, g, b, r2, g2, b2) local r, g, b, r2, g2, b2 = tonumber(r), tonumber(g), tonumber(b), tonumber(r2), tonumber(g2), tonumber(b2) if (r and g and b and r2 and g2 and b2) then setSunColor(r, g, b, r2, g2, b2) outputChatBox("Color of sun now set", player, 0, 255, 0) else outputChatBox("Usage: /setsuncolor r g b r2 g2 b2 (eg: /setsuncolor 255 0 0 255 0 0)", player, 255, 0, 0) endendaddCommandHandler("setsuncolor", commandSetSunColor)See Also
World Functions
- areTrafficLightsLocked
- createSWATRope
- getAircraftMaxHeight
- getAircraftMaxVelocity
- getBirdsEnabled
- getCloudsEnabled
- getColorFilter
- getCoronaReflectionsEnabled
- getFarClipDistance
- getFogDistance
- getGameSpeed
- getGarageBoundingBox
- getGaragePosition
- getGarageSize
- getGravity
- getGroundPosition
- getHeatHaze
- getInteriorFurnitureEnabled
- getInteriorSoundsEnabled
- getJetpackMaxHeight
- getJetpackWeaponEnabled
- getMinuteDuration
- getMoonSize
- getNearClipDistance
- getOcclusionsEnabled
- getPedsLODDistance
- getRainLevel
- getRoofPosition
- getScreenFromWorldPosition
- getSkyGradient
- getSunColor
- getSunSize
- getTime
- getTrafficLightState
- getVehiclesLODDistance
- getWeather
- getWindVelocity
- getWorldFromScreenPosition
- getWorldProperty
- getZoneName
- isAmbientSoundEnabled
- isGarageOpen
- isLineOfSightClear
- isTimeFrozen
- isVolumetricShadowsEnabled
- isWorldSoundEnabled
- isWorldSpecialPropertyEnabled
- processLineAgainstMesh
- processLineOfSight
- removeGameWorld
- removeWorldModel
- resetAmbientSounds
- resetBlurLevel
- resetColorFilter
- resetCoronaReflectionsEnabled
- resetFarClipDistance
- resetFogDistance
- resetHeatHaze
- resetMoonSize
- resetNearClipDistance
- resetPedsLODDistance
- resetRainLevel
- resetSkyGradient
- resetSunColor
- resetSunSize
- resetTimeFrozen
- resetVehiclesLODDistance
- resetVolumetricShadows
- resetWindVelocity
- resetWorldProperties
- resetWorldProperty
- resetWorldSounds
- restoreAllWorldModels
- restoreGameWorld
- restoreWorldModel
- setAircraftMaxHeight
- setAircraftMaxVelocity
- setAmbientSoundEnabled
- setBirdsEnabled
- setCloudsEnabled
- setColorFilter
- setCoronaReflectionsEnabled
- setFarClipDistance
- setFogDistance
- setGameSpeed
- setGarageOpen
- setGrainLevel
- setGrainMultiplier
- setGravity
- setHeatHaze
- setInteriorFurnitureEnabled
- setInteriorSoundsEnabled
- setJetpackMaxHeight
- setJetpackWeaponEnabled
- setMinuteDuration
- setMoonSize
- setNearClipDistance
- setOcclusionsEnabled
- setPedsLODDistance
- setRainLevel
- setSkyGradient
- setSunColor
- setSunSize
- setTime
- setTimeFrozen
- setTrafficLightsLocked
- setTrafficLightState
- setVehiclesLODDistance
- setVolumetricShadowsEnabled
- setWeather
- setWeatherBlended
- setWindVelocity
- setWorldProperty
- setWorldSoundEnabled
- setWorldSpecialPropertyEnabled
- testLineAgainstWater
- testSphereAgainstWorld