<?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=Szaby</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=Szaby"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Szaby"/>
	<updated>2026-05-10T11:50:01Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetVehicleSirens&amp;diff=67423</id>
		<title>SetVehicleSirens</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetVehicleSirens&amp;diff=67423"/>
		<updated>2020-09-23T17:42:11Z</updated>

		<summary type="html">&lt;p&gt;Szaby: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
{{New feature/item|3.0130|1.3.0|3968|&lt;br /&gt;
This function changes the properties of a vehicles siren point.&lt;br /&gt;
}}&lt;br /&gt;
{{Note|Although you may be able to add sirens to any vehice, this function may not work. This function fails on certain vehicle models (https://wiki.multitheftauto.com/wiki/Vehicle_IDs#Lua_table_of_vehicles_that_doesn.27t_support_siren_lights).}}&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 setVehicleSirens ( vehicle theVehicle, int sirenPoint, float posX, float posY, float posZ, float red, float green, float blue, [float alpha = 255, float minAlpha = 0.0] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[vehicle]]:setSirens||getVehicleSirens}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The vehicle to modify&lt;br /&gt;
*'''sirenPoint:''' The siren point to modify&lt;br /&gt;
*'''posX:''' The x position of this siren point from the center of the vehicle&lt;br /&gt;
*'''posY:''' The y position of this siren point from the center of the vehicle&lt;br /&gt;
*'''posZ:''' The z position of this siren point from the center of the vehicle&lt;br /&gt;
*'''red:''' The amount of red from 0 to 255&lt;br /&gt;
*'''green:''' The amount of green from 0 to 255&lt;br /&gt;
*'''blue:''' The amount of blue from 0 to 255&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''alpha:''' The alpha of the siren from 0 to 255&lt;br /&gt;
*'''minAlpha:''' The minimum alpha of the light during day time&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the siren point was successfully changed on the vehicle, ''false'' otherwise. &lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example adds a siren then sets the vehicle siren in the center of the car. (Not sure if it works...)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onVehicleEnter&amp;quot;,root,function(player,seat)&lt;br /&gt;
   if(player)and(seat==0)then&lt;br /&gt;
      addVehicleSirens(source,1,2)&lt;br /&gt;
      setVehicleSirens(source,1,0,0,0,100,0,100)&lt;br /&gt;
   end&lt;br /&gt;
end)&lt;br /&gt;
addEventHandler(&amp;quot;onVehicleExit&amp;quot;,root,function(player,seat)&lt;br /&gt;
   if(player)and(seat==0)then&lt;br /&gt;
      removeVehicleSirens(source)&lt;br /&gt;
   end&lt;br /&gt;
end)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|1.3.0-9.03968|1.3.0-9.03968|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>Szaby</name></author>
	</entry>
</feed>