ResetRainLevel

From Multi Theft Auto: Wiki
Revision as of 12:07, 29 March 2013 by X86dev (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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 you enter a vehicle and stop it when you leave the vehicle.

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

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

See Also