<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/GetCursorMoveOn?action=history&amp;feed=atom</id>
	<title>GetCursorMoveOn - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/GetCursorMoveOn?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetCursorMoveOn&amp;action=history"/>
	<updated>2026-04-30T10:07:44Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetCursorMoveOn&amp;diff=49526&amp;oldid=prev</id>
		<title>CiBeR: Fix showing contents of other functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetCursorMoveOn&amp;diff=49526&amp;oldid=prev"/>
		<updated>2016-10-18T04:35:16Z</updated>

		<summary type="html">&lt;p&gt;Fix showing contents of other functions&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&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 04:35, 18 October 2016&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;{{Useful 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;{{Useful Function}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;__NOTOC__&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;div&gt;This function checks in which way the cursor is currently moving.&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;This function checks in which way the cursor is currently moving.&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;==Syntax==&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;==Syntax==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki-wiki_dev_:diff::1.12:old-30194:rev-49526 --&gt;
&lt;/table&gt;</summary>
		<author><name>CiBeR</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetCursorMoveOn&amp;diff=30194&amp;oldid=prev</id>
		<title>Ronwolf1705 at 20:32, 30 April 2012</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetCursorMoveOn&amp;diff=30194&amp;oldid=prev"/>
		<updated>2012-04-30T20:32:44Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&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 20:32, 30 April 2012&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-l8&quot;&gt;Line 8:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 8:&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;==Code==&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;==Code==&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;{{RequiredFunctions|findRotation}}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;&amp;lt;section name=&amp;quot;Function source&amp;quot; class=&amp;quot;both&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&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;&amp;lt;section name=&amp;quot;Function source&amp;quot; class=&amp;quot;both&amp;quot; show=&amp;quot;true&amp;quot;&amp;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;div&gt;&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&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;&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki-wiki_dev_:diff::1.12:old-30193:rev-30194 --&gt;
&lt;/table&gt;</summary>
		<author><name>Ronwolf1705</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetCursorMoveOn&amp;diff=30193&amp;oldid=prev</id>
		<title>Ronwolf1705: Created page with &quot;{{Useful Function}} This function checks in which way the cursor is currently moving. ==Syntax== &lt;syntaxhighlight lang=&quot;lua&quot;&gt;string getCursorMoveOn( )&lt;/syntaxhighlight&gt;  ===Returns=== Returns left,right,u...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetCursorMoveOn&amp;diff=30193&amp;oldid=prev"/>
		<updated>2012-04-30T20:32:21Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Useful Function}} This function checks in which way the cursor is currently moving. ==Syntax== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string getCursorMoveOn( )&amp;lt;/syntaxhighlight&amp;gt;  ===Returns=== Returns left,right,u...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Useful Function}}&lt;br /&gt;
This function checks in which way the cursor is currently moving.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string getCursorMoveOn( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns left,right,up or down.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
{{RequiredFunctions|findRotation}}&lt;br /&gt;
&amp;lt;section name=&amp;quot;Function source&amp;quot; class=&amp;quot;both&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getCursorMoveOn()&lt;br /&gt;
    if ( isCursorShowing() ) then&lt;br /&gt;
	left = &amp;quot;left&amp;quot;&lt;br /&gt;
	right = &amp;quot;right&amp;quot;&lt;br /&gt;
	up = &amp;quot;up&amp;quot;&lt;br /&gt;
	down = &amp;quot;down&amp;quot;&lt;br /&gt;
    zero = &amp;quot;nil&amp;quot;&lt;br /&gt;
	if getElementData(localPlayer,&amp;quot;movew&amp;quot;) == right then&lt;br /&gt;
	return right&lt;br /&gt;
	elseif getElementData(localPlayer,&amp;quot;movew&amp;quot;) == left then&lt;br /&gt;
	return left&lt;br /&gt;
	elseif getElementData(localPlayer,&amp;quot;movew&amp;quot;) == up then&lt;br /&gt;
	return up&lt;br /&gt;
	elseif getElementData(localPlayer,&amp;quot;movew&amp;quot;) == down then&lt;br /&gt;
	return down&lt;br /&gt;
	elseif getElementData(localPlayer,&amp;quot;movew&amp;quot;) == zero then&lt;br /&gt;
	return false&lt;br /&gt;
	end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function executeMoveOn(cursorX,cursorY)&lt;br /&gt;
    if ( isCursorShowing() ) then&lt;br /&gt;
	setElementData(localPlayer,&amp;quot;moveX&amp;quot;,cursorX)&lt;br /&gt;
	setElementData(localPlayer,&amp;quot;moveY&amp;quot;,cursorY)&lt;br /&gt;
	     if cursorX &amp;gt; cX then&lt;br /&gt;
         setElementData(localPlayer,&amp;quot;movew&amp;quot;,right)&lt;br /&gt;
	     elseif cursorX &amp;lt; cX then&lt;br /&gt;
	     setElementData(localPlayer,&amp;quot;movew&amp;quot;,left)&lt;br /&gt;
	     elseif cursorY &amp;gt; cY then&lt;br /&gt;
	     setElementData(localPlayer,&amp;quot;movew&amp;quot;,down)&lt;br /&gt;
	     elseif cursorY &amp;lt; cY then&lt;br /&gt;
	     setElementData(localPlayer,&amp;quot;movew&amp;quot;,up)&lt;br /&gt;
	     end&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientCursorMove&amp;quot;,root,executeMoveOn)&lt;br /&gt;
&lt;br /&gt;
setTimer(&lt;br /&gt;
function()&lt;br /&gt;
    if ( isCursorShowing() ) then&lt;br /&gt;
	local curX = getElementData(localPlayer,&amp;quot;moveX&amp;quot;)&lt;br /&gt;
	local curY = getElementData(localPlayer,&amp;quot;moveY&amp;quot;)&lt;br /&gt;
		 if cursorX == cX then&lt;br /&gt;
		 setElementData(localPlayer,&amp;quot;movew&amp;quot;,zero)&lt;br /&gt;
		 elseif cursorY == cY then&lt;br /&gt;
		 setElementData(localPlayer,&amp;quot;movew&amp;quot;,zero)&lt;br /&gt;
		 end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
,50,0)&lt;br /&gt;
&lt;br /&gt;
function previousM()&lt;br /&gt;
   if ( isCursorShowing() ) then&lt;br /&gt;
    cX = getElementData(localPlayer,&amp;quot;moveX&amp;quot;)&lt;br /&gt;
	cY = getElementData(localPlayer,&amp;quot;moveY&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
setTimer(previousM,50,0)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client-side example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clientside example checks in which way cursor is currently moving.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bindKey (&amp;quot;m&amp;quot;, &amp;quot;down&amp;quot;,&lt;br /&gt;
function()&lt;br /&gt;
showCursor( not isCursorShowing() )&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientCursorMove&amp;quot;,root,&lt;br /&gt;
function()&lt;br /&gt;
    if ( isCursorShowing() ) then&lt;br /&gt;
	moveOn = getCursorMoveOn()&lt;br /&gt;
	outputChatBox(&amp;quot;cursor is moving on : &amp;quot; .. moveOn, localPlayer)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By '''ronwolf1705'''.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Ronwolf1705</name></author>
	</entry>
</feed>