RedM Natives

DRAW_LIGHT_WITH_RANGE

Hash0xD2D9E04C0DF927F4
Runtime nameDrawLightWithRange
NamespaceGRAPHICS
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0xF2A1B2771A01DBD4

Signature

void DRAW_LIGHT_WITH_RANGE(float posX, float posY, float posZ, int colorR, int colorG, int colorB, float range, float intensity);

Parameters

NameTypeDescription
posXfloat—
posYfloat—
posZfloat—
colorRint—
colorGint—
colorBint—
rangefloat—
intensityfloat—

Returns void

Usage

Lua
DrawLightWithRange(posX, posY, posZ, colorR, colorG, colorB, range, intensity)

-- always works, by hash
Citizen.InvokeNative(0xD2D9E04C0DF927F4, posX, posY, posZ, colorR, colorG, colorB, range, intensity)
JavaScript and C#
JavaScript
DrawLightWithRange(posX, posY, posZ, colorR, colorG, colorB, range, intensity);

// by hash
Citizen.invokeNative('0xD2D9E04C0DF927F4', posX + 0.0000001, posY + 0.0000001, posZ + 0.0000001, colorR, colorG, colorB, range + 0.0000001, intensity + 0.0000001);
C#
Function.Call((Hash)0xD2D9E04C0DF927F4, posX, posY, posZ, colorR, colorG, colorB, range, intensity);
  • Float parameters: Lua integers (10, or whole numbers decoded from NUI/JSON) are sent as ints and read as garbage. Write 10.0 or value + 0.0. The generated JS wrappers add 0.0000001 to non-zero floats for the same reason.

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.