<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.rage.mp/w/index.php?action=history&amp;feed=atom&amp;title=EntityOverlayBatch%3Adestroy</id>
	<title>EntityOverlayBatch:destroy - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.rage.mp/w/index.php?action=history&amp;feed=atom&amp;title=EntityOverlayBatch%3Adestroy"/>
	<link rel="alternate" type="text/html" href="https://wiki.rage.mp/w/index.php?title=EntityOverlayBatch:destroy&amp;action=history"/>
	<updated>2026-06-04T13:55:13Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.rage.mp/w/index.php?title=EntityOverlayBatch:destroy&amp;diff=26302&amp;oldid=prev</id>
		<title>Shr0x: Created page with &quot; {{ClientsideJsFunction}} {{JSContainer| This method will destroy an entity overlay batch.  ===Return value=== *&#039;&#039;&#039; {{RageType|void}} &#039;&#039;&#039;  ==Syntax== &lt;syntaxhighlight lang=&quot;javascript&quot;&gt; batch.destroy(); &lt;/syntaxhighlight&gt;  ==Example== &lt;syntaxhighlight lang=&quot;javascript&quot;&gt; //Enable entity overlay batch mp.game.graphics.setEntityOverlayPassEnabled(true);  //Create new entity overlay batch let batch = mp.game.graphics.createEntityOverlayBatch(overlayParams);  //Add a vehicle...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.rage.mp/w/index.php?title=EntityOverlayBatch:destroy&amp;diff=26302&amp;oldid=prev"/>
		<updated>2024-08-04T09:28:11Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot; {{ClientsideJsFunction}} {{JSContainer| This method will destroy an entity overlay batch.  ===Return value=== *&amp;#039;&amp;#039;&amp;#039; {{RageType|void}} &amp;#039;&amp;#039;&amp;#039;  ==Syntax== &amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt; batch.destroy(); &amp;lt;/syntaxhighlight&amp;gt;  ==Example== &amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt; //Enable entity overlay batch mp.game.graphics.setEntityOverlayPassEnabled(true);  //Create new entity overlay batch let batch = mp.game.graphics.createEntityOverlayBatch(overlayParams);  //Add a vehicle...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
{{ClientsideJsFunction}}&lt;br /&gt;
{{JSContainer|&lt;br /&gt;
This method will destroy an entity overlay batch.&lt;br /&gt;
&lt;br /&gt;
===Return value===&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039; {{RageType|void}} &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
batch.destroy();&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
//Enable entity overlay batch&lt;br /&gt;
mp.game.graphics.setEntityOverlayPassEnabled(true);&lt;br /&gt;
&lt;br /&gt;
//Create new entity overlay batch&lt;br /&gt;
let batch = mp.game.graphics.createEntityOverlayBatch(overlayParams);&lt;br /&gt;
&lt;br /&gt;
//Add a vehicle to overlay batch once the player enters in them.&lt;br /&gt;
mp.events.add(&amp;#039;playerEnterVehicle&amp;#039;, (vehicle) =&amp;gt; {&lt;br /&gt;
    batch.add(vehicle);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
//Add an event to destroy the created batch, and then call it from where ever you want.&lt;br /&gt;
mp.events.add(&amp;quot;client_batch_destroy&amp;quot;, () =&amp;gt; {&lt;br /&gt;
    batch.destroy();&lt;br /&gt;
    mp.console.logInfo(`Entity overlay batch was destroyed successfully.`);&lt;br /&gt;
})&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
==See also==&lt;br /&gt;
{{EntityOverlayBatch}}&lt;br /&gt;
[[Category:Clientside API]]&lt;/div&gt;</summary>
		<author><name>Shr0x</name></author>
	</entry>
</feed>