<?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=Events%3A%3Aremove</id>
	<title>Events::remove - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://rage.grandroleplay.ru/index.php?action=history&amp;feed=atom&amp;title=Events%3A%3Aremove"/>
	<link rel="alternate" type="text/html" href="https://rage.grandroleplay.ru/index.php?title=Events::remove&amp;action=history"/>
	<updated>2026-07-24T19:45:10Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://rage.grandroleplay.ru/index.php?title=Events::remove&amp;diff=1095&amp;oldid=prev</id>
		<title>imported&gt;Shr0x в 08:58, 23 апреля 2024</title>
		<link rel="alternate" type="text/html" href="https://rage.grandroleplay.ru/index.php?title=Events::remove&amp;diff=1095&amp;oldid=prev"/>
		<updated>2024-04-23T08:58:00Z</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;{{ServersideJsFunction}}&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
Removes the specified event from events tree.&lt;br /&gt;
{{JSContainer|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
mp.events.remove(&amp;quot;eventName&amp;quot;); // Removes all eventName instances&lt;br /&gt;
mp.events.remove(&amp;quot;eventName&amp;quot;, functionInstance); // Removes specified event instance.&lt;br /&gt;
mp.events.remove([&amp;quot;eventName1&amp;quot;, &amp;quot;eventName2&amp;quot;]); // Removes all specified events instances.&lt;br /&gt;
&lt;br /&gt;
//alternatively you can use &amp;#039;.destroy&amp;#039; if event was created as a class (example below)&lt;br /&gt;
event.destroy()&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight &amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
{{SharedCode|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function onPlayerDeath(player, reason, killer){&lt;br /&gt;
  console.log(player.name + &amp;quot; died.&amp;quot;);&lt;br /&gt;
  mp.events.remove(&amp;quot;playerDeath&amp;quot;, onPlayerDeath); // Once someone died, remove the event.&lt;br /&gt;
}&lt;br /&gt;
mp.events.add(&amp;quot;playerDeath&amp;quot;, onPlayerDeath);&lt;br /&gt;
&lt;br /&gt;
//Using class&lt;br /&gt;
const myEvent = new mp.Event(&amp;quot;playerDeath&amp;quot;, (player, reason, killer) =&amp;gt; {&lt;br /&gt;
  console.log(`${player.name} ${killer ? `was killed by ${killer.name}` : `died`}`);&lt;br /&gt;
});&lt;br /&gt;
&lt;br /&gt;
myEvent.destroy(); //destroy the event&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
}}&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Event_functions}}&lt;/div&gt;</summary>
		<author><name>imported&gt;Shr0x</name></author>
	</entry>
</feed>