<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.multitheftauto.com/wiki/SetSearchLightColor?action=history&amp;feed=atom</id>
	<title>SetSearchLightColor - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.multitheftauto.com/wiki/SetSearchLightColor?action=history&amp;feed=atom"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetSearchLightColor&amp;action=history"/>
	<updated>2026-09-16T19:05:29Z</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=SetSearchLightColor&amp;diff=82894&amp;oldid=prev</id>
		<title>Arran Fortuna: Created page with &quot;__NOTOC__ {{Client function}} This function sets the color of a searchlight element.  ==Syntax== &lt;syntaxhighlight lang=&quot;lua&quot;&gt; nil setSearchLightColor ( searchlight theSearchLight, int color ) &lt;/syntaxhighlight&gt;  ===Required Arguments=== *'''theSearchLight''': the searchlight to set the color of. *'''color''': the color to apply, created using tocolor.  {{Note|The alpha component is stored, but does not affect the searchlight's appearance.}}  =...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetSearchLightColor&amp;diff=82894&amp;oldid=prev"/>
		<updated>2026-09-16T09:54:18Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;__NOTOC__ {{Client function}} This function sets the color of a &lt;a href=&quot;/wiki/Element/Searchlight&quot; title=&quot;Element/Searchlight&quot;&gt;searchlight&lt;/a&gt; element.  ==Syntax== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; nil setSearchLightColor ( searchlight theSearchLight, int color ) &amp;lt;/syntaxhighlight&amp;gt;  ===Required Arguments=== *&amp;#039;&amp;#039;&amp;#039;theSearchLight&amp;#039;&amp;#039;&amp;#039;: the searchlight to set the color of. *&amp;#039;&amp;#039;&amp;#039;color&amp;#039;&amp;#039;&amp;#039;: the color to apply, created using &lt;a href=&quot;/wiki/Tocolor&quot; title=&quot;Tocolor&quot;&gt;tocolor&lt;/a&gt;.  {{Note|The alpha component is stored, but does not affect the searchlight&amp;#039;s appearance.}}  =...&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 color of a [[Element/Searchlight|searchlight]] element.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
nil setSearchLightColor ( searchlight theSearchLight, int color )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theSearchLight''': the searchlight to set the color of.&lt;br /&gt;
*'''color''': the color to apply, created using [[tocolor]].&lt;br /&gt;
&lt;br /&gt;
{{Note|The alpha component is stored, but does not affect the searchlight's appearance.}}&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
This function does not return any values. Invalid arguments raise an error.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example creates an orange searchlight above the player.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;orangelight&amp;quot;, function()&lt;br /&gt;
    local x, y, z = getElementPosition(localPlayer)&lt;br /&gt;
    local searchLight = createSearchLight(x, y, z + 10, x, y, z, 0, 5)&lt;br /&gt;
&lt;br /&gt;
    if not searchLight then&lt;br /&gt;
        return&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    setSearchLightColor(searchLight, tocolor(255, 128, 0))&lt;br /&gt;
    outputChatBox(&amp;quot;Created an orange searchlight.&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
    -- Remove the demonstration light after 10 seconds.&lt;br /&gt;
    setTimer(destroyElement, 10000, 1, searchLight)&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Client_searchlight_functions}}&lt;/div&gt;</summary>
		<author><name>Arran Fortuna</name></author>
	</entry>
</feed>