<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Slush</id>
	<title>Multi Theft Auto: Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Slush"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Slush"/>
	<updated>2026-05-03T08:41:00Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetMarkerType&amp;diff=9184</id>
		<title>SetMarkerType</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetMarkerType&amp;diff=9184"/>
		<updated>2007-07-22T18:17:02Z</updated>

		<summary type="html">&lt;p&gt;Slush: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
This function changes a marker's type.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
server:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool setMarkerType ( marker theMarker, string markerType )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
client:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;marker setMarkerType ( marker theMarker, string markerType )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''theMarker''': A [[marker]] element referencing the specified marker.&lt;br /&gt;
* '''markerType''': A string denoting the marker type. Valid values are:&lt;br /&gt;
{{Marker types}}&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns ''true'' if the marker type was changed, ''false'' if it wasn't or marker values were invalid.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This function changes all existing markers' type to the specified one (server side).&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function changeAllMarkersType ( newMarkerType )&lt;br /&gt;
	-- we store a table with all markers&lt;br /&gt;
	local allMarkers = getElementsByType( &amp;quot;marker&amp;quot; )&lt;br /&gt;
	-- for each marker in it,&lt;br /&gt;
	for index, aMarker in ipairs(allMarkers) do&lt;br /&gt;
		-- set its type to the one passed to this function&lt;br /&gt;
		setMarkerType( aMarker, newMarkerType )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Marker functions}}&lt;/div&gt;</summary>
		<author><name>Slush</name></author>
	</entry>
</feed>