<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>https://rage.grandroleplay.ru/index.php?action=history&amp;feed=atom&amp;title=Streaming%3A%3AsetModelAsNoLongerNeeded</id>
	<title>Streaming::setModelAsNoLongerNeeded - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://rage.grandroleplay.ru/index.php?action=history&amp;feed=atom&amp;title=Streaming%3A%3AsetModelAsNoLongerNeeded"/>
	<link rel="alternate" type="text/html" href="https://rage.grandroleplay.ru/index.php?title=Streaming::setModelAsNoLongerNeeded&amp;action=history"/>
	<updated>2026-07-24T22:26:34Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://rage.grandroleplay.ru/index.php?title=Streaming::setModelAsNoLongerNeeded&amp;diff=14307&amp;oldid=prev</id>
		<title>imported&gt;Shr0x в 12:17, 2 ноября 2024</title>
		<link rel="alternate" type="text/html" href="https://rage.grandroleplay.ru/index.php?title=Streaming::setModelAsNoLongerNeeded&amp;diff=14307&amp;oldid=prev"/>
		<updated>2024-11-02T12:17:21Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{ClientsideJsFunction}}&lt;br /&gt;
{{JSContainer|&lt;br /&gt;
&lt;br /&gt;
==Function==&lt;br /&gt;
This function releases a specified model from memory. It’s helpful for optimizing memory usage, especially after spawning an entity using a model. After calling this, the game will no longer store the model in memory, freeing up resources.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;mp.game.streaming.setModelAsNoLongerNeeded(model);&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Required Arguments ===&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;model:&amp;#039;&amp;#039;&amp;#039; Model hash or name&lt;br /&gt;
&lt;br /&gt;
===Return value===&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Undefined&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// Load a model and create a ped, then release the model from memory&lt;br /&gt;
let model = mp.game.joaat(&amp;quot;a_m_y_skater_01&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
if (!mp.game.streaming.hasModelLoaded(model)) {&lt;br /&gt;
    mp.game.streaming.requestModel(model);&lt;br /&gt;
    while (!mp.game.streaming.hasModelLoaded(model)) mp.game.wait(0); // Wait until model is loaded&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Create a ped using the model&lt;br /&gt;
let playerPed = mp.peds.new(model, new mp.Vector3(0, 0, 0), 0);&lt;br /&gt;
&lt;br /&gt;
// Release the model from memory after creating the ped&lt;br /&gt;
mp.game.streaming.setModelAsNoLongerNeeded(model);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Streaming_functions_c}}&lt;br /&gt;
[[Category:Clientside API]]&lt;br /&gt;
[[Category:TODO: Example]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Shr0x</name></author>
	</entry>
</feed>