setCloudsEnabled | Multi Theft Auto: Wiki Skip to content

setCloudsEnabled

Client-side
Server-side
Shared

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function will enable or disable clouds. This is useful for race maps which are placed high up as clouds can cause low FPS.

Syntax

bool setCloudsEnabled ( bool enabled )
Required Arguments
  • enabled: A boolean value determining if clouds should be shown. Use true to show clouds and false to hide them.

Returns

  • bool: value

Returns true if the cloud state was changed succesfully, false if an invalid argument was specified.

Code Examples

shared

This example disables clouds for all players when resource starts.

function onResourceStart()
setCloudsEnabled(false)
end
addEventHandler("onResourceStart", resourceRoot, onResourceStart)

See Also

World Functions