<?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=Funny</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=Funny"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Funny"/>
	<updated>2026-04-27T00:41:53Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementAlpha&amp;diff=29583</id>
		<title>SetElementAlpha</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementAlpha&amp;diff=29583"/>
		<updated>2012-03-04T22:58:06Z</updated>

		<summary type="html">&lt;p&gt;Funny: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function sets the alpha(transparency) value for the specified [[element]]. This can be a [[player]] or a [[vehicle]].&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 setElementAlpha ( element theElement, int alpha )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theElement:''' The [[element]] whose alpha you want to set.&lt;br /&gt;
*'''alpha:'''  The alpha value to set. Value can be 0-255, where 255 is fully opaque and 0 is fully transparent.&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''false'' if invalid arguments were passed.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example makes the player invisible.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function invisible()&lt;br /&gt;
        setElementAlpha(getLocalPlayer(), 0)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;invisible&amp;quot;, invisible )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Serverside example&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example lets you toggle invisibility when you write /invis.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function toggleInvis ( source )	-- source is whoever executed the command&lt;br /&gt;
	function qb = getElementAlpha(source) -- get the actual alpha for check if i'm visible&lt;br /&gt;
        if qb == 0 then		-- if the source player is NOT invisible&lt;br /&gt;
		setElementAlpha ( source, 0 )	-- set the players alpha to 0 (make them invisible)&lt;br /&gt;
	else			-- else, if the source player IS visible&lt;br /&gt;
		setElementAlpha ( source, 255 )	-- set the players alpha to 255 (make them 100% visible)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;invis&amp;quot;, toggleInvis )	-- When /invis is typed, the function 'toggleInvis' will start.&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;
{{Element functions}}&lt;/div&gt;</summary>
		<author><name>Funny</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementAlpha&amp;diff=29582</id>
		<title>SetElementAlpha</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementAlpha&amp;diff=29582"/>
		<updated>2012-03-04T22:57:48Z</updated>

		<summary type="html">&lt;p&gt;Funny: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function sets the alpha(transparency) value for the specified [[element]]. This can be a [[player]] or a [[vehicle]].&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 setElementAlpha ( element theElement, int alpha )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theElement:''' The [[element]] whose alpha you want to set.&lt;br /&gt;
*'''alpha:'''  The alpha value to set. Value can be 0-255, where 255 is fully opaque and 0 is fully transparent.&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''false'' if invalid arguments were passed.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Clientside example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example makes the player invisible.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function invisible()&lt;br /&gt;
        setElementAlpha(getLocalPlayer(), 0)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;invisible&amp;quot;, invisible )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Serverside example&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example lets you toggle invisibility when you write /invis.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function toggleInvis ( source )	-- source is whoever executed the command&lt;br /&gt;
	function qb = getElementAlpha(source) -- get the actual alpha for check if i'm visible&lt;br /&gt;
        if qb == 0 then		-- if the source player is NOT invisible&lt;br /&gt;
		qb  = 1		-- set qb to say the source player is invisible&lt;br /&gt;
		setElementAlpha ( source, 0 )	-- set the players alpha to 0 (make them invisible)&lt;br /&gt;
	else			-- else, if the source player IS visible&lt;br /&gt;
		qb = 0		-- set qb to say the source player is visible.&lt;br /&gt;
		setElementAlpha ( source, 255 )	-- set the players alpha to 255 (make them 100% visible)&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;invis&amp;quot;, toggleInvis )	-- When /invis is typed, the function 'toggleInvis' will start.&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;
{{Element functions}}&lt;/div&gt;</summary>
		<author><name>Funny</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementCollidableWith&amp;diff=29516</id>
		<title>SetElementCollidableWith</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementCollidableWith&amp;diff=29516"/>
		<updated>2012-02-28T17:50:33Z</updated>

		<summary type="html">&lt;p&gt;Funny: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
{{Needs Example}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This function can be used to set an element to collide with another element. An element with collisions disabled does not interact physically with the other element.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Note:''' You can only use this function with the element types listed below.&lt;br /&gt;
*[[Player]]&lt;br /&gt;
*[[Ped]]&lt;br /&gt;
*[[Vehicle]]&lt;br /&gt;
*[[Object]]&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 setElementCollidableWith ( element theElement, element withElement, bool enabled ) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' The [[element]] which colliding you want to change&lt;br /&gt;
*'''withElement:''' The other [[element]] you wish the first entity to collide with&lt;br /&gt;
*'''enabled:''' A boolean to indicate whether elements should be able to collide with eachother (''true'') or not (''false'')&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the collisions were set succesfully, ''false'' otherwise.&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;
&lt;br /&gt;
function ghostmode_on()&lt;br /&gt;
	local localPlayer = getLocalPlayer() -- Getting the Local Player&lt;br /&gt;
	local v = getPedOccupiedVehicle(localPlayer) -- Get her's Vehicle ID&lt;br /&gt;
	for index,vehicle in ipairs(getElementsByType(&amp;quot;vehicle&amp;quot;)) do --LOOP through all Vehicles&lt;br /&gt;
		setElementCollidableWith(vehicle, v, false) -- Set the Collison off with the Other vehicles.&lt;br /&gt;
	end&lt;br /&gt;
	outputChatBox(&amp;quot;You are now a Ghost :P&amp;quot;,thePlayer)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;ghostmode&amp;quot;, ghostmode_on) -- Add the /ghostmode Command.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
{{Note|When you do not know what &amp;quot;addCommandHandler&amp;quot; is Check the Wiki Page.}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client element functions}}&lt;/div&gt;</summary>
		<author><name>Funny</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementCollidableWith&amp;diff=29515</id>
		<title>SetElementCollidableWith</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementCollidableWith&amp;diff=29515"/>
		<updated>2012-02-28T17:50:18Z</updated>

		<summary type="html">&lt;p&gt;Funny: /* Returns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
{{Needs Example}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This function can be used to set an element to collide with another element. An element with collisions disabled does not interact physically with the other element.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Note:''' You can only use this function with the element types listed below.&lt;br /&gt;
*[[Player]]&lt;br /&gt;
*[[Ped]]&lt;br /&gt;
*[[Vehicle]]&lt;br /&gt;
*[[Object]]&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 setElementCollidableWith ( element theElement, element withElement, bool enabled ) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' The [[element]] which colliding you want to change&lt;br /&gt;
*'''withElement:''' The other [[element]] you wish the first entity to collide with&lt;br /&gt;
*'''enabled:''' A boolean to indicate whether elements should be able to collide with eachother (''true'') or not (''false'')&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the collisions were set succesfully, ''false'' otherwise.&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;
&lt;br /&gt;
function ghostmode_on()&lt;br /&gt;
	local localPlayer = getLocalPlayer() -- Getting the Local Player&lt;br /&gt;
	local v = getPedOccupiedVehicle(localPlayer) -- Get her's Vehicle ID&lt;br /&gt;
	for index,vehicle in ipairs(getElementsByType(&amp;quot;vehicle&amp;quot;)) do --LOOP through all Vehicles&lt;br /&gt;
		setElementCollidableWith(vehicle, v, false) -- Set the Collison off with the Other vehicles.&lt;br /&gt;
	end&lt;br /&gt;
	outputChatBox(&amp;quot;You are now a Ghost :P&amp;quot;,thePlayer)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;ghostmode&amp;quot;, ghostmode_on) -- Add the /ghostmode Command.&lt;br /&gt;
&lt;br /&gt;
&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 element functions}}&lt;/div&gt;</summary>
		<author><name>Funny</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementCollidableWith&amp;diff=29514</id>
		<title>SetElementCollidableWith</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementCollidableWith&amp;diff=29514"/>
		<updated>2012-02-28T17:49:57Z</updated>

		<summary type="html">&lt;p&gt;Funny: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
{{Needs Example}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This function can be used to set an element to collide with another element. An element with collisions disabled does not interact physically with the other element.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Note:''' You can only use this function with the element types listed below.&lt;br /&gt;
*[[Player]]&lt;br /&gt;
*[[Ped]]&lt;br /&gt;
*[[Vehicle]]&lt;br /&gt;
*[[Object]]&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 setElementCollidableWith ( element theElement, element withElement, bool enabled ) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' The [[element]] which colliding you want to change&lt;br /&gt;
*'''withElement:''' The other [[element]] you wish the first entity to collide with&lt;br /&gt;
*'''enabled:''' A boolean to indicate whether elements should be able to collide with eachother (''true'') or not (''false'')&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the collisions were set succesfully, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
{{Note|When you do not know what &amp;quot;addCommandHandler&amp;quot; is Check the Wiki Page.}} &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;
&lt;br /&gt;
function ghostmode_on()&lt;br /&gt;
	local localPlayer = getLocalPlayer() -- Getting the Local Player&lt;br /&gt;
	local v = getPedOccupiedVehicle(localPlayer) -- Get her's Vehicle ID&lt;br /&gt;
	for index,vehicle in ipairs(getElementsByType(&amp;quot;vehicle&amp;quot;)) do --LOOP through all Vehicles&lt;br /&gt;
		setElementCollidableWith(vehicle, v, false) -- Set the Collison off with the Other vehicles.&lt;br /&gt;
	end&lt;br /&gt;
	outputChatBox(&amp;quot;You are now a Ghost :P&amp;quot;,thePlayer)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;ghostmode&amp;quot;, ghostmode_on) -- Add the /ghostmode Command.&lt;br /&gt;
&lt;br /&gt;
&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 element functions}}&lt;/div&gt;</summary>
		<author><name>Funny</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetElementCollidableWith&amp;diff=29513</id>
		<title>SetElementCollidableWith</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetElementCollidableWith&amp;diff=29513"/>
		<updated>2012-02-28T17:42:07Z</updated>

		<summary type="html">&lt;p&gt;Funny: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
{{Needs Example}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This function can be used to set an element to collide with another element. An element with collisions disabled does not interact physically with the other element.&amp;lt;br&amp;gt;&lt;br /&gt;
'''Note:''' You can only use this function with the element types listed below.&lt;br /&gt;
*[[Player]]&lt;br /&gt;
*[[Ped]]&lt;br /&gt;
*[[Vehicle]]&lt;br /&gt;
*[[Object]]&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 setElementCollidableWith ( element theElement, element withElement, bool enabled ) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' The [[element]] which colliding you want to change&lt;br /&gt;
*'''withElement:''' The other [[element]] you wish the first entity to collide with&lt;br /&gt;
*'''enabled:''' A boolean to indicate whether elements should be able to collide with eachother (''true'') or not (''false'')&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the collisions were set succesfully, ''false'' otherwise.&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;
&lt;br /&gt;
function ghostmode_on()&lt;br /&gt;
	local localPlayer = getLocalPlayer() -- Getting the Local Player&lt;br /&gt;
	local v = getPedOccupiedVehicle(localPlayer) -- Get her's Vehicle ID&lt;br /&gt;
	for index,vehicle in ipairs(getElementsByType(&amp;quot;vehicle&amp;quot;)) do --LOOP through all Vehicles&lt;br /&gt;
		setElementCollidableWith(vehicle, v, false) -- Set the Collison off with the Other vehicles.&lt;br /&gt;
	end&lt;br /&gt;
	outputChatBox(&amp;quot;You are now a Ghost :P&amp;quot;,thePlayer)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;ghostmode&amp;quot;, ghostmode_on) -- Add the /ghostmode Command.&lt;br /&gt;
&lt;br /&gt;
&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 element functions}}&lt;/div&gt;</summary>
		<author><name>Funny</name></author>
	</entry>
</feed>