SetMarkerIcon: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 1: Line 1:
{{Server client function}}
{{Server client function}}
{{Needs_Checking|Didn't work with:<pre>
root = getRootElement ()
addEventHandler ( "onResourceStart", root, "ResourceStart" )
function ResourceStart ( name, root )
marker1 = createMarker ( 1935.0825, -1709.9506, 151.77 )
setMarkerIcon ( marker1, "arrow" )
end</pre>
??--[[User:Ransom|Ransom]] 20:00, 10 April 2007 (CDT)}}


__NOTOC__
__NOTOC__

Revision as of 00:02, 30 December 2007


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

Shared