Garry's Mod Wiki

Player:ScreenFade

Player:ScreenFade( number flags, number clr = color_white, number fadeTime, number fadeHold )

Description

Fades the screen

Arguments

1 number flags
Fade flags defined with Enums/SCREENFADE.
2 number clr = color_white
The color of the screenfade
3 number fadeTime
Fade(in/out) effect transition time ( From no fade to full fade and vice versa )
4 number fadeHold
Fade effect hold time

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 )

Page Links


Special Pages


Wikis

?

Render Time: 37ms

Session 0
DB GetPage 3
Generate Html 12
SaveChanges 8
Render Body 0
Render Sidebar 11