<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/DgsLocateObjectPreviewResource?action=history&amp;feed=atom</id>
	<title>DgsLocateObjectPreviewResource - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/DgsLocateObjectPreviewResource?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsLocateObjectPreviewResource&amp;action=history"/>
	<updated>2026-05-11T20:22:34Z</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=DgsLocateObjectPreviewResource&amp;diff=65066&amp;oldid=prev</id>
		<title>Thisdp: Created page with &quot;__NOTOC__  {{Client function}}  This function locates the object preview resource for DGS. '''Object Preview should be running'''.  ==Syntax==  &lt;syntaxhighlight lang=&quot;lua&quot;&gt; bo...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsLocateObjectPreviewResource&amp;diff=65066&amp;oldid=prev"/>
		<updated>2020-02-09T07:59:50Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;__NOTOC__  {{Client function}}  This function locates the object preview resource for DGS. &amp;#039;&amp;#039;&amp;#039;Object Preview should be running&amp;#039;&amp;#039;&amp;#039;.  ==Syntax==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; bo...&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;
&lt;br /&gt;
This function locates the object preview resource for DGS. '''Object Preview should be running'''.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool dgsLocateObjectPreviewResource( string name )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''name :''' A string of the name of Object Preview.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if success, ''false'' otherwise.&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 --get exported functions from dgs&lt;br /&gt;
&lt;br /&gt;
DGS:dgsLocateObjectPreviewResource(&amp;quot;object_preview&amp;quot;)  -- Locate resource object preview ( Ensure that object preview is running)&lt;br /&gt;
wind = DGS:dgsCreateWindow(400,300,300,320,&amp;quot;Example Object Preview&amp;quot;,false)  -- Create a window&lt;br /&gt;
veh = createVehicle(411,0,0,3)  -- Create a vehicle&lt;br /&gt;
objPrev = DGS:dgsCreateObjectPreviewHandle(veh,0,0,0)  -- Create object preview handle&lt;br /&gt;
image = DGS:dgsCreateImage(0,0,300,300,_,false,wind)  -- Create an image&lt;br /&gt;
DGS:dgsAttachObjectPreviewToImage(objPrev,image)  -- Apply&lt;br /&gt;
setTimer(function()&lt;br /&gt;
	exports.object_preview:setRotation(objPrev,0,0,getTickCount()/100%360) -- Rotate it&lt;br /&gt;
end,50,0)&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>