engineRestoreTxdTexture
Client
Removes the links this resource made in a txd with engineSetTxdTexture, so it gives its own textures again.
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
local lights = engineCreateTexture("images/lights.png")
engineSetTxdTexture("infernus", "vehiclelights128", lights)
addCommandHandler("stocklights", function()
engineRestoreTxdTexture("infernus", "vehiclelights128")
end)