M MY Multiplayer: Wiki
Side
Kind

resetVehicleWetnessLevel

Shared

Makes a vehicle get wet with the rain again, undoing setVehicleWetnessLevel.

bool resetVehicleWetnessLevel(element element)

Parameters

NameTypeDescription
elementelementA 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

for _, vehicle in ipairs(getElementsByType("vehicle")) do
    resetVehicleWetnessLevel(vehicle)
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.

See also