M MY Multiplayer: Wiki
Side
Kind

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

NameTypeDescription
x, y, zfloatThe light's position in the world.
radiusfloatRange in metres, above 0 and up to 1000.default 10
colorcolorThree 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.

See also