<?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=Ped%3A%3AisInVehicle</id>
	<title>Ped::isInVehicle - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://rage.grandroleplay.ru/index.php?action=history&amp;feed=atom&amp;title=Ped%3A%3AisInVehicle"/>
	<link rel="alternate" type="text/html" href="https://rage.grandroleplay.ru/index.php?title=Ped::isInVehicle&amp;action=history"/>
	<updated>2026-07-25T06:54:42Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://rage.grandroleplay.ru/index.php?title=Ped::isInVehicle&amp;diff=11251&amp;oldid=prev</id>
		<title>imported&gt;Shr0x в 14:10, 3 ноября 2024</title>
		<link rel="alternate" type="text/html" href="https://rage.grandroleplay.ru/index.php?title=Ped::isInVehicle&amp;diff=11251&amp;oldid=prev"/>
		<updated>2024-11-03T14:10:38Z</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;
== Description ==&lt;br /&gt;
This function checks if a specified pedestrian (ped) is currently inside a given vehicle. It can also check if the ped is in the process of entering the vehicle, depending on the value of `atGetIn`. This function is helpful for determining when a character is in or near entering a specific vehicle, allowing for additional gameplay logic to be applied.&lt;br /&gt;
&lt;br /&gt;
=== Required Params ===&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;ped:&amp;#039;&amp;#039;&amp;#039; {{RageType|number}} - The pedestrian handle to check.&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;vehicle:&amp;#039;&amp;#039;&amp;#039; {{RageType|number}} - The vehicle handle to check against.&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;atGetIn:&amp;#039;&amp;#039;&amp;#039; {{RageType|boolean}} - Set `true` to include checking if the ped is getting into the vehicle; otherwise, only checks if the ped is fully inside.&lt;br /&gt;
&lt;br /&gt;
=== Return value ===&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039; {{RageType|boolean}} &amp;#039;&amp;#039;&amp;#039; - Returns `true` if the ped is in the vehicle (or entering it if `atGetIn` is `true`); otherwise, `false`.&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.game.ped.isInVehicle(ped, vehicle, atGetIn)&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;
// Check if a pedestrian is in or entering a specific vehicle&lt;br /&gt;
const ped = mp.players.local.handle;&lt;br /&gt;
const vehicle = mp.vehicles.at(0).handle;&lt;br /&gt;
if (mp.game.ped.isInVehicle(ped, vehicle, true)) {&lt;br /&gt;
    mp.gui.chat.push(&amp;quot;Pedestrian is in or entering the vehicle.&amp;quot;);&lt;br /&gt;
} else {&lt;br /&gt;
    mp.gui.chat.push(&amp;quot;Pedestrian is not in the vehicle.&amp;quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
== See also ==&lt;br /&gt;
{{Ped_s_function_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>