ResetRainLevel

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This function resets the rain level of the current weather to its default.

Syntax

bool resetRainLevel ( )

Returns

Returns true if the rain level was reset.

Example

Click to collapse [-]
Client

This example will make it rain when player or ped enters a vehicle, and stop once it leaves.

function startRaining()
         setRainLevel(5)
end
addEventHandler("onClientVehicleEnter", root, startRaining)

function stopRaining()
         resetRainLevel()
end
addEventHandler("onClientVehicleExit", root, stopRaining)

See Also