GetRadarAreaSize: 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]]
{{Needs_Checking|Need confirmnation on what exactly size means. [[User:Erorr404|Erorr404]]}}


__NOTOC__  
__NOTOC__  
This fake function is for use with blah & blah and does blahblahblabhalbhl
Used for getting the X and Y size of an existing radar area.


==Syntax==  
==Syntax==  
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
float float getRadarAreaSize ( radararea radararea )               
float float getRadarAreaSize ( radararea theRadararea )               
</syntaxhighlight>  
</syntaxhighlight>  


===Required Arguments===  
===Required Arguments===  
*'''argumentName:''' description
*'''theRadararea:''' The radararea element whose size you wish to get.
 
===Optional Arguments===
{{OptionalArg}}
*'''argumentName2:''' descriptiona
*'''argumentName3:''' description


===Returns===
===Returns===
Returns ''true'' if blah, ''false'' otherwise.
Returns two ''floats'' indicating the X and Y length of the radar area respectively, ''false'' if the radar area doesn't exist.


==Example==  
==Example==  
This example does...
The following example looks for radar areas whose size is smaller than 100 by 100:
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
--This line does...
radarareas = getElementsByType ( "radararea" ) -- get a tabele of radararea elements
blabhalbalhb --abababa
for k,v in radarareas do -- use a generic for loop to step through each of the elements
--This line does this...
  local sizeX, sizeY = getRadarAreaSize ( v ) -- get the size of the radar area
mooo
  if ( sizeX < 100 and sizeY < 100 ) then -- check if it's smaller than 100 by 100
      outputChatBox ( "A small radar area was found!" )
  end
end
</syntaxhighlight>
</syntaxhighlight>


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

Revision as of 22:35, 10 September 2006

Dialog-information.png This article needs checking.

Reason(s): Need confirmnation on what exactly size means. Erorr404


Used for getting the X and Y size of an existing radar area.

Syntax

float float getRadarAreaSize ( radararea theRadararea )              

Required Arguments

  • theRadararea: The radararea element whose size you wish to get.

Returns

Returns two floats indicating the X and Y length of the radar area respectively, false if the radar area doesn't exist.

Example

The following example looks for radar areas whose size is smaller than 100 by 100:

radarareas = getElementsByType ( "radararea" ) -- get a tabele of radararea elements
for k,v in radarareas do -- use a generic for loop to step through each of the elements
   local sizeX, sizeY = getRadarAreaSize ( v ) -- get the size of the radar area
   if ( sizeX < 100 and sizeY < 100 ) then -- check if it's smaller than 100 by 100
      outputChatBox ( "A small radar area was found!" )
   end
end

See Also