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
| Name | Type | Description |
|---|---|---|
| element | element | The vehicle, ped, player or object. |
| name | string | Only the swaps made under this name. Without it, every swap of this resource on the element.default nil |
| source | texture|dui|bool | Only 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)