PlayerTextDrawAlignment

warning

This feature (player-textdraws) was added in SA-MP 0.3e and will not work in earlier versions!

Description

Set the text alignment of a player-textdraw.

NameDescription
playeridThe ID of the player whose player-textdraw to set the alignment of.
Text:textThe ID of the player-textdraw to set the alignment of.
alignment1-left 2-centered 3-right

Returns

Note

For alignment 2 (center) the x and y values of TextSize need to be swapped, see notes at PlayerTextDrawTextSize.

Examples

new PlayerText:gMyTextdraw[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
gMyTextdraw[playerid] = CreatePlayerTextDraw(playerid, 320.0, 425.0, "This is an example textdraw");
PlayerTextDrawAlignment(playerid, gMyTextdraw[playerid], 2); // Align the textdraw in the center
return 1;
}

Notes

tip

For alignment 2 (center) the x and y values of TextSize need to be swapped, see notes at PlayerTextDrawTextSize.

Related Functions