<?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=Pool%3A%3Aexists</id>
	<title>Pool::exists - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://rage.grandroleplay.ru/index.php?action=history&amp;feed=atom&amp;title=Pool%3A%3Aexists"/>
	<link rel="alternate" type="text/html" href="https://rage.grandroleplay.ru/index.php?title=Pool::exists&amp;action=history"/>
	<updated>2026-07-25T00:27:46Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://rage.grandroleplay.ru/index.php?title=Pool::exists&amp;diff=12595&amp;oldid=prev</id>
		<title>imported&gt;Shr0x: Pool list</title>
		<link rel="alternate" type="text/html" href="https://rage.grandroleplay.ru/index.php?title=Pool::exists&amp;diff=12595&amp;oldid=prev"/>
		<updated>2024-11-10T12:08:19Z</updated>

		<summary type="html">&lt;p&gt;Pool list&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{ServersideJsFunction}}&lt;br /&gt;
{{JSContainer|&lt;br /&gt;
&lt;br /&gt;
{{Pool_list}}&lt;br /&gt;
&lt;br /&gt;
==Summary==&lt;br /&gt;
The `mp.pool.exists` function checks if an entity with a specific ID exists within a pool. It returns `true` if the entity exists and `false` if it does not. This is helpful for ensuring an entity is valid before performing further operations.&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.pool.exists(id)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Return value===&lt;br /&gt;
Returns `true` if the entity exists, `false` if it does not.&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;id/entity:&amp;#039;&amp;#039;&amp;#039; {{RageType|Number}} — The entity ID or the entity itself to check in the pool.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example checks if a specific player with ID 1500 exists in the players pool, and if so, sends them a welcome message. If not, it logs that the player is not found.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
const playerID = 1500;&lt;br /&gt;
&lt;br /&gt;
if (mp.players.exists(playerID)) {&lt;br /&gt;
    const player = mp.players.at(playerID);&lt;br /&gt;
    player.outputChatBox(`Welcome back, ${player.name}!`);&lt;br /&gt;
} else {&lt;br /&gt;
    console.log(`Player with ID ${playerID} does not exist.`);&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;
{{EntityPool_function}}&lt;br /&gt;
[[Category:Serverside API]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Shr0x</name></author>
	</entry>
</feed>