<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/DgsDetectAreaSetFunction?action=history&amp;feed=atom</id>
	<title>DgsDetectAreaSetFunction - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/DgsDetectAreaSetFunction?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsDetectAreaSetFunction&amp;action=history"/>
	<updated>2026-05-11T12:29:20Z</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=DgsDetectAreaSetFunction&amp;diff=65455&amp;oldid=prev</id>
		<title>Thisdp: Created page with &quot;__NOTOC__  {{Client function}} This function set the detecting function of the detect area.  ''For texture detecting function:'' * Black field means going through. * White fie...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsDetectAreaSetFunction&amp;diff=65455&amp;oldid=prev"/>
		<updated>2020-03-21T18:33:59Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;__NOTOC__  {{Client function}} This function set the detecting function of the detect area.  &amp;#039;&amp;#039;For texture detecting function:&amp;#039;&amp;#039; * Black field means going through. * White fie...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function set the detecting function of the detect area.&lt;br /&gt;
&lt;br /&gt;
''For texture detecting function:''&lt;br /&gt;
* Black field means going through.&lt;br /&gt;
* White field means area to be detected.&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool dgsDetectAreaSetFunction( element da, string/texture detectingFnc )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''da:''' The detect area.&lt;br /&gt;
*'''detectingFnc :''' A string/texture that is used to act as detecting function&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns true if successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example will create detect area.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
DGS = exports.dgs&lt;br /&gt;
da = DGS:dgsCreateDetectArea (400,300,400,200,false) -- Create Detect Area&lt;br /&gt;
DGS:dgsDetectAreaSetFunction(da,[[&lt;br /&gt;
	if mxRlt^2+myRlt^2 &amp;lt; 0.5 then&lt;br /&gt;
		return true&lt;br /&gt;
	end&lt;br /&gt;
]]) --Custom Detect Area function&lt;br /&gt;
DGS:dgsDetectAreaSetDebugModeEnabled(da,true)  --Set debug mode so that we can see where it is and how it looks like.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example will create detect area with texture detecting function.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
DGS = exports.dgs&lt;br /&gt;
tex = dxCreateTexture(&amp;quot;yourTexture&amp;quot;)&lt;br /&gt;
da = DGS:dgsCreateDetectArea (400,300,400,200,false) -- Create Detect Area&lt;br /&gt;
DGS:dgsDetectAreaSetFunction(da,tex) --Custom Detect Area function&lt;br /&gt;
DGS:dgsDetectAreaSetDebugModeEnabled(da,true)  --Set debug mode so that we can see where it is and how it looks like.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{DGSFUNCTIONS}}&lt;/div&gt;</summary>
		<author><name>Thisdp</name></author>
	</entry>
</feed>