M MY Multiplayer: Wiki
Side
Kind

engineRestoreElementTexture

Client

Removes the texture swaps this resource set on one element with engineSetElementTexture.

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

Parameters

NameTypeDescription
elementelementThe vehicle, ped, player or object.
namestringOnly the swaps made under this name. Without it, every swap of this resource on the element.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 the element is not a vehicle, ped, player or object.

Example

local vehicle = createVehicle("infernus", 1544.0, -1675.0, 13.6)
engineSetElementTexture(vehicle, "vehiclelights128", false)

setTimer(function()
    engineRestoreElementTexture(vehicle)
end, 5000, 1)

See also