DrawLightWithRange (0xD2D9E04C0DF927F4) is per-frame — re-issue every tick or the light vanishes
Context
DrawLightWithRange is not a persistent light — it draws for the current frame only. Calling it once does nothing visible.
The pattern
CreateThread(function()
while true do
for _, l in pairs(activeLights) do
DrawLightWithRange(l.x, l.y, l.z, r, g, b, l.range, l.intensity)
end
Wait(next(activeLights) and 0 or 100) -- tight loop while lights exist
end
end)
Notes
- RGB are
0–255integers; intensity is a0.0–1.0float; range is in metres. - Stop calling it and the light disappears immediately.
Verified
light/client.lua:107-124 (per-frame draw loop, idles Wait(100) when no lights, Wait(0) otherwise).
Tags: graphics, drawlightwithrange, light, per-frame, draw, loop
Category: natives
Source: jo_libs-fleet
Created: 2026-05-31T09:42:08.170Z