<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/OnDgsSelectorSelect?action=history&amp;feed=atom</id>
	<title>OnDgsSelectorSelect - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/OnDgsSelectorSelect?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnDgsSelectorSelect&amp;action=history"/>
	<updated>2026-05-15T15:54:33Z</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=OnDgsSelectorSelect&amp;diff=68911&amp;oldid=prev</id>
		<title>Thisdp: Created page with &quot;{{Client event}} __NOTOC__  This event is fired when the selected item of a DGS selector is changed.  ==Parameters==  &lt;syntaxhighlight lang=&quot;lua&quot;&gt; integer current, integer pre...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnDgsSelectorSelect&amp;diff=68911&amp;oldid=prev"/>
		<updated>2021-02-13T13:49:22Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Client event}} __NOTOC__  This event is fired when the selected item of a DGS selector is changed.  ==Parameters==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; integer current, integer pre...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Client event}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This event is fired when the selected item of a DGS selector is changed.&lt;br /&gt;
&lt;br /&gt;
==Parameters== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
integer current, integer previous&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* '''current''': The item id that got selected.&lt;br /&gt;
* '''previous''':  The item id that last selected.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the dgs selector element that got its selected item changed.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example outputs a message with the selected item when an item is selected.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
DGS = exports.dgs&lt;br /&gt;
selector = DGS:dgsCreateSelector(400,500,100,20,false)&lt;br /&gt;
for i=1,5000 do&lt;br /&gt;
	DGS:dgsSelectorAddItem(selector,i)&lt;br /&gt;
end&lt;br /&gt;
function onSelected(current,previous)&lt;br /&gt;
	outputChatBox(&amp;quot;Last Selection:&amp;quot;..(previous or &amp;quot;None&amp;quot;)..&amp;quot;;Current Selection:&amp;quot;..(current or &amp;quot;None&amp;quot;))&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onDgsSelectorSelect&amp;quot;,getRootElement(),onSelected)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===DGS events===&lt;br /&gt;
{{DGSEVENTS}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>Thisdp</name></author>
	</entry>
</feed>