GetMarkerType: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
__NOTOC__
__NOTOC__
==Description==
This function returns an type for a marker.
This function returns an ID number that corresponds to a particular type of marker.


==Syntax==
==Syntax==
<syntaxhighlight lang="lua">int getMarkerType ( marker marker)</syntaxhighlight>
<syntaxhighlight lang="lua">string getMarkerType ( marker theMarker)</syntaxhighlight>


===Required Arguments===
===Required Arguments===
* '''marker''': A [[marker]] class referencing the specified marker.
* '''theMarker''': A [[marker]] element referencing the specified marker.


==Return Values==
===Returns===
Returns ''false'' if the marker passed is invalid or a string containing one of the following:
* '''"checkpoint"''': Checkpoint
* '''"checkpoint"''': Checkpoint
* '''"ring"''': Ring (doughnut-shaped)
* '''"ring"''': Ring (doughnut-shaped)
* '''"cylinder"''': Cylinder
* '''"cylinder"''': Cylinder
* '''"arrow"''': Animated arrow pointing down
* '''"arrow"''': Animated arrow pointing down
* '''"corona"''': Glowing area


==Example==
==Example==
<syntaxhighlight lang="lua">marker = createMarker ( 1000, 1000,1000, 0, 255, 0, 0 )
<syntaxhighlight lang="lua">marker = createMarker ( 1000, 1000,1000, 0, 255, 0, 0 )
gettype = getMarkerType (marker)
gettype = getMarkerType (marker)
if (gettype == 0)
outputChatBox ( "Its a " .. gettype .. " marker!" )
      outputChatBox ("Checkpoint marker.")
</syntaxhighlight>
else
      outputChatBox ("Corona marker.")
end</syntaxhighlight>


==See Also==
==See Also==
{{Marker functions}}
{{Marker functions}}

Revision as of 15:07, 14 August 2006

This function returns an type for a marker.

Syntax

string getMarkerType ( marker theMarker)

Required Arguments

  • theMarker: A marker element referencing the specified marker.

Returns

Returns false if the marker passed is invalid or a string containing one of the following:

  • "checkpoint": Checkpoint
  • "ring": Ring (doughnut-shaped)
  • "cylinder": Cylinder
  • "arrow": Animated arrow pointing down
  • "corona": Glowing area

Example

marker = createMarker ( 1000, 1000,1000, 0, 255, 0, 0 )
gettype = getMarkerType (marker)
outputChatBox ( "Its a " .. gettype .. " marker!" )

See Also