MTA:Eir/functions/engineSetWorldStreamingEnabled: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(Renamed template) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{MTA:Eir/Client_function}} | |||
__NOTOC__ | __NOTOC__ | ||
This function enables or disables the rendering and streaming of world instances. World instances are IPL sectors, COL sectors, buildings, objects and dummies. This function does not affect world instances created by MTA. | This function enables or disables the rendering and streaming of world instances. World instances are IPL sectors, COL sectors, buildings, objects and dummies. This function does not affect world instances created by MTA. | ||
Line 15: | Line 16: | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
addEvent( "onClientGameEnterTCMode", true ); | addEvent( "onClientGameEnterTCMode", true ); | ||
addEventHandler( "onClientGameEnterTCMode", root, | |||
function() | function() | ||
engineSetWorldStreamingEnabled( false ); | engineSetWorldStreamingEnabled( false ); |
Latest revision as of 08:07, 28 September 2023
This function enables or disables the rendering and streaming of world instances. World instances are IPL sectors, COL sectors, buildings, objects and dummies. This function does not affect world instances created by MTA.
Syntax
bool engineSetWorldStreamingEnabled ( bool enabled )
Returns
Returns true if enabled is passed as valid bool, false otherwise.
Example
Click to collapse [-]
ClientThis snippet clears the entire GTA:SA world of native entities and increases engine performance.
addEvent( "onClientGameEnterTCMode", true ); addEventHandler( "onClientGameEnterTCMode", root, function() engineSetWorldStreamingEnabled( false ); end );