SetRadarAreaColor: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
[[Category:Incomplete]]
__NOTOC__  
__NOTOC__  
This fake function is for use with blah & blah and does blahblahblabhalbhl
Sets the color of an existing radar area.


==Syntax==  
==Syntax==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool setRadarAreaColor ( element radararea, int r, int g, int b, int a )               
bool setRadarAreaColor ( radararea theRadarArea, int r, int g, int b, int a )               
</syntaxhighlight>  
</syntaxhighlight>  


===Required Arguments===  
===Required Arguments===  
*'''argumentName:''' description
*'''theRadarArea:''' the radararea element whose color you wish to set.
 
*'''r:''' an integer representing the amount of red in the color (0 for no red, 255 for solid red)
===Optional Arguments===
*'''g:''' an integer representing the amount of green in the color (0 for no green, 255 for solid green)
{{OptionalArg}}
*'''b:''' an integer representing the amount of blue in the color (0 for no blue, 255 for solid blue)
*'''argumentName2:''' descriptiona
*'''a:''' an integer representing the color's alpha (0 for transparent, 255 for opaque)
*'''argumentName3:''' description


===Returns===
===Returns===
Returns ''true'' if blah, ''false'' otherwise.
Returns ''true'' if the color was set successfully, ''false'' if the radar area doesn't exist or the color arguments are improper.


==Example==  
==Example==  
This example does...
This example creates a radar area and changes it's color right away:
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
--This line does...
someArea = createRadarArea ( 1024, 1024, 75, 100, 0, 0, 0, 255 ) -- create a black radar area
blabhalbalhb --abababa
local flag = setRadarAreaColor ( someArea, 255, 85, 85, 170 ) -- change it's color
--This line does this...
if ( flag ) then -- if the function returned true...
mooo
  outputChatBox ( "Color set successfully!" )
else -- if the function returned false...
  outputChatBox ( "Failed to set color." )
end
</syntaxhighlight>
</syntaxhighlight>


==See Also==
==See Also==
{{FunctionArea_Functions}}
{{Radar area_functions}}

Revision as of 23:04, 10 September 2006

Sets the color of an existing radar area.

Syntax

bool setRadarAreaColor ( radararea theRadarArea, int r, int g, int b, int a )               

Required Arguments

  • theRadarArea: the radararea element whose color you wish to set.
  • r: an integer representing the amount of red in the color (0 for no red, 255 for solid red)
  • g: an integer representing the amount of green in the color (0 for no green, 255 for solid green)
  • b: an integer representing the amount of blue in the color (0 for no blue, 255 for solid blue)
  • a: an integer representing the color's alpha (0 for transparent, 255 for opaque)

Returns

Returns true if the color was set successfully, false if the radar area doesn't exist or the color arguments are improper.

Example

This example creates a radar area and changes it's color right away:

someArea = createRadarArea ( 1024, 1024, 75, 100, 0, 0, 0, 255 ) -- create a black radar area
local flag = setRadarAreaColor ( someArea, 255, 85, 85, 170 ) -- change it's color
if ( flag ) then -- if the function returned true...
   outputChatBox ( "Color set successfully!" )
else -- if the function returned false...
   outputChatBox ( "Failed to set color." )
end

See Also