M MY Multiplayer: Wiki
Side
Kind

engineRestoreModelTxd

Client

Takes away the txds this resource put in front of a model with engineSetModelTxd.

bool engineRestoreModelTxd(string|element model [, txd|string txd = nil])

Parameters

NameTypeDescription
modelstring|elementThe model's name, or a model element from engineCreateModel.
txdtxd|stringOnly this txd (an element or a name). Without it, every txd this resource added to the model.default nil

Returns

true if at least one txd was taken away, false if none matched. Raises an error if no model or no txd has that name.

Example

local txd = engineLoadTxd("models/infernus_neon.ktd")
engineSetModelTxd("infernus", txd)

addCommandHandler("stockinfernus", function()
    engineRestoreModelTxd("infernus", txd)
end)

See also