GraphicsClient

drawLightWithRange

DRAW_LIGHT_WITH_RANGE0xF2A1B2771A01DBD4

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

SignatureJavaScript
drawLightWithRange(
  posX: number,
  posY: number,
  posZ: number,
  colorR: number,
  colorG: number,
  colorB: number,
  range: number,
  intensity: number
): void
SignatureLua
drawLightWithRange(
  posX: number,
  posY: number,
  posZ: number,
  colorR: integer,
  colorG: integer,
  colorB: integer,
  range: number,
  intensity: number
)

Usage

JavaScript
drawLightWithRange(posX, posY, posZ, colorR, colorG, colorB, range, intensity);
Lua
drawLightWithRange(posX, posY, posZ, colorR, colorG, colorB, range, intensity)

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
drawLightWithRange(pos, colorR, colorG, colorB, range, intensity);
Lua · with vectors
drawLightWithRange(pos, colorR, colorG, colorB, range, intensity)

Parameters

ParameterTypeJavaScriptLua
posXfloatnumbernumber
posYfloatnumbernumber
posZfloatnumbernumber
colorRintnumberinteger
colorGintnumberinteger
colorBintnumberinteger
rangefloatnumbernumber
intensityfloatnumbernumber

Returns

Nothing. In JavaScript the call evaluates to undefined.

Reference

Namespace
Graphics GRAPHICS
In the game
void DRAW_LIGHT_WITH_RANGE(float posX, float posY, float posZ, int colorR, int colorG, int colorB, float range, float intensity)
Hash
0xF2A1B2771A01DBD4

Open in the interactive natives reference