<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/DgsLineSetItemPosition?action=history&amp;feed=atom</id>
	<title>DgsLineSetItemPosition - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/DgsLineSetItemPosition?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsLineSetItemPosition&amp;action=history"/>
	<updated>2026-05-14T01:43:47Z</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=DgsLineSetItemPosition&amp;diff=74052&amp;oldid=prev</id>
		<title>Thisdp at 12:37, 7 February 2022</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsLineSetItemPosition&amp;diff=74052&amp;oldid=prev"/>
		<updated>2022-02-07T12:37:14Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:37, 7 February 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l10&quot;&gt;Line 10:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 10:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Required Arguments===  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Required Arguments===  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*'''line''': The DGS Line element.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*'''line''': The DGS Line element.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;*'''index''': The item index.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*'''startX:''' A float of the 2D x position of start position of the line on a player's screen, set to nil to use the end position of previous item.  This is affected by the ''relative'' argument.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*'''startX:''' A float of the 2D x position of start position of the line on a player's screen, set to nil to use the end position of previous item.  This is affected by the ''relative'' argument.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*'''startY:''' A float of the 2D y position of start position of the line on a player's screen, set to nil to use the end position of previous item.  This is affected by the ''relative'' argument.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*'''startY:''' A float of the 2D y position of start position of the line on a player's screen, set to nil to use the end position of previous item.  This is affected by the ''relative'' argument.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki-wiki_dev_:diff::1.12:old-74051:rev-74052 --&gt;
&lt;/table&gt;</summary>
		<author><name>Thisdp</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=DgsLineSetItemPosition&amp;diff=74051&amp;oldid=prev</id>
		<title>Thisdp: Created page with &quot;__NOTOC__  {{Client function}} This function sets the position of an item of dgs line.  ==Syntax==  &lt;syntaxhighlight lang=&quot;lua&quot;&gt; bool dgsLineSetItemPosition (element line, int index, float startX = previousEndX, float startY = previousEndY, float endX, float endY [, float relative = false ] ) &lt;/syntaxhighlight&gt;   ===Required Arguments===  *'''line''': The DGS Line element. *'''startX:''' A float of the 2D x position of start position of the line on a player's screen, set...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=DgsLineSetItemPosition&amp;diff=74051&amp;oldid=prev"/>
		<updated>2022-02-07T12:34:20Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;__NOTOC__  {{Client function}} This function sets the position of an item of dgs line.  ==Syntax==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; bool dgsLineSetItemPosition (element line, int index, float startX = previousEndX, float startY = previousEndY, float endX, float endY [, float relative = false ] ) &amp;lt;/syntaxhighlight&amp;gt;   ===Required Arguments===  *&amp;#039;&amp;#039;&amp;#039;line&amp;#039;&amp;#039;&amp;#039;: The DGS Line element. *&amp;#039;&amp;#039;&amp;#039;startX:&amp;#039;&amp;#039;&amp;#039; A float of the 2D x position of start position of the line on a player&amp;#039;s screen, set...&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 sets the position of an item of dgs line.&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 dgsLineSetItemPosition (element line, int index, float startX = previousEndX, float startY = previousEndY, float endX, float endY [, float relative = false ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''line''': The DGS Line element.&lt;br /&gt;
*'''startX:''' A float of the 2D x position of start position of the line on a player's screen, set to nil to use the end position of previous item.  This is affected by the ''relative'' argument.&lt;br /&gt;
*'''startY:''' A float of the 2D y position of start position of the line on a player's screen, set to nil to use the end position of previous item.  This is affected by the ''relative'' argument.&lt;br /&gt;
*'''endX:''' A float of the 2D x position of end position of the line on a player's screen.  This is affected by the ''relative'' argument.&lt;br /&gt;
*'''endY:''' A float of the 2D y position of end position of the line on a player's screen.  This is affected by the ''relative'' argument.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''relative:''' This is whether sizes and positioning are relative.  If this is ''true'', then all ''x, y, width'' and ''height'' floats must be between 0 and 1, representing sizes relative to the parent.&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
DGS = exports.dgs&lt;br /&gt;
&lt;br /&gt;
local line = DGS:dgsCreateLine(400,200,600,400)&lt;br /&gt;
local sinX = math.sin(0/500*4*math.pi)&lt;br /&gt;
DGS:dgsLineAddItem(line,0/500,sinX/2+0.5,0/500,sinX/2+0.5,2,tocolor(0,255,0,255),true)&lt;br /&gt;
for i=1,100 do&lt;br /&gt;
	local sinX = math.sin(i/100*4*math.pi)&lt;br /&gt;
	DGS:dgsLineAddItem(line,_,_,i/100,sinX/2+0.5,2,tocolor(i/100*255,255-i/100*255,0,255),true)&lt;br /&gt;
end&lt;br /&gt;
DGS:dgsLineSetItemPosition(line,101,_,_,0,0,true)&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>