M MY Multiplayer: Wiki
Side
Kind

engineRestoreModelTexture

Client

Removes the texture swaps this resource set on a model with engineSetModelTexture.

bool engineRestoreModelTexture(string|element model [, string name = nil, texture|dui|bool source = nil])

Parameters

NameTypeDescription
modelstring|elementThe model's name, or a model element from engineCreateModel.
namestringOnly the swaps made under this name. Without it, every swap of this resource on the model.default nil
sourcetexture|dui|boolOnly the swaps to this source (false for the ones that hide).default nil

Returns

true if at least one swap was removed, false if none matched. Raises an error if no model has that name.

Example

engineSetModelTexture("infernus", "vehiclelights128", false)

addCommandHandler("lightson", function()
    engineRestoreModelTexture("infernus", "vehiclelights128")
end)

See also