---
title: "PlayerTextDrawAlignment | open.mp"
description: "Defina o alinhamento do texto de um player-textdraw."
canonical: https://omp.itsneufox.com/pt-BR/docs/scripting/functions/PlayerTextDrawAlignment
language: pt-BR
---

# PlayerTextDrawAlignment

## Descrição

Defina o alinhamento do texto de um player-textdraw.

| Nome | Descrição |
| --- | --- |
| playerid | O ID do jogador cujo player-textdraw definir o alinhamento. |
| PlayerText:textid | O ID do player-textdraw para definir o alinhamento. |
| TEXT\_DRAW\_ALIGN:alignment | `TEXT_DRAW_ALIGN_LEFT`/`TEXT_DRAW_ALIGN_CENTER`/`TEXT_DRAW_ALIGN_RIGHT` |

## Retornos

Esta função não retorna nenhum valor específico.

## Exemplos

```c
/*
    TEXT_DRAW_ALIGN_LEFT
    TEXT_DRAW_ALIGN_CENTER
    TEXT_DRAW_ALIGN_RIGHT
*/

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], TEXT_DRAW_ALIGN_CENTER); // Alinhe o textdraw no centro
    return 1;
}
```

## Notas

nota

-   Para o alinhamento 2 (TEXT\_DRAW\_ALIGN\_CENTER), os valores xey de TextSize precisam ser trocados, consulte as notas em [PlayerTextDrawTextSize](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/PlayerTextDrawTextSize).
-   Caso o textdraw já esteja sendo mostrado para o jogador, ele deve ser mostrado novamente ([PlayerTextDrawShow](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/PlayerTextDrawShow)) para mostrar as alterações desta função.

## Funções Relacionadas

-   [CreatePlayerTextDraw](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/CreatePlayerTextDraw): Crie um player-textdraw.
-   [PlayerTextDrawDestroy](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/PlayerTextDrawDestroy): Destrua um jogador-textdraw.
-   [PlayerTextDrawGetAlignment](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/PlayerTextDrawGetAlignment): Obtém o alinhamento do texto de um player-textdraw.
-   [PlayerTextDrawColor](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/PlayerTextDrawColor): Defina a cor do texto em um player-textdraw.
-   [PlayerTextDrawBoxColor](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/PlayerTextDrawBoxColor): Define a cor da caixa do player-textdraw.
-   [PlayerTextDrawBackgroundColor](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/PlayerTextDrawBackgroundColor): Defina a cor de fundo de um player-textdraw.
-   [PlayerTextDrawFont](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/PlayerTextDrawFont): Defina a fonte de um player-textdraw.
-   [PlayerTextDrawLetterSize](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/PlayerTextDrawLetterSize): Defina o tamanho da letra do texto em um player-textdraw.
-   [PlayerTextDrawTextSize](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/PlayerTextDrawTextSize): Defina o tamanho de uma caixa de desenho de texto do jogador (ou área clicável para PlayerTextDrawSetSelectable).
-   [PlayerTextDrawSetOutline](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/PlayerTextDrawSetOutline): Alterna o contorno em um player-textdraw.
-   [PlayerTextDrawSetShadow](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/PlayerTextDrawSetShadow): Defina a sombra em um player-textdraw.
-   [PlayerTextDrawSetProportional](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/PlayerTextDrawSetProportional): Dimensione o espaçamento do texto em um player-textdraw para uma proporção proporcional.
-   [PlayerTextDrawUseBox](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/PlayerTextDrawUseBox): Ative a caixa em um player-textdraw.
-   [PlayerTextDrawSetString](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/PlayerTextDrawSetString): Define o texto de um player-textdraw.
-   [PlayerTextDrawShow](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/PlayerTextDrawShow): Mostra um desenho de texto do jogador.
-   [PlayerTextDrawHide](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/PlayerTextDrawHide): Ocultar um player-textdraw.
