Graphics::drawMarker

From RAGE Multiplayer Wiki
Jump to navigation Jump to search

Description

Use this function to draw a marker.

This function is used in a render event.

Syntax

Client-Side
mp.game.graphics.drawMarker(type,
  posX, posY, posZ,
  dirX, dirY, dirZ,
  rotX, rotY, rotZ,
  scaleX, scaleY, scaleZ,
  colorR, colorG, colorB, alpha,
  bobUpAndDown, faceCamera, p19,
  rotate, textureDict, textureName, drawOnEnts
);

Required Arguments

  • 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
  • colorR: number
  • colorG: number
  • colorB: number
  • alpha: number
  • bobUpAndDown: boolean
  • faceCamera: boolean
  • p19: number
  • rotate: boolean
  • textureDict: string
  • textureName: string
  • drawOnEnts: boolean

Return value

  • void

Example

This example will create a little marker above the player's head.

new mp.Event('render', () => {
  let pos = mp.players.local.position;

  mp.game.graphics.drawMarker(
    0,
    pos.x, pos.y, pos.z + 2,
    0, 0, 0,
    0, 0, 0,
    1.0, 1.0, 1.0,
    255, 255, 255, 255,
    false, false, 2,
    false, "", "",false
  );
});

See also