# engineRestoreTxdTexture (Client)

> Removes the links this resource made in a txd with `engineSetTxdTexture`, so it gives its own textures again.

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

## Syntax

```lua
bool engineRestoreTxdTexture(txd|string txd [, string name = nil, texture|dui|bool source = nil])
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `txd` | `txd\|string` | A `txd` element, a txd's name, or the same glob pattern the link was made with. |
| `name` | `string` | Only the links made under this name. Without it, every link of this resource in the txd. *(default: `nil`)* |
| `source` | `texture\|dui\|bool` | Only the links to this source (`false` for the ones that hide). *(default: `nil`)* |

## Returns

`true` if at least one link was removed, `false` if none matched.

## Example

```lua
local lights = engineCreateTexture("images/lights.png")
engineSetTxdTexture("infernus", "vehiclelights128", lights)

addCommandHandler("stocklights", function()
    engineRestoreTxdTexture("infernus", "vehiclelights128")
end)
```

## See also

- [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.
- [engineRestoreTxdTextureSampling (Client)](https://wiki.mymp.gg/en/engineRestoreTxdTextureSampling.md): Removes the sampling override this resource set on a txd's texture with engineSetTxdTextureSampling.
