guiSetAlpha | Multi Theft Auto: Wiki Skip to content

guiSetAlpha

Client-side
Server-side
Shared

Pair: guiGetAlpha

This page is incomplete! Help wanted!

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


This changes the alpha level (the visibleness/transparency) of a GUI element

Syntax

guiSetAlpha ( )

Code Examples

client

This creates a GUI window and allows a player to change it's alpha (the visibleness/transparency) value with a command.

--Create a gridlist
myWindow = guiCreateWindow ( 0.30, 0.10, 0.5, 0.60, "GUI window title", true )
--Add a command handler to change the alpha of the GUI window.
--Usage example: '/alpha 0.8', where 0.8 is stored as alphaAmount
function changeAlpha ( commandName, alphaAmount )
alphaAmount = tonumber(alphaAmount)
guiSetAlpha ( myWindow, alphaAmount )
end
addCommandHandler ( "alpha", changeAlpha )

See Also

GUI Functions