<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/OnDgsEditPreSwitch?action=history&amp;feed=atom</id>
	<title>OnDgsEditPreSwitch - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/OnDgsEditPreSwitch?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnDgsEditPreSwitch&amp;action=history"/>
	<updated>2026-05-06T12:09:05Z</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=OnDgsEditPreSwitch&amp;diff=54191&amp;oldid=prev</id>
		<title>Thisdp: Created page with &quot;{{Client event}} __NOTOC__ This event is triggered each time the user switch the dgs edit with the key &quot;tab&quot; and before the switch operation finishes.  ==Parameters==  &lt;syntax...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnDgsEditPreSwitch&amp;diff=54191&amp;oldid=prev"/>
		<updated>2018-03-24T03:34:20Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Client event}} __NOTOC__ This event is triggered each time the user switch the dgs edit with the key &amp;quot;tab&amp;quot; and before the switch operation finishes.  ==Parameters==  &amp;lt;syntax...&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 triggered each time the user switch the dgs edit with the key &amp;quot;tab&amp;quot; and before the switch operation finishes.&lt;br /&gt;
&lt;br /&gt;
==Parameters== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
None&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the dgs edit.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
DGS = exports.dgs&lt;br /&gt;
&lt;br /&gt;
edit = DGS:dgsCreateEdit(0.3,0.3,0.2,0.05,&amp;quot;1&amp;quot;,true)&lt;br /&gt;
edit2 = DGS:dgsCreateEdit(0.3,0.4,0.2,0.05,&amp;quot;2&amp;quot;,true)&lt;br /&gt;
edit3 = DGS:dgsCreateEdit(0.3,0.5,0.2,0.05,&amp;quot;3&amp;quot;,true)&lt;br /&gt;
edit4 = DGS:dgsCreateEdit(0.3,0.6,0.2,0.05,&amp;quot;4&amp;quot;,true)&lt;br /&gt;
&lt;br /&gt;
function onSwitch()&lt;br /&gt;
	cancelEvent() -- Now switch disabled	&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onDgsEditPreSwitch&amp;quot;, root, onSwitch)&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>