<?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%3AisHangingOnToVehicle</id>
	<title>Ped::isHangingOnToVehicle - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://rage.grandroleplay.ru/index.php?action=history&amp;feed=atom&amp;title=Ped%3A%3AisHangingOnToVehicle"/>
	<link rel="alternate" type="text/html" href="https://rage.grandroleplay.ru/index.php?title=Ped::isHangingOnToVehicle&amp;action=history"/>
	<updated>2026-07-24T18:50:05Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://rage.grandroleplay.ru/index.php?title=Ped::isHangingOnToVehicle&amp;diff=11224&amp;oldid=prev</id>
		<title>imported&gt;Shr0x в 19:04, 8 ноября 2024</title>
		<link rel="alternate" type="text/html" href="https://rage.grandroleplay.ru/index.php?title=Ped::isHangingOnToVehicle&amp;diff=11224&amp;oldid=prev"/>
		<updated>2024-11-08T19:04:28Z</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;
===Explanation===&lt;br /&gt;
The `isHangingOnToVehicle` function checks if a specified pedestrian (`ped`) is currently hanging onto a vehicle. This function can be useful for gameplay scenarios where you want to monitor a character&amp;#039;s state, such as triggering events if the character is hanging onto a moving vehicle.&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 handle of the pedestrian you want to check.&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 pedestrian is hanging onto a vehicle; 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.isHangingOnToVehicle(ped)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example checks if the player character is hanging onto a vehicle. If so, it triggers a warning and plays an alert sound.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
// Assume &amp;#039;playerPed&amp;#039; is the player&amp;#039;s ped handle&lt;br /&gt;
const playerPed = mp.players.local.handle;&lt;br /&gt;
&lt;br /&gt;
// Check if the player is hanging onto a vehicle&lt;br /&gt;
if (mp.game.ped.isHangingOnToVehicle(playerPed)) {&lt;br /&gt;
    console.log(&amp;quot;Warning: You are hanging onto a vehicle!&amp;quot;);&lt;br /&gt;
    &lt;br /&gt;
    // Play a warning sound (hypothetical example)&lt;br /&gt;
    mp.game.audio.playSoundFrontend(-1, &amp;quot;Warning&amp;quot;, &amp;quot;DLC_HEISTS_GENERAL_FRONTEND_SOUNDS&amp;quot;, true);&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>