GraphicsClient

drawDebugLineWithTwoColours

DRAW_DEBUG_LINE_WITH_TWO_COLOURS0xD8B9A8AC5608FF94

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

SignatureJavaScript
drawDebugLineWithTwoColours(
  x1: number,
  y1: number,
  z1: number,
  x2: number,
  y2: number,
  z2: number,
  r1: number,
  g1: number,
  b1: number,
  r2: number,
  g2: number,
  b2: number,
  alpha1: number,
  alpha2: number
): void
SignatureLua
drawDebugLineWithTwoColours(
  x1: number,
  y1: number,
  z1: number,
  x2: number,
  y2: number,
  z2: number,
  r1: integer,
  g1: integer,
  b1: integer,
  r2: integer,
  g2: integer,
  b2: integer,
  alpha1: integer,
  alpha2: integer
)

Usage

JavaScript
drawDebugLineWithTwoColours(x1, y1, z1, x2, y2, z2, r1, g1, b1, r2, g2, b2, alpha1, alpha2);
Lua
drawDebugLineWithTwoColours(x1, y1, z1, x2, y2, z2, r1, g1, b1, r2, g2, b2, alpha1, alpha2)

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
drawDebugLineWithTwoColours(pos1, pos2, r1, g1, b1, r2, g2, b2, alpha1, alpha2);
Lua · with vectors
drawDebugLineWithTwoColours(pos1, pos2, r1, g1, b1, r2, g2, b2, alpha1, alpha2)

Parameters

ParameterTypeJavaScriptLua
x1floatnumbernumber
y1floatnumbernumber
z1floatnumbernumber
x2floatnumbernumber
y2floatnumbernumber
z2floatnumbernumber
r1intnumberinteger
g1intnumberinteger
b1intnumberinteger
r2intnumberinteger
g2intnumberinteger
b2intnumberinteger
alpha1intnumberinteger
alpha2intnumberinteger

Returns

Nothing. In JavaScript the call evaluates to undefined.

Notes

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

NOTE: Debugging functions are not present in the retail version of the game.

Reference

Namespace
Graphics GRAPHICS
In the game
void DRAW_DEBUG_LINE_WITH_TWO_COLOURS(float x1, float y1, float z1, float x2, float y2, float z2, int r1, int g1, int b1, int r2, int g2, int b2, int alpha1, int alpha2)
Hash
0xD8B9A8AC5608FF94

Open in the interactive natives reference