SetOcclusionsEnabled: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{Server client function}} This function is used to enable or disable occlusions. Occlusions are used by GTA to enhance performance, however when removeWorldModel i...")
 
No edit summary
Line 24: Line 24:
setOcclusionsEnabled( false )
setOcclusionsEnabled( false )
</syntaxhighlight>
</syntaxhighlight>
==Requirements==
{{Requirements|1.3|1.3|}}


==See Also==
==See Also==

Revision as of 22:23, 20 January 2012

This function is used to enable or disable occlusions. Occlusions are used by GTA to enhance performance, however when removeWorldModel is used they may also have the undesired effect of making parts of the map disappear. Disabling occlusions will fix that.

Syntax

bool setOcclusionsEnabled ( bool enabled )

Required Arguments

  • enabled: A bool specifying if GTA occlusions should be enabled

Returns

Returns true if the setting was set correctly, false if invalid arguments were passed.

Example

This example shows occlusions being disabled after the whole map has been cleared:

-- Remove all world models
for i=700,20000 do
    removeWorldModel(i,10000,0,0,0)
end
-- Turn off occlusions
setOcclusionsEnabled( false )

Requirements

This template will be deleted.

See Also