Scripting/Squirrel/Functions/Player.SetAlpha
This wiki is using an old backup from 2020
Some information may be old/missing
Syntax
Player.SetAlpha( int alpha, int fadeTime )
Arguments
> Player - The player instance.
- integer alpha - The alpha you want to set, 0 to 255.
- integer fadeTime - The fadeTime miliseconds, in how much time the alpha fully affect.
Example
function onPlayerCommand( player, cmd, text )
{
if ( cmd == "invisible" )
{
player.SetAlpha( 0, 2500); // in 2.5 secs it will be totally invisible
}
else if ( cmd == "visible" )
{
player.SetAlpha( 255, 2500); // in 2.5 secs it will be totally visible
}
}