Pular para o conteúdo principal

PlayerTextDrawAlignment

Descrição​

Defina o alinhamento do texto de um player-textdraw.

NomeDescrição
playeridO ID do jogador cujo player-textdraw definir o alinhamento.
PlayerText:textidO ID do player-textdraw para definir o alinhamento.
TEXT_DRAW_ALIGN:alignmentTEXT_DRAW_ALIGN_LEFT/TEXT_DRAW_ALIGN_CENTER/TEXT_DRAW_ALIGN_RIGHT

Retornos​

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

Exemplos​

/*
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.
  • Caso o textdraw já esteja sendo mostrado para o jogador, ele deve ser mostrado novamente (PlayerTextDrawShow) para mostrar as alterações desta função.

Funções Relacionadas​