SetHudTextParams Function

Sets the HUD parameters for drawing text. These parameters are stored globally, although nothing other than this function and SetHudTextParamsEx modify them.

You must call this function before drawing text. If you are drawing text to multiple clients, you can set the parameters once, since they won't be modified. However, as soon as you pass control back to other plugins, you must reset the parameters next time you draw.

void SetHudTextParams(float x, float y, float holdTime, int r, int g, int b, int a, int effect, float fxTime, float fadeIn, float fadeOut)

Parameters

float x

x coordinate, from 0 to 1. -1.0 is the center.

float y

y coordinate, from 0 to 1. -1.0 is the center.

float holdTime

Number of seconds to hold the text.

int r

Red color value.

int g

Green color value.

int b

Blue color value.

int a

Alpha transparency value.

int effect

0/1 causes the text to fade in and fade out. 2 causes the text to flash[?].

float fxTime

Duration of chosen effect (may not apply to all effects).

float fadeIn

Number of seconds to spend fading in.

float fadeOut

Number of seconds to spend fading out.