DrawMarker

From GT-MP
Jump to: navigation, search
DrawMarker
Client-Side Function
System-users.png Client-Side Javascript.png JavaScript

Draws a marker on the specified position, has to be called inside onUpdate.

Dialog-warning.png Note: This feature is currently not in the API, or is currently not accurate on the wiki due to upcoming API changes. New API functions and changes will be released with the next update.

Syntax

In Javascript
Client-Side Function

API.drawMarker(int markerType, Vector3 position, Vector3 direction, Vector3 rotation, Vector3 scale, int red, int green, int blue, int alpha, bool bobUpAndDown = false, bool faceCamera = false, bool rotateY = false);

Required Arguments

  • markerType parameter input should be in int type. See Marker.
  • position parameter input should be in Vector3 type.
  • direction parameter input should be in Vector3 type.
  • rotation parameter input should be in Vector3 type.
  • scale parameter input should be in Vector3 type.
  • red parameter input should be in int type.
  • green parameter input should be in int type.
  • blue parameter input should be in int type.
  • alpha parameter input should be in int type.

Optional Arguments

  • bobUpAndDown parameter input should be in bool type.
    • If set to true, the marker will bob up and down.
  • faceCamera parameter input should be in bool type.
    • If set to true, the marker will always face the camera, regardless of its rotation.
  • rotateY parameter input should be in bool type.
    • If set to true, the marker rotates only on the y axis(heading).

Usage example

In Javascript
Client-Side Function

API.drawMarker(int markerType, Vector3 position, Vector3 direction, Vector3 rotation, Vector3 scale, int red, int green, int blue, int alpha, bool bobUpAndDown = false, bool faceCamera = false, bool rotateY = false);

References