setMarkerTarget | Multi Theft Auto: Wiki Skip to content

setMarkerTarget

Client-side
Server-side
Shared

Pair: getMarkerTarget

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function sets the 'target' for a marker. Only the checkpoint and ring marker types can have a target.

OOP Syntax Help! I don't understand this!

  • Method:marker:setTarget(...)
  • Variable: .target

Syntax

bool setMarkerTarget ( marker theMarker, float x, float y, float z )
Required Arguments
  • theMarker: The marker to set the target of
  • x: The x axis of the coordinate to target the marker at
  • y: The y axis of the coordinate to target the marker at
  • z: The z axis of the coordinate to target the marker at

Returns

  • bool: value

Returns true if target was set, false otherwise.

Code Examples

shared

Creates a marker in the center of the map and points it north.

local newMarker = createMarker(0, 0, 5, "ring", 2, 255, 0, 0, 255) --Creates a marker
setMarkerTarget(newMarker, 3000, 0, 0) --Face the marker north