PlayerTextDrawAlignment

PlayerTextDrawAlignment

Description:
Function PlayerTextDrawAlignment set the text alignment of a player-textdraw.
Function PlayerTextDrawAlignment was added in 0.3e and will not work in earlier versions!
For alignment 2 (center) the x and y values of TextSize need to be swapped, see notes at PlayerTextDrawTextSize.


Parameters:
(playerid, PlayerText:text, alignment)
int playerid The ID of the player whose player-textdraw to set the alignment of.
int text The ID of the player-textdraw to set the alignment of.
int alignment 1 - left, 2 - centered, 3 - right.


Return Values:
This function does not return any specific values.


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


Related Functions
The following functions may be useful, as they are related to this function in one way or another.