getElementLighting | Multi Theft Auto: Wiki Skip to content

getElementLighting

Client-side
Server-side
Shared

Pair: setElementLighting

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function returns the lighting value for the specified element. This can be a player, ped, vehicle, object, weapon.

Syntax

getElementLighting ( )

Code Examples

client

This example displays lighting values of streamed in players.

addEventHandler("onClientRender", root, function()
for _, pl in ipairs(getElementsByType("player", root, true)) do
local sX, sY = getScreenFromWorldPosition(getElementPosition(pl))
if sX then
dxDrawText("Lighting: "..tostring(getElementLighting(pl)), sX, sY)
end
end
end)

See Also

Element Functions