- Documentation
- Shared functions
- setElementAlpha
Function
setElementAlpha
Sets an element's alpha (0 invisible, 255 opaque). Works on players, peds, objects and vehicles (a vehicle together with its wheels).
Syntax
bool setElementAlpha(element theElement, int alpha)Arguments
theElementelement- The element.
alphaint- Alpha 0-255.
Returns
true on success.
Example
addEventHandler("onPlayerSpawn", root, function()
setElementAlpha(source, 120)
setTimer(setElementAlpha, 5000, 1, source, 255)
end)