# GRAPHICS::DRAW_LIGHT_WITH_RANGE

- **Hash:** `0xD2D9E04C0DF927F4`
- **Namespace:** GRAPHICS
- **Runtime name (Lua/JS):** `DrawLightWithRange`
- **Side:** client (game native)
- **Name status:** official
- **Documentation:** named only
- **Since game build:** 1207
- **URL:** https://natives.borderlinerp.com/natives/GRAPHICS/DRAW_LIGHT_WITH_RANGE

## Signature

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

## Parameters

- `posX` (`float`)
- `posY` (`float`)
- `posZ` (`float`)
- `colorR` (`int`)
- `colorG` (`int`)
- `colorB` (`int`)
- `range` (`float`)
- `intensity` (`float`)

## Returns

`void`

## Usage

### Lua

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

-- always available, by hash
Citizen.InvokeNative(0xD2D9E04C0DF927F4, posX, posY, posZ, colorR, colorG, colorB, range, intensity)
```

### JavaScript

```js
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#

```csharp
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.*
