GraphicsClientChecked by LS:MP

drawMarker

DRAW_MARKER0x28477EC23D892089

The GTA V native DRAW_MARKER of the GRAPHICS namespace, as LS:MP client scripts call it: the global function drawMarker, in JavaScript and in Lua.

SignatureJavaScript
drawMarker(
  type: number,
  posX: number,
  posY: number,
  posZ: number,
  dirX: number,
  dirY: number,
  dirZ: number,
  rotX: number,
  rotY: number,
  rotZ: number,
  scaleX: number,
  scaleY: number,
  scaleZ: number,
  red: number,
  green: number,
  blue: number,
  alpha: number,
  bobUpAndDown: boolean,
  faceCamera: boolean,
  rotationOrder: number,
  rotate: boolean,
  textureDict: string,
  textureName: string,
  invert: boolean
): void
SignatureLua
drawMarker(
  type: integer,
  posX: number,
  posY: number,
  posZ: number,
  dirX: number,
  dirY: number,
  dirZ: number,
  rotX: number,
  rotY: number,
  rotZ: number,
  scaleX: number,
  scaleY: number,
  scaleZ: number,
  red: integer,
  green: integer,
  blue: integer,
  alpha: integer,
  bobUpAndDown: boolean,
  faceCamera: boolean,
  rotationOrder: integer,
  rotate: boolean,
  textureDict: string,
  textureName: string,
  invert: boolean
)

Usage

JavaScript
drawMarker(
  type, posX, posY, posZ, dirX, dirY, dirZ, rotX, rotY, rotZ, scaleX, scaleY, scaleZ, red,
  green, blue, alpha, bobUpAndDown, faceCamera, rotationOrder, rotate, textureDict, textureName,
  invert
);
Lua
drawMarker(
    type, posX, posY, posZ, dirX, dirY, dirZ, rotX, rotY, rotZ, scaleX, scaleY, scaleZ, red,
    green, blue, alpha, bobUpAndDown, faceCamera, rotationOrder, rotate, textureDict,
    textureName, invert
)

Three consecutive numbers can be given as one vector: { x, y, z } (or [x, y, z]) in JavaScript, a Vector3 in Lua.

JavaScript · with vectors
drawMarker(
  type, pos, dir, rot, scale, red, green, blue, alpha, bobUpAndDown, faceCamera, rotationOrder,
  rotate, textureDict, textureName, invert
);
Lua · with vectors
drawMarker(
    type, pos, dir, rot, scale, red, green, blue, alpha, bobUpAndDown, faceCamera,
    rotationOrder, rotate, textureDict, textureName, invert
)

Parameters

ParameterTypeJavaScriptLuaDescription
typeintnumberintegerThe marker type to draw.
posXfloatnumbernumberThe X coordinate to draw the marker at.
posYfloatnumbernumberThe Y coordinate to draw the marker at.
posZfloatnumbernumberThe Z coordinate to draw the marker at.
dirXfloatnumbernumberThe X component of the direction vector for the marker, or 0.0 to use rotX/Y/Z.
dirYfloatnumbernumberThe Y component of the direction vector for the marker, or 0.0 to use rotX/Y/Z.
dirZfloatnumbernumberThe Z component of the direction vector for the marker, or 0.0 to use rotX/Y/Z.
rotXfloatnumbernumberThe X rotation for the marker. Only used if the direction vector is 0.0.
rotYfloatnumbernumberThe Y rotation for the marker. Only used if the direction vector is 0.0.
rotZfloatnumbernumberThe Z rotation for the marker. Only used if the direction vector is 0.0.
scaleXfloatnumbernumberThe scale for the marker on the X axis.
scaleYfloatnumbernumberThe scale for the marker on the Y axis.
scaleZfloatnumbernumberThe scale for the marker on the Z axis.
redintnumberintegerThe red component of the marker color, on a scale from 0-255.
greenintnumberintegerThe green component of the marker color, on a scale from 0-255.
blueintnumberintegerThe blue component of the marker color, on a scale from 0-255.
alphaintnumberintegerThe alpha component of the marker color, on a scale from 0-255.
bobUpAndDownBOOLbooleanbooleanWhether or not the marker should slowly animate up/down.
faceCameraBOOLbooleanbooleanWhether the marker should be a 'billboard', as in, should constantly face the camera.
rotationOrderintnumberintegerThe order yaw, pitch and roll is applied. Usually 2.
rotateBOOLbooleanbooleanRotations only apply to the heading.
textureDictstringstringstringA texture dictionary to draw the marker with, or NULL. Example: 'GolfPutting'
textureNamestringstringstringA texture name in textureDict to draw the marker with, or NULL. Example: 'PuttingMarker'
invertBOOLbooleanbooleanWhether or not the marker should use an inverted depth test.

Returns

Nothing. In JavaScript the call evaluates to undefined.

On LS:MP

ℹ
Checked by LS:MP

type must be between 0 and 44; posX, posY, posZ, dirX, dirY, dirZ, rotX, rotY, rotZ, scaleX, scaleY, scaleZ must be finite numbers. Otherwise the call is ignored: nothing reaches the game, and no error is raised. A texture pair the game has not loaded, or empty strings, does not refuse the call: the marker is drawn without a texture.

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Draws a marker with the specified appearance at the target location. This has to be called every frame.

Reference

Namespace
Graphics GRAPHICS
In the game
void DRAW_MARKER(int type, float posX, float posY, float posZ, float dirX, float dirY, float dirZ, float rotX, float rotY, float rotZ, float scaleX, float scaleY, float scaleZ, int red, int green, int blue, int alpha, BOOL bobUpAndDown, BOOL faceCamera, int rotationOrder, BOOL rotate, const char* textureDict, const char* textureName, BOOL invert)
Hash
0x28477EC23D892089

Open in the interactive natives reference