Quote:
Originally Posted by {PHILMAGROIN}
yes i know. but if you wanted to make a cvar so you could change those ingame. you couldn't with this correct?
|
Like this?
PHP Code:
new gCvar[ 3 ];
public plugin_init( )
{
gCvar[ 0 ] = register_cvar( "color_red", "100" );
gCvar[ 1 ] = register_cvar( "color_green", "255" );
gCvar[ 2 ] = register_cvar( "color_blue", "0" );
}
func( id )
{
new iColor[ 3 ];
iColor[ 0 ] = get_pcvar_num( gCvar[ 0 ] );
iColor[ 1 ] = get_pcvar_num( gCvar[ 1 ] );
iColor[ 2 ] = get_pcvar_num( gCvar[ 2 ] );
UTIL_ScreenFade( id, iColor, 1.0....... );
}