ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. setLightDirection

Function

setLightDirection

ServerLightsIdentical to MTA:SA

Changes the spot light direction (a vector, e.g. 0, 0, -1 = down).

Syntax

bool setLightDirection(element theLight, float x, float y, float z)

Arguments

theLightelement
The light.
xfloat
X component.
yfloat
Y component.
zfloat
Z component.

Returns

true on success.

Example

local lamp = createLight(1, 0, 0, 5)
setLightDirection(lamp, 0, 0, -1)

See also