<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.vc-mp.org/index.php?action=history&amp;feed=atom&amp;title=Scripting%2FSquirrel%2FClient_Functions%2FGUI%3A%3AGetMousePos</id>
	<title>Scripting/Squirrel/Client Functions/GUI::GetMousePos - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.vc-mp.org/index.php?action=history&amp;feed=atom&amp;title=Scripting%2FSquirrel%2FClient_Functions%2FGUI%3A%3AGetMousePos"/>
	<link rel="alternate" type="text/html" href="http://wiki.vc-mp.org/index.php?title=Scripting/Squirrel/Client_Functions/GUI::GetMousePos&amp;action=history"/>
	<updated>2026-05-15T22:21:04Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>http://wiki.vc-mp.org/index.php?title=Scripting/Squirrel/Client_Functions/GUI::GetMousePos&amp;diff=20145&amp;oldid=prev</id>
		<title>Human.: /* Example */</title>
		<link rel="alternate" type="text/html" href="http://wiki.vc-mp.org/index.php?title=Scripting/Squirrel/Client_Functions/GUI::GetMousePos&amp;diff=20145&amp;oldid=prev"/>
		<updated>2018-10-02T14:27:53Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Example&lt;/span&gt;&lt;/span&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 14:27, 2 October 2018&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-l20&quot;&gt;Line 20:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 20:&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;		if ( mousePos ) {&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;		if ( mousePos ) {&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;		    /* Send message &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;to player &lt;/del&gt;about &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;his &lt;/del&gt;mouse position */&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;		    /* Send message about mouse position &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;to local player/self &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;			Console.Print( &amp;quot;Mouse position - X: &amp;quot;+ mousePos.X +&amp;quot;, Y: &amp;quot;+ mousePos.Y );&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;			Console.Print( &amp;quot;Mouse position - X: &amp;quot;+ mousePos.X +&amp;quot;, Y: &amp;quot;+ mousePos.Y );&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;		}&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;		}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Human.</name></author>
	</entry>
	<entry>
		<id>http://wiki.vc-mp.org/index.php?title=Scripting/Squirrel/Client_Functions/GUI::GetMousePos&amp;diff=20143&amp;oldid=prev</id>
		<title>Human.: Created page with &quot;This function returns mouse position of the player.  == Syntax == &lt;pre&gt;GUI.GetMousePos()&lt;/pre&gt;  == Return type ==  &#039;&#039;&#039;VectorScreen&#039;&#039;&#039;  == Example == &lt;source lang=squirrel&gt; /*...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.vc-mp.org/index.php?title=Scripting/Squirrel/Client_Functions/GUI::GetMousePos&amp;diff=20143&amp;oldid=prev"/>
		<updated>2018-10-02T14:26:27Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;This function returns mouse position of the player.  == Syntax == &amp;lt;pre&amp;gt;GUI.GetMousePos()&amp;lt;/pre&amp;gt;  == Return type ==  &amp;#039;&amp;#039;&amp;#039;VectorScreen&amp;#039;&amp;#039;&amp;#039;  == Example == &amp;lt;source lang=squirrel&amp;gt; /*...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;This function returns mouse position of the player.&lt;br /&gt;
&lt;br /&gt;
== Syntax ==&lt;br /&gt;
&amp;lt;pre&amp;gt;GUI.GetMousePos()&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Return type ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;VectorScreen&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;source lang=squirrel&amp;gt;&lt;br /&gt;
/* Player::PlayerDeath is triggered whenever someone die, we are going to use this for the sake of example */&lt;br /&gt;
function Player::PlayerDeath( player ) &lt;br /&gt;
{&lt;br /&gt;
	/* Check whether the player that just died is local player/self by comparing ID */&lt;br /&gt;
	if ( player.ID == World.FindLocalPlayer( ).ID )&lt;br /&gt;
	{&lt;br /&gt;
		/* Get player&amp;#039;s mouse position */&lt;br /&gt;
		local mousePos = GUI.GetMousePos( );&lt;br /&gt;
&lt;br /&gt;
		if ( mousePos ) {&lt;br /&gt;
		    /* Send message to player about his mouse position */&lt;br /&gt;
			Console.Print( &amp;quot;Mouse position - X: &amp;quot;+ mousePos.X +&amp;quot;, Y: &amp;quot;+ mousePos.Y );&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
[[Scripting/Squirrel/Client_Events/Player::PlayerDeath|Player::PlayerDeath]], [[Scripting/Squirrel/Client_Functions/World::FindLocalPlayer|World::FindLocalPlayer]] and [[Scripting/Squirrel/Client_Functions/Console::Print|Console::Print]] &lt;br /&gt;
were used in this example, more info about them in the corresponding pages.&lt;/div&gt;</summary>
		<author><name>Human.</name></author>
	</entry>
</feed>