HUD

This page describes the HUD API

Fadeout

hudFadeout(player, int, int, int)

Fades the screen to a specified color with a duration.

Remarks

Has to be called twice to cause blink effect, see example.

Arguments

Type

Description

player

Player ID

int

0 for fadeout, 1 to fade in

int

Transition duration

int

Color to fade into / fade out from

Returns

0 if successful, -1 if failed

Countdown

hudCountdown(player, int)

Displays a race countdown number.

Remarks

Call it in interval to actually count numbers down.

Arguments

Type

Description

player

Player ID

int

Race countdown stage

int

Transition duration

int

Color to fade into / fade out from

Returns

0 if successful, -1 if failed

Announce

hudAnnounce(player, string, int)

Displays a splash/alert message in the centre of the screen.

Remarks

Arguments

Type

Description

player

Player ID

string

Text to display

int

Duration

Returns

0 if successful, -1 if failed

Message

hudMessage(player, string, int)

Displays a message in the left bottom corner of the screen.

Remarks

Arguments

Type

Description

player

Player ID

string

Text to display

int

Color (RGBA)

Returns

0 if successful, -1 if failed

Last updated