<?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=Entity%3A%3Adestroy</id>
	<title>Entity::destroy - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://rage.grandroleplay.ru/index.php?action=history&amp;feed=atom&amp;title=Entity%3A%3Adestroy"/>
	<link rel="alternate" type="text/html" href="https://rage.grandroleplay.ru/index.php?title=Entity::destroy&amp;action=history"/>
	<updated>2026-07-24T20:00:37Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://rage.grandroleplay.ru/index.php?title=Entity::destroy&amp;diff=902&amp;oldid=prev</id>
		<title>imported&gt;Shr0x в 13:42, 6 июля 2024</title>
		<link rel="alternate" type="text/html" href="https://rage.grandroleplay.ru/index.php?title=Entity::destroy&amp;diff=902&amp;oldid=prev"/>
		<updated>2024-07-06T13:42:08Z</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;__TOC__&lt;br /&gt;
{{SharedFunctionJS}}&lt;br /&gt;
{{JSContainer|&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;This method is used to destroy a created entity, see [[Entity::type]] for a list of entities you can use this method to.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
entity.destroy();&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
Below you will find examples of this method being used in each entity&lt;br /&gt;
{{SharedCode|&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
//Vehicle&lt;br /&gt;
const vehicle = mp.vehicles.at(0); //find vehicle with id 0.&lt;br /&gt;
if (vehicle &amp;amp;&amp;amp; mp.vehicles.exists(vehicle)) vehicle.destroy(); //destroy the vehicle if it exists and its valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//Ped (NPC)&lt;br /&gt;
const ped = mp.peds.at(0); //find ped with id 0.&lt;br /&gt;
if (ped &amp;amp;&amp;amp; mp.peds.exists(ped)) ped.destroy(); //destroy the ped if it exists and its valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//Colshape&lt;br /&gt;
const colshape = mp.colshapes.at(0); //find colshape with id 0&lt;br /&gt;
if (colshape &amp;amp;&amp;amp; mp.colshapes.exists(colshape)) colshape.destroy(); //destroy the colshape if it exists and its valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//Textlabel&lt;br /&gt;
const label = mp.labels.at(0); //find label with id 0&lt;br /&gt;
if (label &amp;amp;&amp;amp; mp.labels.exists(label)) label.destroy(); //destroy the label if it exists and its valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//Object&lt;br /&gt;
const object = mp.objects.at(0); //find object with id 0&lt;br /&gt;
if (object &amp;amp;&amp;amp; mp.objects.exists(object)) object.destroy(); //destroy the object if it exists and its valid.&lt;br /&gt;
&lt;br /&gt;
//Blip&lt;br /&gt;
const blip = mp.blips.at(0); //find blip with id 0&lt;br /&gt;
if (blip &amp;amp;&amp;amp; mp.blips.exists(blip)) blip.destroy(); //destroy the blip if it exists and its valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//Marker&lt;br /&gt;
const marker = mp.markers.at(0); //find marker with id 0&lt;br /&gt;
if (marker &amp;amp;&amp;amp; mp.markers.exists(marker)) marker.destroy(); //destroy the marker if it exists and its valid.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//Checkpoint&lt;br /&gt;
const checkpoint = mp.checkpoints.at(0); //find marker with id 0&lt;br /&gt;
if (checkpoint &amp;amp;&amp;amp; mp.checkpoints.exists(checkpoint)) checkpoint.destroy(); //destroy the marker if it exists and its valid.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Entity API]]&lt;br /&gt;
[[Category:Shared Function]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Shr0x</name></author>
	</entry>
</feed>