Player:ScreenFade

From Garry's Mod
Jump to: navigation, search
 Player:ScreenFade( )

Contents

Description

Fades the screen

Arguments

number flags

Fade flags defined with SCREENFADE_ Enums.

Arguments

number clr=color_white

The color of the screenfade

Arguments

number fadeTime

Fade(in/out) effect transition time ( From no fade to full fade and vice versa )

Arguments

number fadeHold

Fade effect hold time

Examples

Example

Flashes the screen red to nothing over 0.3 seconds when a player gets hurt.

hook.Add( "PlayerHurt", "hurt_effect_fade", function( ply )
	ply:ScreenFade( SCREENFADE.IN, Color( 255, 0, 0, 128 ), 0.3, 0 )
end )


Personal tools
Navigation