---
title: "Attach3DTextLabelToVehicle | open.mp"
description: "Anexa uma Text Label 3D a um veículo específico."
canonical: https://omp.itsneufox.com/pt-BR/docs/scripting/functions/Attach3DTextLabelToVehicle
language: pt-BR
---

# Attach3DTextLabelToVehicle

## Descrição

Anexa uma Text Label 3D a um veículo específico.

| Nome | Descrição |
| --- | --- |
| Text3D:textid | O ID da 3D text label a ser anexada. |
| vehicleid | O ID do veículo ao qual deseja anexar a 3D text label. |
| OffsetX | O deslocamento (offset) da coordenada X do veículo (O veículo é 0.0,0.0,0.0) |
| OffsetY | O deslocamento (offset) da coordenada Y do veículo (O veículo é 0.0,0.0,0.0) |
| OffsetZ | O deslocamento (offset) da coordenada Z do veículo (O veículo é 0.0,0.0,0.0) |

## Retorno

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

## Exemplos

```c
new
    Text3D:gVehicle3dText[MAX_VEHICLES], // Criando a TextLabel para usar depois
    gVehicleId;

public OnGameModeInit()
{
    gVehicleId = CreateVehicle(510, 0.0, 0.0, 15.0, 5, 0, 120); // Criando o veículo.
    gVehicle3dText[gVehicleId] = Create3DTextLabel("Exemplo Texto", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1);
    Attach3DTextLabelToVehicle(gVehicle3dText[gVehicleId], gVehicleId, 0.0, 0.0, 2.0); // Anexando a TextLabel ao veículo.
}

public OnGameModeExit()
{
    Delete3DTextLabel(gVehicle3dText[gVehicleId]);
    return true;
}
```

## Funções Relacionadas

-   [Create3DTextLabel](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/Create3DTextLabel): Cria uma text label 3D.
-   [Delete3DTextLabel](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/Delete3DTextLabel): Apaga uma text label 3D.
-   [Attach3DTextLabelToPlayer](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/Attach3DTextLabelToPlayer): Anexa uma text label 3D a um jogador.
-   [Update3DTextLabelText](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/Update3DTextLabelText): Muda o texto de uma 3D text label 3D.
-   [CreatePlayer3DTextLabel](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/CreatePlayer3DTextLabel): Cria uma text label 3D para um jogador.
-   [DeletePlayer3DTextLabel](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/DeletePlayer3DTextLabel): Apaga uma text label 3D de um jogador.
-   [UpdatePlayer3DTextLabelText](https://omp.itsneufox.com/pt-BR/docs/scripting/functions/UpdatePlayer3DTextLabelText): Muda o texto de uma text label 3D de um jogador.
