DrawLine

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

Draws a line in 3D Space. You should call this during onUpdate.

Syntax

API.drawLine(Vector3 start, Vector3 end, int a, int r, int g, int b);

Required Arguments

  • start: parameter input should be in Vector3 type.
  • end: parameter input should be in Vector3 type.
  • a: parameter input should be in int type.
  • r: parameter input should be in int type.
  • g: parameter input should be in int type.
  • b: parameter input should be in int type.

Usage example(s)

Draws a blue line from player position to 10 units above the player.

API.drawLine(API.getEntityPosition(API.getLocalPlayer()), API.getEntityPosition(API.getLocalPlayer()).Add(new Vector3(0, 0, 10)), 255, 0, 0, 255);

References