<?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=Silverfang</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=Silverfang"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Silverfang"/>
	<updated>2026-04-04T03:41:03Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetSoundMaxDistance&amp;diff=18803</id>
		<title>GetSoundMaxDistance</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetSoundMaxDistance&amp;diff=18803"/>
		<updated>2009-03-29T17:26:55Z</updated>

		<summary type="html">&lt;p&gt;Silverfang: /* Returns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
Gets a custom [[sound]] max distance at which the sound stops.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int getSoundMaxDistance ( element sound )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''sound:''' a [[sound]] element.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an ''integer'' of the max distance, ''false'' if invalid arguments where passed.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local sound = playSound3D(&amp;quot;sounds/song.mp3&amp;quot;, 373.14, -125.21, 1001, true)&lt;br /&gt;
&lt;br /&gt;
function getmaxdistanceFunc()&lt;br /&gt;
  outputChatBox(&amp;quot;Max distance: &amp;quot;..getSoundMaxDistance(sound))&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;getmaxdistance&amp;quot;, getmaxdistanceFunc)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_audio_functions}}&lt;/div&gt;</summary>
		<author><name>Silverfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=CreateRadarArea&amp;diff=17576</id>
		<title>CreateRadarArea</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=CreateRadarArea&amp;diff=17576"/>
		<updated>2008-07-29T17:55:13Z</updated>

		<summary type="html">&lt;p&gt;Silverfang: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function can be used to create custom radar areas on the radar.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
radararea createRadarArea ( float centerX, float centerY, float sizeX, float sizeY, [ int r = 255, int g = 0, int b = 0, int a = 255, element visibleTo = getRootElement() ] )             &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''centerX:''' A float representing the center 'x' position of the radar area.&lt;br /&gt;
*'''centerY:''' A float representing the center 'y' position of the radar area.&lt;br /&gt;
*'''sizeX:''' A float representing the width of the radar area.&lt;br /&gt;
*'''sizeY:''' A float representing the height of the radar area.&lt;br /&gt;
&lt;br /&gt;
*'''r:''' An integer representing the amount of red in the color.  Maximum value is 255&lt;br /&gt;
*'''g:''' An integer representing the amount of green in the color.  Maximum value is 255&lt;br /&gt;
*'''b:''' An integer representing the amount of blue in the color.  Maximum value is 255&lt;br /&gt;
*'''a:''' An integer representing the amount of alpha in the color.  This allows setting the transparency of the radar area.  255 is opaque and 0 is transparent.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''visibleTo:''' An [[element]] that you wish to restrict the [[visibility]] of the radar area to.&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 creates a radar area for the King of the hill script, and a colsquare. When the player enters the radar area it flashes, and stops flashing when a player leaves it.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- create our hill area for our gamemode&lt;br /&gt;
local hillArea = createColRectangle ( -2171.0678710938, 678.17950439453, 0, 15, 15 )&lt;br /&gt;
local hillRadar = createRadarArea ( -2183.5678710938, 705.67950439453, 40, -40, 0, 255, 0, 175 )&lt;br /&gt;
&lt;br /&gt;
-- add hill_Enter as a handler for when a player enters the hill area&lt;br /&gt;
function hill_Enter ( thePlayer, matchingDimension )&lt;br /&gt;
        -- announce to everyone that the player entered the hill&lt;br /&gt;
        if (getElementType(thePlayer) == &amp;quot;player&amp;quot;) then&lt;br /&gt;
                outputChatBox( getClientName(thePlayer) .. &amp;quot; entered the zone!&amp;quot;, getRootElement(), 255, 255, 109 )&lt;br /&gt;
                setRadarAreaFlashing ( hillRadar, true )&lt;br /&gt;
        end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onColShapeHit&amp;quot;, hillArea, hill_Enter )&lt;br /&gt;
&lt;br /&gt;
-- add hill_Enter as a handler for when a player leaves the hill area&lt;br /&gt;
function hill_Exit ( thePlayer, matchingDimension )&lt;br /&gt;
        -- check if the player is not dead&lt;br /&gt;
        if (getElementType(thePlayer) == &amp;quot;player&amp;quot;) then&lt;br /&gt;
                if isPlayerDead ( thePlayer ) ~= true then&lt;br /&gt;
                        -- if he was alive, announce to everyone that the player has left the hill&lt;br /&gt;
                        outputChatBox ( getClientName(thePlayer) .. &amp;quot; left the zone!&amp;quot;, getRootElement(), 255, 255, 109 )&lt;br /&gt;
                        setRadarAreaFlashing ( hillRadar, false )&lt;br /&gt;
                end&lt;br /&gt;
        end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onColShapeLeave&amp;quot;, hillArea, hill_Exit )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Radar area_functions}}&lt;/div&gt;</summary>
		<author><name>Silverfang</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=CreateRadarArea&amp;diff=17575</id>
		<title>CreateRadarArea</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=CreateRadarArea&amp;diff=17575"/>
		<updated>2008-07-29T17:54:33Z</updated>

		<summary type="html">&lt;p&gt;Silverfang: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function can be used to create custom radar areas on the radar.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
radararea createRadarArea ( float centerX, float centerY, float sizeX, float sizeY, [ int r = 255, int g = 0, int b = 0, int a = 255, element visibleTo = getRootElement() ] )             &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''centerX:''' A float representing the center 'x' position of the radar area.&lt;br /&gt;
*'''centerY:''' A float representing the center 'y' position of the radar area.&lt;br /&gt;
*'''sizeX:''' A float representing the width of the radar area.&lt;br /&gt;
*'''sizeY:''' A float representing the height of the radar area.&lt;br /&gt;
&lt;br /&gt;
*'''r:''' An integer representing the amount of red in the color.  Maximum value is 255&lt;br /&gt;
*'''g:''' An integer representing the amount of green in the color.  Maximum value is 255&lt;br /&gt;
*'''b:''' An integer representing the amount of blue in the color.  Maximum value is 255&lt;br /&gt;
*'''a:''' An integer representing the amount of alpha in the color.  This allows setting the transparency of the radar area.  255 is opaque and 0 is transparent.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''visibleTo:''' An [[element]] that you wish to restrict the [[visibility]] of the radar area to.&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 creates a radar area for the King of the hill script, and a colsquare. When the player enters the radar area it flashes, and stops flashing when a player leaves it.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- create our hill area for our gamemode&lt;br /&gt;
local hillArea = createColRectangle ( -2171.0678710938, 678.17950439453, 0, 15, 15 )&lt;br /&gt;
local hillRadar = createRadarArea ( -2183.5678710938, 705.67950439453, 40, -40, 0, 255, 0, 175 )&lt;br /&gt;
&lt;br /&gt;
-- add hill_Enter as a handler for when a player enters the hill area&lt;br /&gt;
function hill_Enter ( thePlayer, matchingDimension )&lt;br /&gt;
        -- announce to everyone that the player entered the hill&lt;br /&gt;
        if (getElementType(thePlayer) == &amp;quot;player&amp;quot;) then&lt;br /&gt;
        outputChatBox( getClientName(thePlayer) .. &amp;quot; entered the zone!&amp;quot;, getRootElement(), 255, 255, 109 )&lt;br /&gt;
        setRadarAreaFlashing ( hillRadar, true )&lt;br /&gt;
        end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onColShapeHit&amp;quot;, hillArea, hill_Enter )&lt;br /&gt;
&lt;br /&gt;
-- add hill_Enter as a handler for when a player leaves the hill area&lt;br /&gt;
function hill_Exit ( thePlayer, matchingDimension )&lt;br /&gt;
        -- check if the player is not dead&lt;br /&gt;
        if (getElementType(thePlayer) == &amp;quot;player&amp;quot;) then&lt;br /&gt;
                if isPlayerDead ( thePlayer ) ~= true then&lt;br /&gt;
                        -- if he was alive, announce to everyone that the player has left the hill&lt;br /&gt;
                        outputChatBox ( getClientName(thePlayer) .. &amp;quot; left the zone!&amp;quot;, getRootElement(), 255, 255, 109 )&lt;br /&gt;
                        setRadarAreaFlashing ( hillRadar, false )&lt;br /&gt;
                end&lt;br /&gt;
        end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onColShapeLeave&amp;quot;, hillArea, hill_Exit )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Radar area_functions}}&lt;/div&gt;</summary>
		<author><name>Silverfang</name></author>
	</entry>
</feed>