M MY Multiplayer: Wiki
Side
Kind

engineCreateTxd

Client

Creates an empty texture dictionary under a name. Fill it with engineSetTxdTexture. It exists on this client only.

txd engineCreateTxd(string name)

Parameters

NameTypeDescription
namestringThe dictionary's name. Models and the functions that take a txd's name find it by this name.

Returns

The new txd element. Raises an error if the name is empty or another script's txd already has it.

The txd is ready at once, and nothing evicts it while its element lives.

Example

local txd = engineCreateTxd("custom_lights")
local lights = engineCreateTexture("images/lights.png")
engineSetTxdTexture(txd, "vehiclelights128", lights)
engineSetModelTxd("infernus", txd)
NoteIf a pack already has a txd with that name, the new one covers it while it lives. A warning is logged.

See also