GetMarkerIcon: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 16: Line 16:


==Example==
==Example==
<syntaxhighlight lang="lua">marker = createMarker ( 1000, 1000,1000, "checkpoint", 255, 0, 0 )
<syntaxhighlight lang="lua">
icon = getMarkerIcon (marker)
newmarker = createMarker ( 1000, 1000,1000, "checkpoint", 255, 0, 0 )
icon = getMarkerIcon ( newmarker )
outputChatBox ( "The default marker icon is " .. icon )
outputChatBox ( "The default marker icon is " .. icon )
</syntaxhighlight>
</syntaxhighlight>

Revision as of 17:54, 19 August 2007

This function returns the icon name for a marker.

Syntax

string getMarkerIcon ( 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:

  • "none": No icon
  • "arrow": Arrow icon
  • "finish": Finish (end-race) icon

Example

newmarker = createMarker ( 1000, 1000,1000, "checkpoint", 255, 0, 0 )
icon = getMarkerIcon ( newmarker )
outputChatBox ( "The default marker icon is " .. icon )

See Also