SetCloudsEnabled

From Multi Theft Auto: Wiki
Revision as of 23:16, 11 January 2023 by Srslyyyy (talk | contribs) (Replace to predefined variables.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

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

Example

Click to collapse [-]
Server

This example disables clouds for all players when resource starts.

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

See Also