EngineRestreamWorld: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
m (add link to PR#1735)
mNo edit summary
Line 4: Line 4:


==Syntax==
==Syntax==
{{New feature/item|3.0161|1.6.0|22195|
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
bool engineRestreamWorld ( [bool includeLODs] )
bool engineRestreamWorld()
</syntaxhighlight>
</syntaxhighlight>
}}


===Returns===
{{Deprecated items|3.0161|1.6.0|
Returns ''true'' if the world was restreamed successfully, ''false'' otherwise.
<syntaxhighlight lang="lua">
bool engineRestreamWorld( [ bool includeLODs = false ] )
</syntaxhighlight>


===Optional Arguments===
===Optional Arguments===
*'''includeLODs:''' If is set to ''true'' this function will re-stream LOD models too.
*'''includeLODs:''' If is set to ''true'' this function will re-stream LOD models too.
|22663}}
===Returns===
Returns ''true'' if the world was restreamed successfully, ''false'' otherwise.


==Example==
==Example==
Line 28: Line 36:
{{ChangelogHeader}}
{{ChangelogHeader}}
{{ChangelogItem|1.6.0-9.21712|Added includeLODs argument}}
{{ChangelogItem|1.6.0-9.21712|Added includeLODs argument}}
{{ChangelogItem|1.6.0-9.22663|Removed includeLODs argument}}


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

Revision as of 20:51, 15 August 2024

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

Syntax

ADDED/UPDATED IN VERSION 1.6.0 r22195:
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)

Requirements

This template will be deleted.

Changelog

Version Description
1.6.0-9.21712 Added includeLODs argument
1.6.0-9.22663 Removed includeLODs argument

See Also