<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/RU/getGroundPosition?action=history&amp;feed=atom</id>
	<title>RU/getGroundPosition - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/RU/getGroundPosition?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RU/getGroundPosition&amp;action=history"/>
	<updated>2026-10-13T03:39:07Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.1</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RU/getGroundPosition&amp;diff=22647&amp;oldid=prev</id>
		<title>PoliticalOrel at 12:29, 8 March 2010</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RU/getGroundPosition&amp;diff=22647&amp;oldid=prev"/>
		<updated>2010-03-08T12:29:44Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:29, 8 March 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;__NOTOC__&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;__NOTOC__&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{RU/Client function}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{RU/Client function}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;This function gets the &lt;/del&gt;Z &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;level of the highest ground below a point&lt;/del&gt;.  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Эта функция помогает вам узнать наивысшую точку на оси координат &lt;/ins&gt;Z &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;в данной точке&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;It is required that the point is near enough to the local player so that it&amp;#039;s within the area where collision data is loaded. If this is not the case, an incorrect position will be returned.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;It is required that the point is near enough to the local player so that it&amp;#039;s within the area where collision data is loaded. If this is not the case, an incorrect position will be returned.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki-wiki_dev_:diff:1.41:old-22645:rev-22647:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>PoliticalOrel</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RU/getGroundPosition&amp;diff=22645&amp;oldid=prev</id>
		<title>PoliticalOrel: Created page with &#039;__NOTOC__ {{RU/Client function}} This function gets the Z level of the highest ground below a point.   It is required that the point is near enough to the local player so that it…&#039;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RU/getGroundPosition&amp;diff=22645&amp;oldid=prev"/>
		<updated>2010-03-08T12:24:17Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;__NOTOC__ {{RU/Client function}} This function gets the Z level of the highest ground below a point.   It is required that the point is near enough to the local player so that it…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__&lt;br /&gt;
{{RU/Client function}}&lt;br /&gt;
This function gets the Z level of the highest ground below a point. &lt;br /&gt;
&lt;br /&gt;
It is required that the point is near enough to the local player so that it&amp;#039;s within the area where collision data is loaded. If this is not the case, an incorrect position will be returned.&lt;br /&gt;
&lt;br /&gt;
==Использование== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float getGroundPosition ( float x, float y, float z )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Необходимые параметры=== &lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;x:&amp;#039;&amp;#039;&amp;#039; A floating point number representing the X world coordinate of the point.&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;y:&amp;#039;&amp;#039;&amp;#039; A floating point number representing the Y world coordinate of the point.&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;z:&amp;#039;&amp;#039;&amp;#039; A floating point number representing the Z world coordinate of the point.&lt;br /&gt;
&lt;br /&gt;
===Что возвращается===&lt;br /&gt;
Returns a float with the highest ground-level Z coord if parameters are valid, &amp;#039;&amp;#039;0&amp;#039;&amp;#039; if the point you tried to test is outside the loaded world map, &amp;#039;&amp;#039;false&amp;#039;&amp;#039; otherwise.&lt;br /&gt;
&lt;br /&gt;
==Пример== &lt;br /&gt;
This clientside function determines if a player is under a ceiling or not.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function isPlayerUnderCover ( thePlayer )&lt;br /&gt;
	--we get the player&amp;#039;s position&lt;br /&gt;
	local px, py, pz = getElementPosition ( thePlayer )&lt;br /&gt;
	--we&amp;#039;ll check for ground level at the player&amp;#039;s position, and also 500 units over him.&lt;br /&gt;
	--if these ground levels match, it must mean there were no obstacles (such as a ceiling) over the player,&lt;br /&gt;
	if getGroundPosition ( px, py, pz ) == getGroundPosition ( px, py, pz + 500 ) then&lt;br /&gt;
		-- so the player is not under cover&lt;br /&gt;
		return false&lt;br /&gt;
	--otherwise, there was an object over him,&lt;br /&gt;
	else&lt;br /&gt;
		-- so the player is under cover&lt;br /&gt;
		return true&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Смотри также==&lt;br /&gt;
{{RU/Client_world_functions}}&lt;br /&gt;
&lt;br /&gt;
[[en:getGroundPosition]]&lt;/div&gt;</summary>
		<author><name>PoliticalOrel</name></author>
	</entry>
</feed>