SetMarkerIcon: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
Line 20: Line 20:
===Required Arguments===
===Required Arguments===
* '''theMarker:''' The [[marker]] to change the visual style of
* '''theMarker:''' The [[marker]] to change the visual style of
* '''icon:''' A string referring to the type of icon (see below)
* '''icon:''' A string referring to the type of icon, acceptable values are:
 
**'''"none"''': No icon
==Acceptable icon values==
**'''"arrow"''': Arrow icon
*'''"none"''': No icon
**'''"finish"''': Finish icon (at end of race)
*'''"arrow"''': Arrow icon
*'''"finish"''': Finish icon (at end of race)


==Example==
==Example==
This example creates a finish marker as you'd expect for the end of a race.
<syntaxhighlight lang="lua">theMarker = createMarker ( 1000, 1000, 1000, 0, 255, 0, 0 )  
<syntaxhighlight lang="lua">theMarker = createMarker ( 1000, 1000, 1000, 0, 255, 0, 0 )  
setMarkerIcon ( theMarker, "finish" )</syntaxhighlight>
setMarkerIcon ( theMarker, "finish" )</syntaxhighlight>

Revision as of 00:29, 29 December 2007

Dialog-information.png This article needs checking.

Reason(s): Didn't work with:

root = getRootElement ()

addEventHandler ( "onResourceStart", root, "ResourceStart" )
function ResourceStart ( name, root )
marker1 = createMarker ( 1935.0825, -1709.9506, 151.77 )
setMarkerIcon ( marker1, "arrow" )
end

??--Ransom 20:00, 10 April 2007 (CDT)


Description

This function allows changing the icon of a checkpoint marker.

Syntax

bool setMarkerIcon ( marker theMarker, string icon )

Required Arguments

  • theMarker: The marker to change the visual style of
  • icon: A string referring to the type of icon, acceptable values are:
    • "none": No icon
    • "arrow": Arrow icon
    • "finish": Finish icon (at end of race)

Example

This example creates a finish marker as you'd expect for the end of a race.

theMarker = createMarker ( 1000, 1000, 1000, 0, 255, 0, 0 ) 
setMarkerIcon ( theMarker, "finish" )

See Also