resetVehicleDirtColor
Shared
Puts a vehicle's dirt back to the default colour, 59, 57, 52.
bool resetVehicleDirtColor(element element)
Parameters
| Name | Type | Description |
|---|---|---|
| element | element | A vehicle, or a parent element: every vehicle below it changes too. |
Returns
true if it changed, false if it is not a vehicle.
On the server, the change is sent to every client. On the client, it applies to this client only.
Example
addCommandHandler("sujeirapadrao", function(player)
local vehicle = getPedOccupiedVehicle(player)
if vehicle then
resetVehicleDirtColor(vehicle)
end
end)NoteWith a parent element (such as
root), every vehicle below changes, but the return value is the element's own, which is not a vehicle: false.