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.
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
local radar = engineGetTxdTexture("hud", "radardisc")
addEventHandler("onClientRender", root, function()
dxDrawImage(40, 40, 64, 64, radar)
end)