setElementAlpha
Shared
Sets the transparency of an element and of all its children.
bool setElementAlpha(element element, int alpha)
Parameters
| Name | Type | Description |
|---|---|---|
| element | element | The element. |
| alpha | int | Opacity, an integer from 0 (invisible) to 255 (opaque). |
Returns
true if it applied to the element itself, false if not. Raises an error if alpha is outside 0 to 255.
Example
addCommandHandler("ghost", function(player)
setElementAlpha(player, 120)
end)