createPointLight
Client
Creates a light that shines in every direction from a point. The light exists on this client only.
light|false createPointLight(float x, y, z [, float radius = 10, color color = tocolor(255, 255, 255)])
Parameters
| Name | Type | Description |
|---|---|---|
| x, y, z | float | The light's position in the world. |
| radius | float | Range in metres, above 0 and up to 1000.default 10 |
| color | color | Three numbers r, g, b (integers from 0 to 255) or a tocolor value. Alpha is ignored.default tocolor(255, 255, 255) |
Returns
The created light element, or false if it could not be created.
A light outside the focused dimension or area is not drawn.
Example
local light = createPointLight(2495.1, -1687.4, 14.5, 12, 255, 180, 90)
setLightCastShadow(light, true)Coming from MTAMTA has no dynamic lights. To light a single frame without creating an element, use
dxDrawPointLight.