EngineRestreamWorld: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
(Remove obsolete Requirements section)
 
(9 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Client function}}
{{Client function}}
__NOTOC__
__NOTOC__
{{Added feature/item|1.5.9|1.5.8|20704|This function re-streams everything in the GTA world.}}
{{Added feature/item|1.5.9|1.5.8|20704|This function re-streams everything in the GTA world. Read [https://github.com/multitheftauto/mtasa-blue/pull/1735 this pull request] to understand what it is for.}}


==Syntax==
==Syntax==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool engineRestreamWorld ( )
bool engineRestreamWorld ()
</syntaxhighlight>
</syntaxhighlight>


{{Deprecated items|3.0161|1.6.0|
<syntaxhighlight lang="lua">
bool engineRestreamWorld ( [ bool includeLODs = false ] )
</syntaxhighlight>
===Optional Arguments===
*'''includeLODs:''' If is set to ''true'' this function will re-stream LOD models too.
|22663}}
===Returns===
===Returns===
Returns ''true'' if the world was restreamed successfully, ''false'' otherwise.
Returns ''true'' if the world was restreamed successfully, ''false'' otherwise.
Line 15: Line 23:
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
addEventHandler ("onClientResourceStart", resourceRoot, function ()
addEventHandler ("onClientResourceStart", resourceRoot, function ()
engineRestreamWorld ()
    engineRestreamWorld ()
end)
end)
</syntaxhighlight>
</syntaxhighlight>


==Requirements==
==Changelog==
{{Requirements|n/a|1.5.8-9.20704|}}
{{ChangelogHeader}}
{{ChangelogItem|1.6.0-9.21712|Added includeLODs argument}}
{{ChangelogItem|1.6.0-9.22663|Removed includeLODs argument. Now it's always true}}


==See Also==
==See Also==
{{Engine functions}}
{{Engine functions}}

Latest revision as of 17:22, 7 November 2024

This function re-streams everything in the GTA world. Read this pull request to understand what it is for.

Syntax

bool engineRestreamWorld ()
BEFORE VERSION 1.6.0 r22663:
bool engineRestreamWorld ( [ bool includeLODs = false ] )

Optional Arguments

  • includeLODs: If is set to true this function will re-stream LOD models too.

Returns

Returns true if the world was restreamed successfully, false otherwise.

Example

This function can be used after a model (or more) is loaded with engineLoadDFF:

addEventHandler ("onClientResourceStart", resourceRoot, function ()
    engineRestreamWorld ()
end)

Changelog

Version Description
1.6.0-9.21712 Added includeLODs argument
1.6.0-9.22663 Removed includeLODs argument. Now it's always true

See Also