RU/setCloudsEnabled

From Multi Theft Auto: Wiki
Revision as of 18:51, 7 March 2010 by PoliticalOrel (talk | contribs) (Created page with '__NOTOC__ {{Server client function}} This function will enable or disable clouds. This is useful for race maps which are placed high up as clouds can cause low FPS. ==Испол…')
(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.

Использование

bool setCloudsEnabled ( bool enabled )

Необходимые параметры

  • enabled: A boolean value determining if clouds should be shown. Use true to show clouds and false to hide them.

Что возвращается

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

Пример

Click to collapse [-]
Сервер

This 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 )

Смотри также