getElementAlpha | Multi Theft Auto: Wiki Skip to content

getElementAlpha

Client-side
Server-side
Shared

Pair: setElementAlpha

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 alpha (transparency) value for the specified element. This can be a player, ped, object, vehicle or weapon.

Syntax

getElementAlpha ( )

Code Examples

server

This example outputs whether the player is invisible.

function amIVisible()
if getElementAlpha(localPlayer) == 0 then
outputChatBox("I'm invisible")
else
outputChatBox("I'm not invisible")
end
end
addCommandHandler ( "amivisible", amIVisible )

See Also

Element Functions