# engineGetTxdTexture (Cliente)

> Dá um elemento `texture` que mostra o que um txd mostra sob um nome de textura, para desenhá-lo ou usá-lo como fonte.

- **Plataforma**: MY Multiplayer (MYMP)
- **Tipo**: Função Lua
- **Lado**: Cliente
- **Categoria**: Texturas
- **URL**: https://wiki.mymp.gg/pt/engineGetTxdTexture

## Sintaxe

```lua
texture engineGetTxdTexture(txd|string txd, string name)
```

## Parâmetros

| Nome | Tipo | Descrição |
| --- | --- | --- |
| `txd` | `txd\|string` | Um elemento `txd` ou o nome de um txd. |
| `name` | `string` | Nome da textura no txd. |

## Retorno

O elemento `texture`. Pedir de novo o mesmo txd e nome no mesmo recurso devolve o mesmo elemento. Lança um erro se o txd não tiver textura com esse nome.

O elemento acompanha o txd: quando um link muda o que o txd mostra sob esse nome, o elemento passa a mostrar isso também.

## Exemplo

```lua
local radar = engineGetTxdTexture("hud", "radardisc")

addEventHandler("onClientRender", root, function()
    dxDrawImage(40, 40, 64, 64, radar)
end)
```

## Veja também

- [engineGetTxdTextures (Cliente)](https://wiki.mymp.gg/pt/engineGetTxdTextures.md): Lista os nomes das texturas que um txd dá, incluindo os links.
- [engineSetTxdTexture (Cliente)](https://wiki.mymp.gg/pt/engineSetTxdTexture.md): Coloca uma imagem num txd sob um nome de textura, substituindo a textura com esse nome ou acrescentando uma nova. Tudo que lê o txd acompanha: modelos, peds, landscapes, ruas, partículas, água e céu.
- [dxDrawImage (Cliente)](https://wiki.mymp.gg/pt/dxDrawImage.md): Desenha uma imagem na tela durante um quadro.
