<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/OnDgsSwitchButtonStateChange?action=history&amp;feed=atom</id>
	<title>OnDgsSwitchButtonStateChange - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/OnDgsSwitchButtonStateChange?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnDgsSwitchButtonStateChange&amp;action=history"/>
	<updated>2026-05-08T22:31:43Z</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=OnDgsSwitchButtonStateChange&amp;diff=65969&amp;oldid=prev</id>
		<title>Temois: Created page with &quot;{{Client event}} __NOTOC__ This event is triggered each time the dgs switch button state has changed.  ==Parameters==  &lt;syntaxhighlight lang=&quot;lua&quot;&gt; bool state &lt;/syntaxhighligh...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnDgsSwitchButtonStateChange&amp;diff=65969&amp;oldid=prev"/>
		<updated>2020-04-22T15:20:05Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Client event}} __NOTOC__ This event is triggered each time the dgs switch button state has changed.  ==Parameters==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; bool state &amp;lt;/syntaxhighligh...&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 dgs switch button state has 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;
bool state&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 switch button.&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;
button = DGS:dgsCreateSwitchButton( 0.7, 0.1, 0.2, 0.1, &amp;quot;On&amp;quot;, &amp;quot;Off&amp;quot;, false, true )&lt;br /&gt;
function onStateChanged(state)&lt;br /&gt;
	outputChatBox(state == true and &amp;quot;On&amp;quot; or &amp;quot;Off&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onDgsSwitchButtonStateChange&amp;quot;, button, onStateChanged)&lt;br /&gt;
&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>Temois</name></author>
	</entry>
</feed>