RestoreGameWorld and RemoveGameWorld: Difference between pages

From Multi Theft Auto: Wiki
(Difference between pages)
Jump to navigation Jump to search
No edit summary
 
No edit summary
 
Line 2: Line 2:
__NOTOC__  
__NOTOC__  
{{Added feature/item|1.6.1|1.6.0|22909|  
{{Added feature/item|1.6.1|1.6.0|22909|  
This function restores the entire game world.
This function removes the entire game world and also clears the dummies pool.
}}
}}


==Syntax==
==Syntax==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
nil restoreGameWorld()
nil removeGameWorld()
</syntaxhighlight>
</syntaxhighlight>


Line 14: Line 14:


==Example==
==Example==
This example restores game world.
This example removes game world.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
addEventHandler("onClientResourceStop", resourceRoot, function()
addEventHandler("onClientResourceStart", resourceRoot, function()
restoreGameWorld()
removeGameWorld()
end)
end)
</syntaxhighlight>
</syntaxhighlight>

Latest revision as of 17:18, 18 January 2025

BETA: NEW FEATURE (BUILD: 1.6.0 r22909)

This function removes the entire game world and also clears the dummies pool.

Syntax

nil removeGameWorld()

Returns

This function does not return any value.

Example

This example removes game world.

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

See Also