GetRadarAreaColor: 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
This function can be used to retrieve the current color of a Radar Area.


==Syntax==  
==Syntax==  
Line 10: Line 8:


===Required Arguments===  
===Required Arguments===  
*'''argumentName:''' description
*'''radararea:''' The radar area you wish to retrieve the colour of
 
===Optional Arguments===
{{OptionalArg}}
*'''argumentName2:''' descriptiona
*'''argumentName3:''' description


===Returns===
===Returns===
Returns ''true'' if blah, ''false'' otherwise.
Returns four integers in RGBA format, with a maximum value of 255 for each.  Each stands for ''red'', ''green'', ''blue'', and ''alpha''.  Alpha decides transparancy where 255 is opaque and 0 is transparent.


==Example==  
==Example==  
This example does...
This example checks the color of a radararea defined as 'area' and announces if it is ballas or grove street.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
--This line does...
local r,g,b,a getRadarAreaColor ( area ) --get the color of 'area' and define it as 'r', 'g', 'b' and 'a'
blabhalbalhb --abababa
if g == 255 then --if the radar area is fully green
--This line does this...
    outputChatBox ( "This is Grove Street turf!" ) --announce it as grove street area
mooo
elseif r == 255 then --if it is fully red however
    outputChatBox ( "This is Ballas turf!" ) --announce it as ballas area
end
</syntaxhighlight>
</syntaxhighlight>


==See Also==
==See Also==
{{FunctionArea_Functions}}
{{Radar area functions}}

Revision as of 17:57, 13 August 2006

This function can be used to retrieve the current color of a Radar Area.

Syntax

int int int int getRadarAreaColor ( radararea radararea )              

Required Arguments

  • radararea: The radar area you wish to retrieve the colour of

Returns

Returns four integers in RGBA format, with a maximum value of 255 for each. Each stands for red, green, blue, and alpha. Alpha decides transparancy where 255 is opaque and 0 is transparent.

Example

This example checks the color of a radararea defined as 'area' and announces if it is ballas or grove street.

local r,g,b,a getRadarAreaColor ( area ) --get the color of 'area' and define it as 'r', 'g', 'b' and 'a'
if g == 255 then --if the radar area is fully green
    outputChatBox ( "This is Grove Street turf!" ) --announce it as grove street area
elseif r == 255 then --if it is fully red however
    outputChatBox ( "This is Ballas turf!" ) --announce it as ballas area
end

See Also