setVehicleDirtColor
Shared
Changes the colour of the dirt on a vehicle's paint, such as mud or sand.
bool setVehicleDirtColor(element element, color color)
Parameters
| Name | Type | Description |
|---|---|---|
| element | element | A vehicle, or a parent element: every vehicle below it changes too. |
| color | color | Three numbers r, g, b (integers from 0 to 255) or a tocolor value. Alpha is ignored. |
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
local vehicle = createVehicle("infernus", -2400, -600, 132)
setVehicleDirtColor(vehicle, 110, 80, 50)
setVehicleDirtLevel(vehicle, 0.8)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.