Skip to content

setCursorAlpha

Type: Client-side

Pair: getCursorAlpha

This function is used to change alpha (transparency) of the client's cursor.

This example sets the cursor alpha to 100 using /cursoralpha command:

setCursorAlpha.lua
addCommandHandler( "cursoralpha",
function ()
-- Show the cursor if it is not showing or hide the cursor if it is
showCursor( not isCursorShowing ( ) )
-- Set the alpha to 100
setCursorAlpha(100)
end
)