SetSkyGradient: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
mNo edit summary
m (Added sections, minor changes)
Line 3: Line 3:
This function changes the sky color to a two-color gradient.
This function changes the sky color to a two-color gradient.


==Syntax==  
==Syntax==
<section name="Server and Client" class="both" show="true">
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool setSkyGradient ( [ int topRed = 0, int topGreen = 0, int topBlue = 0, int bottomRed = 0, int bottomGreen = 0, int bottomBlue = 0 ] )
bool setSkyGradient ( [ int topRed = 0, int topGreen = 0, int topBlue = 0, int bottomRed = 0, int bottomGreen = 0, int bottomBlue = 0 ] )
Line 19: Line 20:
===Returns===
===Returns===
Returns ''true'' if sky color was set correctly, ''false'' if invalid values were passed.
Returns ''true'' if sky color was set correctly, ''false'' if invalid values were passed.
</section>


==Example==  
==Example==  
This example sets the sky to a hot pink color.
<section name="Server and Client" class="both" show="true">
This example sets the sky to a hot pink gradient.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
setSkyGradient( 200, 0, 100, 200, 0, 100 )
setSkyGradient( 200, 0, 100, 150, 0, 70 )
</syntaxhighlight>
</syntaxhighlight>
</section>


==See Also==
==See Also==
{{Client world functions}}
{{Client world functions}}

Revision as of 15:29, 26 August 2007

This function changes the sky color to a two-color gradient.

Syntax

Click to collapse [-]
Server and Client
bool setSkyGradient ( [ int topRed = 0, int topGreen = 0, int topBlue = 0, int bottomRed = 0, int bottomGreen = 0, int bottomBlue = 0 ] )

Optional Arguments

NOTE: When using optional arguments, you might need to supply all arguments before the one you wish to use. For more information on optional arguments, see optional arguments.

  • topRed: The red value of the upper part of the sky, from 0 to 255.
  • topGreen: The green value of the upper part of the sky, from 0 to 255.
  • topBlue: The blue value of the upper part of the sky, from 0 to 255.
  • bottomRed: The red value of the lower part of the sky, from 0 to 255.
  • bottomGreen: The green value of the lower part of the sky, from 0 to 255.
  • bottomBlue: The blue value of the lower part of the sky, from 0 to 255.

Returns

Returns true if sky color was set correctly, false if invalid values were passed.

Example

Click to collapse [-]
Server and Client

This example sets the sky to a hot pink gradient.

setSkyGradient( 200, 0, 100, 150, 0, 70 )

See Also