---
title: "TextDrawSetStringForPlayer | open.mp"
description: "Altera o texto em um textdraw para um jogador específico."
canonical: https://omp.itsneufox.com/pt-BR/docs/scripting/functions/TextDrawSetStringForPlayer
language: pt-BR
---

# TextDrawSetStringForPlayer

aviso

Esta função foi adicionada no omp v1.1.0.2612 e não funcionará em versões anteriores!

## Descrição

Altera o texto em um textdraw para um jogador específico.

| Nome | Descrição |
| --- | --- |
| Text:textid | O ID do TextDraw para alterar |
| playerid | O ID do jogador |
| const format\[\] | A nova string para TextDraw |
| OPEN\_MP\_TAGS:... | Número indefinido de argumentos de qualquer tag |

## Retornos

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

## Exemplos

```c
new Text:gMyTextdraw;

public OnGameModeInit()
{
    gMyTextdraw = TextDrawCreate(317.799987, 331.475006, "Hi, how are you?");
    TextDrawLetterSize(gMyTextdraw, 0.238997, 1.250000);
    TextDrawTextSize(gMyTextdraw, 505.000000, 202.000000);
    TextDrawAlignment(gMyTextdraw, TEXT_DRAW_ALIGN_CENTER);
    TextDrawColor(gMyTextdraw, 0xFFFFFFFF);
    TextDrawSetShadow(gMyTextdraw, 0);
    TextDrawSetOutline(gMyTextdraw, 1);
    TextDrawBackgroundColor(gMyTextdraw, 255);
    TextDrawFont(gMyTextdraw, TEXT_DRAW_FONT_1);
    TextDrawSetProportional(gMyTextdraw, true);
    return 1;
}

public OnPlayerConnect(playerid)
{
    new playerName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playerName, sizeof playerName);

    TextDrawShowForPlayer(playerid, gMyTextdraw);

    TextDrawSetStringForPlayer(gMyTextdraw, playerid, "Welcome %s!", playerName);
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    TextDrawSetStringForPlayer(gMyTextdraw, playerid, "You chose class %d", classid);
    return 1;
}
```

## Notas

aviso

Existem limites para o comprimento das strings textdraw - veja [aqui](https://omp.itsneufox.com/pt-BR/docs/scripting/resources/limits) para mais informações.

## Funções Relacionadas

-   [TextDrawCreate](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/TextDrawCreate): Crie um desenho de texto.
-   [TextDrawDestroy](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/TextDrawDestroy): Destrua um textdraw.
-   [TextDrawSetString](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/TextDrawSetString): Altera o texto em um textdraw.
-   [TextDrawColor](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/TextDrawColor): Defina a cor do texto em um textdraw.
-   [TextDrawBoxColor](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/TextDrawBoxColor): Defina a cor da caixa em um textdraw.
-   [TextDrawBackgroundColor](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/TextDrawBackgroundColor): Defina a cor de fundo de um textdraw.
-   [TextDrawAlignment](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/TextDrawAlignment): Define o alinhamento de um textdraw.
-   [TextDrawFont](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/TextDrawFont): Define a fonte de um textdraw.
-   [TextDrawLetterSize](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/TextDrawLetterSize): Defina o tamanho da letra do texto em um textdraw.
-   [TextDrawTextSize](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/TextDrawTextSize): Defina o tamanho de uma caixa de desenho de texto.
-   [TextDrawSetOutline](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/TextDrawSetOutline): Escolha se o texto possui contorno.
-   [TextDrawSetShadow](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/TextDrawSetShadow): Alterna sombras em um textdraw.
-   [TextDrawSetProportional](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/TextDrawSetProportional): Dimensione o espaçamento do texto em um textdraw para uma proporção proporcional.
-   [TextDrawUseBox](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/TextDrawUseBox): Alterna se o textdraw possui caixa ou não.
-   [TextDrawShowForPlayer](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/TextDrawShowForPlayer): Mostra um textdraw para um determinado jogador.
-   [TextDrawHideForPlayer](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/TextDrawHideForPlayer): Oculta um textdraw para um determinado jogador.
-   [TextDrawShowForAll](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/TextDrawShowForAll): Mostra um textdraw para todos os jogadores.
-   [TextDrawHideForAll](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/TextDrawHideForAll): Oculta um textdraw para todos os jogadores.
-   [TextDrawGetString](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/TextDrawGetString): Obtém o texto de um textdraw.
