engineGetTxdTexture
Cliente
Da un elemento texture que muestra lo que un txd muestra bajo un nombre de textura, para dibujarlo o usarlo como fuente.
texture engineGetTxdTexture(txd|string txd, string name)
Parámetros
| Nombre | Tipo | Descripción |
|---|---|---|
| txd | txd|string | Un elemento txd o el nombre de un txd. |
| name | string | Nombre de la textura en el txd. |
Retorno
El elemento texture. Pedir otra vez el mismo txd y nombre desde el mismo recurso devuelve el mismo elemento. Lanza un error si el txd no tiene una textura con ese nombre.
El elemento sigue al txd: cuando un enlace cambia lo que el txd muestra bajo ese nombre, el elemento también lo muestra.
Ejemplo
local radar = engineGetTxdTexture("hud", "radardisc")
addEventHandler("onClientRender", root, function()
dxDrawImage(40, 40, 64, 64, radar)
end)