SetCloudsEnabled: Difference between revisions
Jump to navigation
Jump to search
Cazomino05 (talk | contribs) m (Woops) |
Cazomino05 (talk | contribs) m (-.-) |
||
Line 22: | Line 22: | ||
setCloudsEnabled( false ) -- Hide the clouds for all players when the resource starts | setCloudsEnabled( false ) -- Hide the clouds for all players when the resource starts | ||
end | end | ||
addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), disableClouds ) | addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), disableClouds ) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | </section> |
Revision as of 16:33, 7 June 2009
This function will enable or disable clouds, This is useful for race maps that spawn high up as clouds can cause low FPS.
Syntax
bool setCloudsEnabled( bool Enabled )
Required Arguments
- Enabled: a bool determining if clouds should be shown (true) to show clouds (false) to hide them
Returns
Returns true if the clouds where shown or hidden succesfully, false if an invalid argument was specified.
Example
Click to collapse [-]
ServerThis example Disables clouds for all players
function disableClouds () setCloudsEnabled( false ) -- Hide the clouds for all players when the resource starts end addEventHandler ( "onResourceStart", getResourceRootElement(getThisResource()), disableClouds )