<?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=Audio%3A%3AisPedRingtonePlaying</id>
	<title>Audio::isPedRingtonePlaying - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://rage.grandroleplay.ru/index.php?action=history&amp;feed=atom&amp;title=Audio%3A%3AisPedRingtonePlaying"/>
	<link rel="alternate" type="text/html" href="https://rage.grandroleplay.ru/index.php?title=Audio::isPedRingtonePlaying&amp;action=history"/>
	<updated>2026-07-24T17:39:44Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://rage.grandroleplay.ru/index.php?title=Audio::isPedRingtonePlaying&amp;diff=91&amp;oldid=prev</id>
		<title>imported&gt;Caballero в 20:38, 6 октября 2024</title>
		<link rel="alternate" type="text/html" href="https://rage.grandroleplay.ru/index.php?title=Audio::isPedRingtonePlaying&amp;diff=91&amp;oldid=prev"/>
		<updated>2024-10-06T20:38:56Z</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;
===Required Params===&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;ped:&amp;#039;&amp;#039;&amp;#039; {{RageType|number}} — The ID of the pedestrian (player character) to check if the ringtone is playing.&lt;br /&gt;
&lt;br /&gt;
===Return value===&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;boolean&amp;#039;&amp;#039;&amp;#039; — Returns true if the ringtone is currently playing for the specified pedestrian, otherwise returns 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;
// Function to check if a ringtone is playing for the player&lt;br /&gt;
function checkRingtoneStatus() {&lt;br /&gt;
    let player = mp.players.local; // Reference to the local player&lt;br /&gt;
&lt;br /&gt;
    // Check if a ringtone is playing for the player&lt;br /&gt;
    let isPlaying = mp.game.audio.isPedRingtonePlaying(player.handle);&lt;br /&gt;
&lt;br /&gt;
    // Notify the player about the ringtone status&lt;br /&gt;
    if (isPlaying) {&lt;br /&gt;
        mp.gui.chat.push(&amp;quot;A ringtone is currently playing.&amp;quot;);&lt;br /&gt;
    } else {&lt;br /&gt;
        mp.gui.chat.push(&amp;quot;No ringtone is currently playing.&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// Bind the function to a key (for example, the &amp;quot;E&amp;quot; key)&lt;br /&gt;
mp.keys.bind(69, false, function() { // 69 is the key code for &amp;quot;E&amp;quot;&lt;br /&gt;
    checkRingtoneStatus(); // Call the function to check ringtone status&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;
{{Audio_functions_c}}&lt;br /&gt;
[[Category:Clientside API]]&lt;br /&gt;
[[Category:TODO: Example]]&lt;/div&gt;</summary>
		<author><name>imported&gt;Caballero</name></author>
	</entry>
</feed>