# engineGetTxdTexture (Client)

> Gives a `texture` element that shows what a txd shows under a texture name, to draw it or use it as a source.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Textures
- **URL**: https://wiki.mymp.gg/en/engineGetTxdTexture

## Syntax

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

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `txd` | `txd\|string` | A `txd` element or a txd's name. |
| `name` | `string` | The texture's name in the txd. |

## Returns

The `texture` element. Asking again for the same txd and name from the same resource gives the same element. Raises an error if the txd has no texture of that name.

The element follows the txd: when a link changes what the txd shows under that name, the element shows it too.

## Example

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

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

## See also

- [engineGetTxdTextures (Client)](https://wiki.mymp.gg/en/engineGetTxdTextures.md): Lists the names of the textures a txd gives, links included.
- [engineSetTxdTexture (Client)](https://wiki.mymp.gg/en/engineSetTxdTexture.md): Puts an image in a txd under a texture name, replacing the texture of that name or adding a new one. Everything that reads the txd follows: models, peds, landscapes, roads, particles, water and sky.
- [dxDrawImage (Client)](https://wiki.mymp.gg/en/dxDrawImage.md): Draws an image on the screen for one frame.
