maptext(id, player, text, x, y, mode, [align])
Creates a text element.
id is the ID of the text (1-50);
player is the ID(s) of the player(s) that the text will be visible to, can be either 0-32 (with 0 being visible to everyone) or a table containing player IDs;
x and
y are the position of the text (in pixels), or, in case of player following text, the offsets;
Note: text elements don't follow bots when they are moving, only when other players are. This seems to be due to a limitation in CS2D.
mode can be 0 to display the text on the map, 1 to display it on the HUD or 101-132 (100+id) to display it over a player, following that player;
align is an optional argument that corresponds to the alignment argument of the original
hudtxt and
hudtxt2 console commands (0 being left-aligned, 1 being centre-aligned and 2 or -1 being right-aligned).
textalpha(id, alpha, [duration])
Changes the alpha value of a text element.
id is the ID of the text (1-50);
alpha is the alpha value for the text (0-1);
Note: alpha doesn't work when a text element is moving, only when it is stationary.
duration is an optional argument that corresponds to the duration argument of the original
hudtxtalphafade console command (time in milliseconds).
textcolor(id, r, g, b)
Changes the colour of a text element.
id is the ID of the text (1-50);
r,
g and
b are the RGB values for the colour.
textcolor(id, colour)
Changes the colour of a text element.
id is the ID of the text (1-50);
colour is the colour in the CS2D colour format ("255000000" for red, etc.)