<?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=Prime</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=Prime"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Prime"/>
	<updated>2026-05-06T18:51:36Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SecondsToTimeDesc&amp;diff=38557</id>
		<title>SecondsToTimeDesc</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SecondsToTimeDesc&amp;diff=38557"/>
		<updated>2014-01-19T13:14:21Z</updated>

		<summary type="html">&lt;p&gt;Prime: Undo revision 38556 by Prime (talk)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
{{Needs_Example}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function converts plain seconds-integer into a user-friendly time description.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string secondsToTimeDesc(int seconds)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''seconds''': The integer of seconds to convert into a user-friendly description.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a user-friendly-description, or an empty string if the seconds were invalid/negative.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Function source&amp;quot; class=&amp;quot;both&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;
function secondsToTimeDesc( seconds )&lt;br /&gt;
	if seconds then&lt;br /&gt;
		local days = 0&lt;br /&gt;
		local hours = 0&lt;br /&gt;
		local minutes = 0&lt;br /&gt;
		local secs = 0&lt;br /&gt;
		local theseconds = seconds&lt;br /&gt;
		if theseconds &amp;gt;= 60*60*24 then&lt;br /&gt;
			days = math.floor(theseconds / (60*60*24))&lt;br /&gt;
			theseconds = theseconds - ((60*60*24)*days)&lt;br /&gt;
		end&lt;br /&gt;
		if theseconds &amp;gt;= 60*60 then&lt;br /&gt;
			hours = math.floor(theseconds / (60*60))&lt;br /&gt;
			theseconds = theseconds - ((60*60)*hours)&lt;br /&gt;
		end&lt;br /&gt;
		if theseconds &amp;gt;= 60 then&lt;br /&gt;
			minutes = math.floor(theseconds / (60))&lt;br /&gt;
			theseconds = theseconds - ((60)*minutes)&lt;br /&gt;
		end&lt;br /&gt;
		if theseconds &amp;gt;= 1 then&lt;br /&gt;
			secs = theseconds&lt;br /&gt;
			theseconds = theseconds - theseconds&lt;br /&gt;
		end&lt;br /&gt;
		local results = {}&lt;br /&gt;
		if days &amp;gt; 1 then table.insert(results, days..&amp;quot; days&amp;quot;) end&lt;br /&gt;
		if days == 1 then table.insert(results, days..&amp;quot; day&amp;quot;) end&lt;br /&gt;
		if hours &amp;gt; 1 then table.insert(results, hours..&amp;quot; hours&amp;quot;) end&lt;br /&gt;
		if hours == 1 then table.insert(results, hours..&amp;quot; hour&amp;quot;) end&lt;br /&gt;
		if minutes &amp;gt; 1 then table.insert(results, minutes..&amp;quot; minutes&amp;quot;) end&lt;br /&gt;
		if minutes == 1 then table.insert(results, minutes..&amp;quot; minute&amp;quot;) end&lt;br /&gt;
		if secs &amp;gt; 1 then table.insert(results, secs..&amp;quot; seconds&amp;quot;) end&lt;br /&gt;
		if secs == 1 then table.insert(results, secs..&amp;quot; second&amp;quot;) end&lt;br /&gt;
		if seconds == 0 then table.insert(results, &amp;quot;0 seconds&amp;quot;) end&lt;br /&gt;
		return table.concat(results, &amp;quot;, &amp;quot;):reverse():gsub((&amp;quot;, &amp;quot;):reverse(), (&amp;quot; and &amp;quot;):reverse(), 1):reverse() --Replace last &amp;quot;, &amp;quot; with an &amp;quot; and &amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;quot;&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
Author: MrTasty&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
Example required&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SecondsToTimeDesc&amp;diff=38556</id>
		<title>SecondsToTimeDesc</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SecondsToTimeDesc&amp;diff=38556"/>
		<updated>2014-01-19T13:13:47Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function converts plain seconds-integer into a user-friendly time description.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string secondsToTimeDesc(int seconds)&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''seconds''': The integer of seconds to convert into a user-friendly description.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a user-friendly-description, or an empty string if the seconds were invalid/negative.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Function source&amp;quot; class=&amp;quot;both&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;
function secondsToTimeDesc( seconds )&lt;br /&gt;
	if seconds then&lt;br /&gt;
		local days = 0&lt;br /&gt;
		local hours = 0&lt;br /&gt;
		local minutes = 0&lt;br /&gt;
		local secs = 0&lt;br /&gt;
		local theseconds = seconds&lt;br /&gt;
		if theseconds &amp;gt;= 60*60*24 then&lt;br /&gt;
			days = math.floor(theseconds / (60*60*24))&lt;br /&gt;
			theseconds = theseconds - ((60*60*24)*days)&lt;br /&gt;
		end&lt;br /&gt;
		if theseconds &amp;gt;= 60*60 then&lt;br /&gt;
			hours = math.floor(theseconds / (60*60))&lt;br /&gt;
			theseconds = theseconds - ((60*60)*hours)&lt;br /&gt;
		end&lt;br /&gt;
		if theseconds &amp;gt;= 60 then&lt;br /&gt;
			minutes = math.floor(theseconds / (60))&lt;br /&gt;
			theseconds = theseconds - ((60)*minutes)&lt;br /&gt;
		end&lt;br /&gt;
		if theseconds &amp;gt;= 1 then&lt;br /&gt;
			secs = theseconds&lt;br /&gt;
			theseconds = theseconds - theseconds&lt;br /&gt;
		end&lt;br /&gt;
		local results = {}&lt;br /&gt;
		if days &amp;gt; 1 then table.insert(results, days..&amp;quot; days&amp;quot;) end&lt;br /&gt;
		if days == 1 then table.insert(results, days..&amp;quot; day&amp;quot;) end&lt;br /&gt;
		if hours &amp;gt; 1 then table.insert(results, hours..&amp;quot; hours&amp;quot;) end&lt;br /&gt;
		if hours == 1 then table.insert(results, hours..&amp;quot; hour&amp;quot;) end&lt;br /&gt;
		if minutes &amp;gt; 1 then table.insert(results, minutes..&amp;quot; minutes&amp;quot;) end&lt;br /&gt;
		if minutes == 1 then table.insert(results, minutes..&amp;quot; minute&amp;quot;) end&lt;br /&gt;
		if secs &amp;gt; 1 then table.insert(results, secs..&amp;quot; seconds&amp;quot;) end&lt;br /&gt;
		if secs == 1 then table.insert(results, secs..&amp;quot; second&amp;quot;) end&lt;br /&gt;
		if seconds == 0 then table.insert(results, &amp;quot;0 seconds&amp;quot;) end&lt;br /&gt;
		return table.concat(results, &amp;quot;, &amp;quot;):reverse():gsub((&amp;quot;, &amp;quot;):reverse(), (&amp;quot; and &amp;quot;):reverse(), 1):reverse() --Replace last &amp;quot;, &amp;quot; with an &amp;quot; and &amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;quot;&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
Author: MrTasty&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
Example required&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IT/getProjectileForce&amp;diff=38527</id>
		<title>IT/getProjectileForce</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IT/getProjectileForce&amp;diff=38527"/>
		<updated>2014-01-18T18:55:09Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{IT/MainP}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{IT/Funzioni client}}&lt;br /&gt;
Questa funzione restituisce la forza del proiettile specificato.&lt;br /&gt;
&lt;br /&gt;
==Sintassi==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float getProjectileForce ( projectile theProjectile )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments==&lt;br /&gt;
*'''theProjectile:''' L'elemento [[IT/Elemento/Proiettile| proiettile]] la quale forza si vuole recuperare.&lt;br /&gt;
&lt;br /&gt;
==Valori restituiti==&lt;br /&gt;
Restituisce un [[IT/Float|float]] in caso di successo, altrimenti restituisce ''false''.&lt;br /&gt;
&lt;br /&gt;
==Esempio==&lt;br /&gt;
'''Example 1:''' This example would outputs the force of the projectile on 1-100 scale. This function just works with projectiles which you throw so just grenades, satchel charge etc&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientProjectileCreation&amp;quot;, getRootElement(),&lt;br /&gt;
--The source of this event is the projectile that was created.&lt;br /&gt;
function ()&lt;br /&gt;
    local getForce = getProjectileForce(source)&lt;br /&gt;
    outputChatBox(getForce*100) -- outputs the force of the projectile on 1-100 scale&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Vedere anche==&lt;br /&gt;
{{IT/Client projectile functions}}&lt;br /&gt;
[[en:getProjectileForce]]&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IT/getProjectileForce&amp;diff=38526</id>
		<title>IT/getProjectileForce</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IT/getProjectileForce&amp;diff=38526"/>
		<updated>2014-01-18T18:55:01Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{IT/MainP}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{IT/Funzioni client}}&lt;br /&gt;
Questa funzione restituisce la forza del proiettile specificato.&lt;br /&gt;
&lt;br /&gt;
==Sintassi==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float getProjectileForce ( projectile theProjectile )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments==&lt;br /&gt;
*'''theProjectile:''' L'elemento [[IT/Elemento/Proiettile| proiettile]] la quale forza si vuole recuperare.&lt;br /&gt;
&lt;br /&gt;
==Valori restituiti==&lt;br /&gt;
Restituisce un [[IT/Float|float]] in caso di successo, altrimenti restituisce ''false''.&lt;br /&gt;
&lt;br /&gt;
==Esempio==&lt;br /&gt;
==Example== &lt;br /&gt;
'''Example 1:''' This example would outputs the force of the projectile on 1-100 scale. This function just works with projectiles which you throw so just grenades, satchel charge etc&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientProjectileCreation&amp;quot;, getRootElement(),&lt;br /&gt;
--The source of this event is the projectile that was created.&lt;br /&gt;
function ()&lt;br /&gt;
    local getForce = getProjectileForce(source)&lt;br /&gt;
    outputChatBox(getForce*100) -- outputs the force of the projectile on 1-100 scale&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Vedere anche==&lt;br /&gt;
{{IT/Client projectile functions}}&lt;br /&gt;
[[en:getProjectileForce]]&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IT/getProjectileCreator&amp;diff=38525</id>
		<title>IT/getProjectileCreator</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IT/getProjectileCreator&amp;diff=38525"/>
		<updated>2014-01-18T18:54:05Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{IT/MainP}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{IT/Funzioni client}}&lt;br /&gt;
Questa funzione restituisce il creatore di uno specifico proiettile.&lt;br /&gt;
&lt;br /&gt;
==Sintassi==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
element getProjectileCreator ( projectile theProjectile )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Argomenti richiesti==&lt;br /&gt;
*'''theProjectile:''' L'elemento [[IT/Elemento/Proiettile| proiettile]] del creatore che si vuole recuperare.&lt;br /&gt;
&lt;br /&gt;
==Valori restituiti==&lt;br /&gt;
Restituisce l'elemento che ha creato il proiettile in caso di successo, altrimenti restituisce ''false'' .&lt;br /&gt;
&lt;br /&gt;
==Esempio==&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;
This example will output a message in the chatbox saying who created&lt;br /&gt;
the projectile.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onClientProjectileCreation&amp;quot;, root, function(projectile)&lt;br /&gt;
    local creator = getProjectileCreator(projectile)&lt;br /&gt;
    if (getElementType(creator) == &amp;quot;player&amp;quot;) then&lt;br /&gt;
        local pName = getPlayerName(creator)&lt;br /&gt;
	local projectileID = getProjectileType(projectile)&lt;br /&gt;
        outputChatBox(pName..&amp;quot; created a projectile! (ID: &amp;quot;..projectileID..&amp;quot;)&amp;quot;, 255, 200, 0, false)&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;
==Vedere anche==&lt;br /&gt;
{{IT/Client projectile functions}}&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsElementDoubleSided&amp;diff=38524</id>
		<title>IsElementDoubleSided</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsElementDoubleSided&amp;diff=38524"/>
		<updated>2014-01-18T18:52:02Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server client function}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function checks whether an element is double-sided as set by [[setElementDoubleSided]] or not.&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 isElementDoubleSided ( element theElement )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''theElement:''' The element in which you'd like to check the double-sidedness of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the '''theElement''' is double-sided, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example checks if the object created is breakable and if it is then breaks it.&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;createObj&amp;quot;,&lt;br /&gt;
function(plr, command, id)&lt;br /&gt;
    local x, y, z = getElementPosition(plr)&lt;br /&gt;
    local object = createObject (id, x, y, z)&lt;br /&gt;
    if (isElementDoubleSided(object)) then  -- checks if it is double sided or not&lt;br /&gt;
       outputChatBox(&amp;quot;The object is double sided&amp;quot;, plr)&lt;br /&gt;
    else&lt;br /&gt;
       outputChatBox(&amp;quot;The object is not double sided&amp;quot;, plr)&lt;br /&gt;
    end&lt;br /&gt;
end&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;
{{Element functions}}&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RU/getBanUsername&amp;diff=38523</id>
		<title>RU/getBanUsername</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RU/getBanUsername&amp;diff=38523"/>
		<updated>2014-01-18T18:45:31Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Translate}}&lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function will return the username of the specified [[ban]] pointer.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string getBanUsername ( ban theBan )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theBan:''' The [[ban]] in which you wish to retrieve the username of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''string'' of the username if everything was successful, ''false'' if invalid arguments are specified if there was no username specified for the [[ban]].&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;listban&amp;quot;,&lt;br /&gt;
function()&lt;br /&gt;
    local allBans = getBans() --get all the bans&lt;br /&gt;
    for i,v in ipairs(bans)do&lt;br /&gt;
        local nick = getBanNick(v)&lt;br /&gt;
        local username = getBanUsername(v) -- gets the username&lt;br /&gt;
        outputChatBox(&amp;quot;Ban #&amp;quot;.. i ..&amp;quot;: &amp;quot;..nick..&amp;quot; . Username: &amp;quot;..username , source, 255, 0, 0) -- lists all the ban&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{RU/Admin functions}}&lt;br /&gt;
[[en:getBanUsername]]&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RU/getBanSerial&amp;diff=38522</id>
		<title>RU/getBanSerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RU/getBanSerial&amp;diff=38522"/>
		<updated>2014-01-18T18:44:25Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Translate}}&lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function will return the [[serial]] of the specified [[ban]] pointer.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string getBanSerial ( ban theBan )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theBan:''' The [[ban]] you want to retrieve the serial of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''string'' of the serial if everything was successful, ''false'' if invalid arguments are specified or if there was no serial specified for the [[ban]].&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;listban&amp;quot;,&lt;br /&gt;
function()&lt;br /&gt;
    local allBans = getBans() --get all the bans&lt;br /&gt;
    for i,v in ipairs(bans)do&lt;br /&gt;
        local nick = getBanNick(v)&lt;br /&gt;
        local serial= getBanSerial(v) -- gets the serial&lt;br /&gt;
        outputChatBox(&amp;quot;Ban #&amp;quot;.. i ..&amp;quot;: &amp;quot;..nick..&amp;quot; . Serial &amp;quot;..serial, source, 255, 0, 0) -- lists all the ban&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{RU/Admin functions}}&lt;br /&gt;
[[en:getBanSerial]]&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RU/getBanSerial&amp;diff=38521</id>
		<title>RU/getBanSerial</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RU/getBanSerial&amp;diff=38521"/>
		<updated>2014-01-18T18:44:13Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Translate}}&lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function will return the [[serial]] of the specified [[ban]] pointer.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string getBanSerial ( ban theBan )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theBan:''' The [[ban]] you want to retrieve the serial of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''string'' of the serial if everything was successful, ''false'' if invalid arguments are specified or if there was no serial specified for the [[ban]].&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example lists all the ban when someone types /listban. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;listban&amp;quot;,&lt;br /&gt;
function()&lt;br /&gt;
    local allBans = getBans() --get all the bans&lt;br /&gt;
    for i,v in ipairs(bans)do&lt;br /&gt;
        local nick = getBanNick(v)&lt;br /&gt;
        local serial= getBanSerial(v) -- gets the serial&lt;br /&gt;
        outputChatBox(&amp;quot;Ban #&amp;quot;.. i ..&amp;quot;: &amp;quot;..nick..&amp;quot; . Serial &amp;quot;..serial, source, 255, 0, 0) -- lists all the ban&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{RU/Admin functions}}&lt;br /&gt;
[[en:getBanSerial]]&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RU/getBanIP&amp;diff=38520</id>
		<title>RU/getBanIP</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RU/getBanIP&amp;diff=38520"/>
		<updated>2014-01-18T18:43:01Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Translate}}&lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function will return the IP of the specified [[ban]] pointer.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
строка getBanIP ( ban theBan )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theBan:''' The [[ban]] который вы хотите проверить на IP&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Возвращаем ''string'' IP если все было успешно, ''false'' если не правильный аргумент или IP [[ban]].&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;listban&amp;quot;,&lt;br /&gt;
function()&lt;br /&gt;
    local allBans = getBans() --get all the bans&lt;br /&gt;
    for i,v in ipairs(bans)do&lt;br /&gt;
        local nick = getBanNick(v)&lt;br /&gt;
        local IP= getBanIP(v) -- gets the IP&lt;br /&gt;
        outputChatBox(&amp;quot;Ban #&amp;quot;.. i ..&amp;quot;: &amp;quot;..nick..&amp;quot; . IP: &amp;quot;..IP, source, 255, 0, 0) -- lists all the ban&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{RU/Admin functions}}&lt;br /&gt;
[[en:getBanIP]]&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RU/getUnbanTime&amp;diff=38519</id>
		<title>RU/getUnbanTime</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RU/getUnbanTime&amp;diff=38519"/>
		<updated>2014-01-18T18:40:14Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Translate}}&lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function will return the unbanning time of the specified [[ban]] pointer in '''seconds'''.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int getUnbanTime ( ban theBan )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theBan:''' The [[ban]] in which you wish to retrieve the unban time of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
* Returns an integer of the unbanning time in the format of seconds from the year 1970.  Use in conjunction with [[getRealTime]] in order to retrieve detailed information.&lt;br /&gt;
* Returns '''false''' if invalid arguments are specified or if there was no unbanning time specified for the [[ban]].&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example lists all the ban when someone types /listban. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;listban&amp;quot;,&lt;br /&gt;
function()&lt;br /&gt;
    local allBans = getBans() --get all the bans&lt;br /&gt;
    for i,v in ipairs(bans)do&lt;br /&gt;
        local nick = getBanNick(v)&lt;br /&gt;
        local unbanTime= getUnbanTime(v) -- time to get unban&lt;br /&gt;
        outputChatBox(&amp;quot;Ban #&amp;quot;.. i ..&amp;quot;: &amp;quot;..nick..&amp;quot; . Time to get unban &amp;quot;..unbanTime, source, 255, 0, 0) -- lists all the ban&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{RU/Admin functions}}&lt;br /&gt;
[[en:getUnbanTime]]&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RU/addBan&amp;diff=38518</id>
		<title>RU/addBan</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RU/addBan&amp;diff=38518"/>
		<updated>2014-01-18T18:32:33Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
Эта функция добавляет в бан лист определенный IP/username/serial.&lt;br /&gt;
&lt;br /&gt;
==Синтаксис== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
ban addBan ( [ string IP, string Username, string Serial, player responsibleElement, string reason, int seconds = 0 ] )         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
'''Note:''' Одно из трех: IP, Username или Serial должно быть указано.&lt;br /&gt;
&lt;br /&gt;
===Необходимые аргументы=== &lt;br /&gt;
*'''IP:''' IP-адрес который необходимо забанить. Если вы не хотите банить по IP, поставьте ''nil''.&lt;br /&gt;
'''или'''&lt;br /&gt;
*'''Username:''' Имя пользователя которое необходимо забанить. Если вы не хотите банить по имени пользователя, поставьте ''nil''.&lt;br /&gt;
'''или'''&lt;br /&gt;
*'''Serial:''' Серийный номер который необходимо забанить. Если вы не хотите банить по серийному номеру, поставьте ''nil''.&lt;br /&gt;
''' или любая их комбинация.'''&lt;br /&gt;
&lt;br /&gt;
===Необязательные аргументы=== &lt;br /&gt;
{{RU/OptionalArg}} &lt;br /&gt;
*'''responsibleElement:''' Элемент который отвечает за бан игрока. Это может быть игрок или корневой элемент ([[getRootElement]]()).&lt;br /&gt;
*'''reason:''' Причина по которой IP/username/serial будут забанены.&lt;br /&gt;
*'''seconds:''' Время в течение которого игрок будет забанен. Если 0 то бан будет бессрочным(вечным).&lt;br /&gt;
&lt;br /&gt;
===Возвращает===&lt;br /&gt;
Возвращает ''true'' если IP/username/serial были успешно забанены, ''false'' если введены неверные аргументы.&lt;br /&gt;
&lt;br /&gt;
==Пример==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
----Если человек умерает,баним его по IP:&lt;br /&gt;
function AddBanFunction ()&lt;br /&gt;
addBan (getPlayerIP ( source ))&lt;br /&gt;
end&lt;br /&gt;
addEventHandler (&amp;quot;onPlayerWasted&amp;quot;,getRootElement(),AddBanFunction )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
----Если человек умерает,баним его по Serial:&lt;br /&gt;
function AddBanFunction ()&lt;br /&gt;
addBan (getPlayerSerial ( source ))&lt;br /&gt;
end&lt;br /&gt;
addEventHandler (&amp;quot;onPlayerWasted&amp;quot;,getRootElement(),AddBanFunction )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==См. также==&lt;br /&gt;
{{RU/Admin functions}}&lt;br /&gt;
[[en:addBan]]&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RU/getBanAdmin&amp;diff=38517</id>
		<title>RU/getBanAdmin</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RU/getBanAdmin&amp;diff=38517"/>
		<updated>2014-01-18T18:31:59Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Translate}}&lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function will return the responsible admin (nickname of the admin) of the specified [[ban]] pointer.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
строка getBanAdmin ( ban theBan )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theBan:''' [[ban]] который вы хотите проверить на то,админ ли забанил человека или нет.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Возвращает ''string'' админа,если все было успешно, ''false'' если не правильный аргумент или параметр [[ban]].&lt;br /&gt;
&lt;br /&gt;
==Пример==&lt;br /&gt;
'''Example 1:''' This example outputs the name of the player, the admin who banned the player and the reason.  &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function outputBan(ban)&lt;br /&gt;
    local plr = getBanNick(ban) -- the player who got banned&lt;br /&gt;
    local admin = getBanAdmin(ban) -- admin who banned the player&lt;br /&gt;
    local reason = getBanReason(ban) -- reason for banning&lt;br /&gt;
    if (plr and admin and reason) then&lt;br /&gt;
        outputChatBox(plr..&amp;quot; has been banned by &amp;quot;..admin..&amp;quot; for &amp;quot;..reason, getRootElement(), 255, 0, 0) -- Outputs name of the player, admin and the reason for banning&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onBan&amp;quot;, getRootElement(), outputBan) -- When a player is banned trigger the outputBan function&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{RU/Admin functions}}&lt;br /&gt;
[[en:getBanAdmin]]&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RU/getBanNick&amp;diff=38516</id>
		<title>RU/getBanNick</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RU/getBanNick&amp;diff=38516"/>
		<updated>2014-01-18T18:31:13Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Translate}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function will return the nickname (nickname that the player had when he was banned) of the specified [[ban]] 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;
string getBanNick ( ban theBan )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theBan:''' The [[ban]] element which nickname you want to return.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''string'' of the nickname if everything was successfull, ''false'' if invalid arguments are specified if there was no nickname specified for the [[ban]] element.&lt;br /&gt;
&lt;br /&gt;
==Пример==&lt;br /&gt;
'''Example 1:''' This example outputs the name of the player, the admin who banned the player and the reason.  &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function outputBan(ban)&lt;br /&gt;
    local plr = getBanNick(ban) -- the player who got banned&lt;br /&gt;
    local admin = getBanAdmin(ban) -- admin who banned the player&lt;br /&gt;
    local reason = getBanReason(ban) -- reason for banning&lt;br /&gt;
    if (plr and admin and reason) then&lt;br /&gt;
        outputChatBox(plr..&amp;quot; has been banned by &amp;quot;..admin..&amp;quot; for &amp;quot;..reason, getRootElement(), 255, 0, 0) -- Outputs name of the player, admin and the reason for banning&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onBan&amp;quot;, getRootElement(), outputBan) -- When a player is banned trigger the outputBan function&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{RU/Admin functions}}&lt;br /&gt;
[[en:getBanNick]]&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RU/GetBanNick&amp;diff=38515</id>
		<title>RU/GetBanNick</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RU/GetBanNick&amp;diff=38515"/>
		<updated>2014-01-18T18:30:38Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Translate}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function will return the nickname (nickname that the player had when he was banned) of the specified [[ban]] 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;
string getBanNick ( ban theBan )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theBan:''' The [[ban]] element which nickname you want to return.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''string'' of the nickname if everything was successfull, ''false'' if invalid arguments are specified if there was no nickname specified for the [[ban]] element.&lt;br /&gt;
&lt;br /&gt;
==Пример==&lt;br /&gt;
'''Example 1:''' This example outputs the name of the player, the admin who banned the player and the reason.  &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function outputBan(ban)&lt;br /&gt;
    local plr = getBanNick(ban) -- the player who got banned&lt;br /&gt;
    local admin = getBanAdmin(ban) -- admin who banned the player&lt;br /&gt;
    local reason = getBanReason(ban) -- reason for banning&lt;br /&gt;
    if (plr and admin and reason) then&lt;br /&gt;
        outputChatBox(plr..&amp;quot; has been banned by &amp;quot;..admin..&amp;quot; for &amp;quot;..reason, getRootElement(), 255, 0, 0) -- Outputs name of the player, admin and the reason for banning&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onBan&amp;quot;, getRootElement(), outputBan) -- When a player is banned trigger the outputBan function&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Admin functions}}&lt;br /&gt;
[[en:getBanNick]]&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RU/getBanReason&amp;diff=38514</id>
		<title>RU/getBanReason</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RU/getBanReason&amp;diff=38514"/>
		<updated>2014-01-18T18:28:07Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
Эта функция возвращает причину, по которй был забанен игрок.&lt;br /&gt;
&lt;br /&gt;
==Синтакс== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string getBanReason ( ban theBan )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Обязазтельные Аргументы=== &lt;br /&gt;
*'''theBan:''' [[Ban]], у которого вы хотите узнать причину.&lt;br /&gt;
&lt;br /&gt;
===Возвращения===&lt;br /&gt;
Возвращает строку с причиной если всё успешно, ''false'' если даны неправильные аргументы или при бане не была указана причина.&lt;br /&gt;
&lt;br /&gt;
==Пример==&lt;br /&gt;
'''Example 1:''' This example outputs the name of the player, the admin who banned the player and the reason.  &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function outputBan(ban)&lt;br /&gt;
    local plr = getBanNick(ban) -- the player who got banned&lt;br /&gt;
    local admin = getBanAdmin(ban) -- admin who banned the player&lt;br /&gt;
    local reason = getBanReason(ban) -- reason for banning&lt;br /&gt;
    if (plr and admin and reason) then&lt;br /&gt;
        outputChatBox(plr..&amp;quot; has been banned by &amp;quot;..admin..&amp;quot; for &amp;quot;..reason, getRootElement(), 255, 0, 0) -- Outputs name of the player, admin and the reason for banning&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onBan&amp;quot;, getRootElement(), outputBan) -- When a player is banned trigger the outputBan function&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Смотрите также==&lt;br /&gt;
{{RU/Admin functions}}&lt;br /&gt;
[[en:getBanReason]]&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RU/getBans&amp;diff=38513</id>
		<title>RU/getBans</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RU/getBans&amp;diff=38513"/>
		<updated>2014-01-18T18:22:21Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Translate}}&lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function will return a table over all the [[ban]] values in the server.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
table getBans ()&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a [[table]] over all the [[ban]] pointers.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
'''Example 1:''' This example lists all the ban when someone types /listban. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;listban&amp;quot;,&lt;br /&gt;
function()&lt;br /&gt;
    local allBans = getBans() --get all the bans&lt;br /&gt;
    for i,v in ipairs(bans)do&lt;br /&gt;
        local nick = getBanNick(v)&lt;br /&gt;
        outputChatBox(&amp;quot;Ban #&amp;quot;.. i ..&amp;quot;: &amp;quot;..nick, source, 255, 0, 0) -- lists all the ban&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{RU/Admin functions}}&lt;br /&gt;
[[en:getBans]]&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RU/removeBan&amp;diff=38512</id>
		<title>RU/removeBan</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RU/removeBan&amp;diff=38512"/>
		<updated>2014-01-18T18:18:19Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
Эта функция удаляет [[ban]].&lt;br /&gt;
&lt;br /&gt;
==Синтакс== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool removeBan ( ban theBan, [ player responsibleElement ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Обязательные Аргументы=== &lt;br /&gt;
*'''theBan:''' [[Ban]], который нужно удалить.&lt;br /&gt;
&lt;br /&gt;
===Необязательные Аргументы=== &lt;br /&gt;
{{RU/OptionalArg}} &lt;br /&gt;
*'''responsibleElement:''' Элемент отвечающий за разбанивание игрока. Это может быть игрок или корневой элемент ([[getRootElement]]()).&lt;br /&gt;
&lt;br /&gt;
===Возвращения===&lt;br /&gt;
Возвращает ''true'' если [[ban]] удалён, ''false'' если указаны неверные аргументы.&lt;br /&gt;
&lt;br /&gt;
==Пример==&lt;br /&gt;
'''Example 1:''' This example removes all the ban when the resource starts&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onResourceStart&amp;quot;,resourceRoot,&lt;br /&gt;
function()&lt;br /&gt;
    local allBans = getBans() --get all the bans&lt;br /&gt;
    for i,v in ipairs(bans)do&lt;br /&gt;
        local nick = getBanNick(v)&lt;br /&gt;
        removeBan(v) -- removes the ban&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Смотрите также==&lt;br /&gt;
{{RU/Admin functions}}&lt;br /&gt;
[[en:removeBan]]&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetVehicleComponentVisible&amp;diff=38511</id>
		<title>SetVehicleComponentVisible</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetVehicleComponentVisible&amp;diff=38511"/>
		<updated>2014-01-18T18:12:15Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
&lt;br /&gt;
{{New feature/item|4.0140|1.3.1|4715|&lt;br /&gt;
This function sets component visibility for [[vehicle]].&lt;br /&gt;
}}&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 setVehicleComponentVisible ( vehicle theVehicle, string theComponent, bool visible )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The [[vehicle]] you wish to set component visibility of.&lt;br /&gt;
*'''theComponent:''' A vehicle component (this is the frame name from the model file of the component you wish to modify)&lt;br /&gt;
*'''visible:''' a ''bool'' which determines if the component should be visible&lt;br /&gt;
&lt;br /&gt;
===Returns=== &lt;br /&gt;
Returns a ''bool'' indicating the visible state of the component.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
'''Example 1:''' This example gets all the component and then hides them when you get into a vehicle.  &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onClientVehicleEnter&amp;quot;, getRootElement(),&lt;br /&gt;
    function()&lt;br /&gt;
        local theVeh = getPedOccupiedVehicle(localPlayer)&lt;br /&gt;
        local getComponent = getVehicleComponents(theVeh) -- returns table with all the components of the vehicle&lt;br /&gt;
        if (theVeh) then&lt;br /&gt;
            for k in pairs (getComponent) do&lt;br /&gt;
                setVehicleComponentVisible(theVeh, k, false) -- hides the component&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetVehicleComponentRotation&amp;diff=38510</id>
		<title>SetVehicleComponentRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetVehicleComponentRotation&amp;diff=38510"/>
		<updated>2014-01-18T18:07:36Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
&lt;br /&gt;
{{New feature/item|4.0140|1.3.1|4715|&lt;br /&gt;
This function set component rotation for [[vehicle]].&lt;br /&gt;
}}&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 setVehicleComponentRotation ( vehicle theVehicle, string theComponent, float rotX, float rotY, float rotZ )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The [[vehicle]] you wish to set component rotation.&lt;br /&gt;
*'''theComponent:''' A vehicle component (this is the frame name from the model file of the component you wish to modify) &lt;br /&gt;
*'''rotX:''' The component's rotation around the x axis in degrees.&lt;br /&gt;
*'''rotY:''' The component's rotation around the y axis in degrees.&lt;br /&gt;
*'''rotZ:''' The component's rotation around the z axis in degrees.&lt;br /&gt;
&lt;br /&gt;
===Returns=== &lt;br /&gt;
Return ''true'' if component rotation was set successfully, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
'''Example 1:''' This example would change the roatation of the component when the player enters a vehicle.  &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onClientVehicleEnter&amp;quot;, getRootElement(),&lt;br /&gt;
    function()&lt;br /&gt;
        local theVeh = getPedOccupiedVehicle(localPlayer)&lt;br /&gt;
        local getComponent = getVehicleComponents(theVeh) -- returns table with all the components of the vehicle&lt;br /&gt;
        if (theVeh) then&lt;br /&gt;
	    for k in pairs (getComponent) do&lt;br /&gt;
	        local rx, ry, rz = getVehicleComponentRotation(theVeh, k) --get the rotation of the component&lt;br /&gt;
                setVehicleComponentRotation(theVeh, k, rx+10, ry+10, rz+10) -- increases by 10 unit&lt;br /&gt;
	    end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=ResetVehicleComponentRotation&amp;diff=38509</id>
		<title>ResetVehicleComponentRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=ResetVehicleComponentRotation&amp;diff=38509"/>
		<updated>2014-01-18T18:04:29Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
&lt;br /&gt;
{{New feature/item|4.0140|1.3.1|4715|&lt;br /&gt;
This function reset to default component rotation for [[vehicle]].&lt;br /&gt;
}}&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 resetVehicleComponentRotation ( vehicle theVehicle, string theComponent )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The [[vehicle]] you wish to reset component rotation.&lt;br /&gt;
*'''theComponent:''' A vehicle component (this is the frame name from the model file of the component you wish to modify)&lt;br /&gt;
&lt;br /&gt;
===Returns=== &lt;br /&gt;
Returns ''true'' if the rotation of the component was reset, ''false'' otherwise.&lt;br /&gt;
==Example== &lt;br /&gt;
'''Example 1:''' This example would change the roatation of the component when the player enters a vehicle and resets it when you type /reset.  &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler(&amp;quot;onClientVehicleEnter&amp;quot;, getRootElement(),&lt;br /&gt;
    function()&lt;br /&gt;
        local theVeh = getPedOccupiedVehicle(localPlayer)&lt;br /&gt;
        local getComponent = getVehicleComponents(theVeh) -- returns table with all the components of the vehicle&lt;br /&gt;
        if (theVeh) then&lt;br /&gt;
	    for k in pairs (getComponent) do&lt;br /&gt;
                local rx, ry, rz = getVehicleComponentRotation(theVeh, k) --get the rotation of the component&lt;br /&gt;
		setVehicleComponentRotation(theVeh, k, rx+10, ry+10, rz+10) -- increases by 10 unit&lt;br /&gt;
	    end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
addCommandHandler(&amp;quot;reset&amp;quot;,&lt;br /&gt;
    function()&lt;br /&gt;
        local theVeh = getPedOccupiedVehicle(localPlayer)&lt;br /&gt;
        local getComponent = getVehicleComponents(theVeh) -- returns table with all the components of the vehicle&lt;br /&gt;
        if (theVeh) then&lt;br /&gt;
	    for k in pairs (getComponent) do&lt;br /&gt;
	       resetVehicleComponentRotation(theVeh, k) -- resets the rotation of the component&lt;br /&gt;
	    end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=ResetVehicleComponentPosition&amp;diff=38508</id>
		<title>ResetVehicleComponentPosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=ResetVehicleComponentPosition&amp;diff=38508"/>
		<updated>2014-01-18T18:01:46Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
&lt;br /&gt;
{{New feature/item|4.0140|1.3.1|4715|&lt;br /&gt;
This function reset to default component position for [[vehicle]].&lt;br /&gt;
}}&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 resetVehicleComponentPosition ( vehicle theVehicle, string theComponent )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The [[vehicle]] you wish to reset component position.&lt;br /&gt;
*'''theComponent:''' A vehicle component (this is the frame name from the model file of the component you wish to modify)&lt;br /&gt;
&lt;br /&gt;
===Returns=== &lt;br /&gt;
Returns ''true'' if the position of the component was reset, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
'''Example 1:''' This example would change the position of the component when the player enters a vehicle and resets it when you type /reset.  &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientVehicleEnter&amp;quot;, getRootElement(),&lt;br /&gt;
    function()&lt;br /&gt;
        local theVeh = getPedOccupiedVehicle(localPlayer)&lt;br /&gt;
        local getComponent = getVehicleComponents(theVeh) -- returns table with all the components of the vehicle&lt;br /&gt;
        if (theVeh) then&lt;br /&gt;
	    for k in pairs (getComponent) do&lt;br /&gt;
		local x, y, z = getVehicleComponentPosition(theVeh, k) --get the position of the component&lt;br /&gt;
                setVehicleComponentPosition(theVeh, k, x+1, y+1, z+1) -- increases by 1 unit&lt;br /&gt;
	    end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
addCommandHandler(&amp;quot;reset&amp;quot;,&lt;br /&gt;
    function()&lt;br /&gt;
        local theVeh = getPedOccupiedVehicle(localPlayer)&lt;br /&gt;
        local getComponent = getVehicleComponents(theVeh) -- returns table with all the components of the vehicle&lt;br /&gt;
        if (theVeh) then&lt;br /&gt;
	    for k in pairs (getComponent) do&lt;br /&gt;
                resetVehicleComponentPosition(theVeh, k) -- resets the position of the component&lt;br /&gt;
	    end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetVehicleComponentPosition&amp;diff=38507</id>
		<title>SetVehicleComponentPosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetVehicleComponentPosition&amp;diff=38507"/>
		<updated>2014-01-18T17:40:57Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
&lt;br /&gt;
{{New feature/item|4.0140|1.3.1|4715|&lt;br /&gt;
This function set component position for [[vehicle]].&lt;br /&gt;
}}&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 setVehicleComponentPosition ( vehicle theVehicle, string theComponent, float posX, float posY, float posZ )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The [[vehicle]] you wish to set component position.&lt;br /&gt;
*'''theComponent:''' A vehicle component (this is the frame name from the model file of the component you wish to modify)&lt;br /&gt;
*'''posX:''' The x position of this component from the center of the vehicle.&lt;br /&gt;
*'''posY:''' The y position of this component from the center of the vehicle.&lt;br /&gt;
*'''posZ:''' The z position of this component from the center of the vehicle.&lt;br /&gt;
&lt;br /&gt;
===Returns=== &lt;br /&gt;
Return ''true'' if component position was set successfully, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
'''Example 1:''' This example would set the position of the component. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;scp&amp;quot;, -- short for 'set component position'&lt;br /&gt;
    function()&lt;br /&gt;
        local theVeh = getPedOccupiedVehicle(localPlayer)&lt;br /&gt;
	local getComponent = getVehicleComponents(theVeh) -- returns table with all the components of the vehicle&lt;br /&gt;
        if (theVeh) then&lt;br /&gt;
            for k in pairs (getComponent) do&lt;br /&gt;
		local x, y, z = getVehicleComponentPosition(theVeh, k) --get the position of the component&lt;br /&gt;
                setVehicleComponentPosition(theVeh, k, x+1, y+1, z+1) -- increases by 1 unit&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RU/setWeaponAmmo&amp;diff=38506</id>
		<title>RU/setWeaponAmmo</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RU/setWeaponAmmo&amp;diff=38506"/>
		<updated>2014-01-18T17:28:53Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
Устанавливает количество патронов в оружии.&lt;br /&gt;
&lt;br /&gt;
==Синтакс== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool setWeaponAmmo ( player thePlayer, int weapon, int totalAmmo, [int ammoInClip = 0] )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Обязательные аргументы=== &lt;br /&gt;
*'''thePlayer:''' [[Player]], у которого вы хотите изменить количество патронов в оружии. &lt;br /&gt;
*'''weapon:''' ID оружия, в котором вы хотите изменить количество патронов. Смотрите [[weapon]] ID.&lt;br /&gt;
*'''totalAmmo:''' Общее количество патронов.&lt;br /&gt;
&lt;br /&gt;
===Необязательные аргументы=== &lt;br /&gt;
{{RU/OptionalArg}} &lt;br /&gt;
{{New feature|10|1.0|&lt;br /&gt;
*'''ammoInClip:''' Количество патронов в обойме.  Они могут быть взяты из главных патронов.  Если не задано или задано 0, то количество патронов в обойме остаётся прежним.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Возвращения==&lt;br /&gt;
Возвращает логическое значение ''true'' или ''false'', которые говорят успешно проведена операция или нет.&lt;br /&gt;
&lt;br /&gt;
==Пример==  &lt;br /&gt;
Этот пример даёт узи и 5000 патронов при подлючении игрока.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function setWeaponAndAmmo(player)&lt;br /&gt;
giveWeapon(player, 28)&lt;br /&gt;
setWeaponAmmo(player, 28, 5000)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onPlayerJoin&amp;quot;, getRootElement(), setWeaponAndAmmo)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Смотрите также==&lt;br /&gt;
{{RU/Weapon functions}}&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleComponentVisible&amp;diff=38505</id>
		<title>GetVehicleComponentVisible</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleComponentVisible&amp;diff=38505"/>
		<updated>2014-01-18T17:26:51Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
&lt;br /&gt;
{{New feature/item|4.0140|1.3.1|4715|&lt;br /&gt;
This function get component visibility for [[vehicle]].&lt;br /&gt;
}}&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 getVehicleComponentVisible ( vehicle theVehicle, string theComponent )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The [[vehicle]] you wish to get component visibility of.&lt;br /&gt;
*'''theComponent:''' A vehicle component (this is the frame name from the model file of the component you wish to modify)&lt;br /&gt;
&lt;br /&gt;
===Returns=== &lt;br /&gt;
Returns a ''bool'' indicating the visible state of the component.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
'''Example 1:''' This example would get the name and tells if the component is visible or not.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;icv&amp;quot;, -- short for 'is component visible'&lt;br /&gt;
    function()&lt;br /&gt;
        local theVeh = getPedOccupiedVehicle(localPlayer)&lt;br /&gt;
	local getComponent = getVehicleComponents(theVeh) -- returns table with all the components of the vehicle&lt;br /&gt;
        if (theVeh) then&lt;br /&gt;
            for k in pairs (getComponent) do&lt;br /&gt;
	        local isVisible = getVehicleComponentVisible(theVeh, k) -- gets if it is visible or not&lt;br /&gt;
		if (isVisible == true) then&lt;br /&gt;
		    outputChatBox(k..&amp;quot; is visible&amp;quot;)&lt;br /&gt;
		else&lt;br /&gt;
		    outputChatBox(k..&amp;quot; is not visible&amp;quot;)&lt;br /&gt;
		end   &lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleComponentRotation&amp;diff=38504</id>
		<title>GetVehicleComponentRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleComponentRotation&amp;diff=38504"/>
		<updated>2014-01-18T17:17:58Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
&lt;br /&gt;
{{New feature/item|4.0140|1.3.1|4715|&lt;br /&gt;
This function get component rotation for [[vehicle]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float, float, float getVehicleComponentRotation ( vehicle theVehicle, string theComponent )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The [[vehicle]] you wish to get component rotation.&lt;br /&gt;
*'''theComponent:''' A vehicle component (this is the frame name from the model file of the component you wish to modify)&lt;br /&gt;
&lt;br /&gt;
===Returns=== &lt;br /&gt;
Returns three ''floats'' indicating the rotation of the component, ''x'', ''y'' and ''z'' respectively.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
==Example== &lt;br /&gt;
'''Example 1:''' This example would get the name and the position of the components and output it in the chat.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;vcr&amp;quot;, -- short for 'vehicle component rotation'&lt;br /&gt;
    function()&lt;br /&gt;
        local theVeh = getPedOccupiedVehicle(localPlayer)&lt;br /&gt;
	local getComponent = getVehicleComponents(theVeh) -- returns table with all the components of the vehicle&lt;br /&gt;
        if (theVeh) then&lt;br /&gt;
            for k in pairs (getComponent) do&lt;br /&gt;
		local rx, ry, rz = getVehicleComponentRotation(theVeh, k)&lt;br /&gt;
                outputChatBox(&amp;quot;Rotation of &amp;quot;..k..&amp;quot; is &amp;quot;..rx..&amp;quot; &amp;quot;..ry..&amp;quot; &amp;quot;..rz)&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleComponentRotation&amp;diff=38503</id>
		<title>GetVehicleComponentRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleComponentRotation&amp;diff=38503"/>
		<updated>2014-01-18T17:17:40Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Needs_Example}}&lt;br /&gt;
&lt;br /&gt;
{{New feature/item|4.0140|1.3.1|4715|&lt;br /&gt;
This function get component rotation for [[vehicle]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float, float, float getVehicleComponentRotation ( vehicle theVehicle, string theComponent )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The [[vehicle]] you wish to get component rotation.&lt;br /&gt;
*'''theComponent:''' A vehicle component (this is the frame name from the model file of the component you wish to modify)&lt;br /&gt;
&lt;br /&gt;
===Returns=== &lt;br /&gt;
Returns three ''floats'' indicating the rotation of the component, ''x'', ''y'' and ''z'' respectively.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
==Example== &lt;br /&gt;
'''Example 1:''' This example would get the name and the position of the components and output it in the chat.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;vcr&amp;quot;, -- short for 'vehicle component rotation'&lt;br /&gt;
    function()&lt;br /&gt;
        local theVeh = getPedOccupiedVehicle(localPlayer)&lt;br /&gt;
	local getComponent = getVehicleComponents(theVeh) -- returns table with all the components of the vehicle&lt;br /&gt;
        if (theVeh) then&lt;br /&gt;
            for k in pairs (getComponent) do&lt;br /&gt;
		local rx, ry, rz = getVehicleComponentRotation(theVeh, k)&lt;br /&gt;
                outputChatBox(&amp;quot;Rotation of &amp;quot;..k..&amp;quot; is &amp;quot;..rx..&amp;quot; &amp;quot;..ry..&amp;quot; &amp;quot;..rz)&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleComponentPosition&amp;diff=38498</id>
		<title>GetVehicleComponentPosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleComponentPosition&amp;diff=38498"/>
		<updated>2014-01-18T17:12:28Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
&lt;br /&gt;
{{New feature/item|4.0140|1.3.1|4715|&lt;br /&gt;
This function get component position for [[vehicle]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float, float, float getVehicleComponentPosition ( vehicle theVehicle, string theComponent )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The [[vehicle]] you wish to get component position.&lt;br /&gt;
*'''theComponent:''' A vehicle component (this is the frame name from the model file of the component you wish to modify)&lt;br /&gt;
&lt;br /&gt;
===Returns=== &lt;br /&gt;
Returns three ''floats'' indicating the position of the component, ''x'', ''y'' and ''z'' respectively.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example gets the name and the position of the components and outputs it in the chat.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;vcp&amp;quot;, -- short for 'vehicle component position'&lt;br /&gt;
    function()&lt;br /&gt;
        local theVeh = getPedOccupiedVehicle(localPlayer)&lt;br /&gt;
	local getComponent = getVehicleComponents(theVeh) -- returns table with all the components of the vehicle&lt;br /&gt;
        if (theVeh) then&lt;br /&gt;
            for k in pairs (getComponent) do&lt;br /&gt;
		local x, y, z = getVehicleComponentPosition(theVeh, k)&lt;br /&gt;
                outputChatBox(&amp;quot;Position of &amp;quot;..k..&amp;quot; is&amp;quot;..x..&amp;quot; &amp;quot;..y..&amp;quot; &amp;quot;..z)&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleComponentPosition&amp;diff=38497</id>
		<title>GetVehicleComponentPosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleComponentPosition&amp;diff=38497"/>
		<updated>2014-01-18T17:10:13Z</updated>

		<summary type="html">&lt;p&gt;Prime: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
&lt;br /&gt;
{{New feature/item|4.0140|1.3.1|4715|&lt;br /&gt;
This function get component position for [[vehicle]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float, float, float getVehicleComponentPosition ( vehicle theVehicle, string theComponent )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The [[vehicle]] you wish to get component position.&lt;br /&gt;
*'''theComponent:''' A vehicle component (this is the frame name from the model file of the component you wish to modify)&lt;br /&gt;
&lt;br /&gt;
===Returns=== &lt;br /&gt;
Returns three ''floats'' indicating the position of the component, ''x'', ''y'' and ''z'' respectively.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
'''Example 1:''' This example gets the name and the position of the components and outputs it in the chat.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;vcp&amp;quot;, -- short for 'vehicle component position'&lt;br /&gt;
    function()&lt;br /&gt;
        local theVeh = getPedOccupiedVehicle(localPlayer)&lt;br /&gt;
	local getComponent = getVehicleComponents(theVeh) -- returns table with all the components of the vehicle&lt;br /&gt;
        if (theVeh) then&lt;br /&gt;
            for k in pairs (getComponent) do&lt;br /&gt;
		local x, y, z = getVehicleComponentPosition(theVeh, k)&lt;br /&gt;
                outputChatBox(&amp;quot;Position of &amp;quot;..k..&amp;quot; is&amp;quot;..x..&amp;quot; &amp;quot;..y..&amp;quot; &amp;quot;..z)&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleComponentPosition&amp;diff=38496</id>
		<title>GetVehicleComponentPosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleComponentPosition&amp;diff=38496"/>
		<updated>2014-01-18T17:09:23Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
&lt;br /&gt;
{{New feature/item|4.0140|1.3.1|4715|&lt;br /&gt;
This function get component position for [[vehicle]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float, float, float getVehicleComponentPosition ( vehicle theVehicle, string theComponent )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The [[vehicle]] you wish to get component position.&lt;br /&gt;
*'''theComponent:''' A vehicle component (this is the frame name from the model file of the component you wish to modify)&lt;br /&gt;
&lt;br /&gt;
===Returns=== &lt;br /&gt;
Returns three ''floats'' indicating the position of the component, ''x'', ''y'' and ''z'' respectively.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
'''Example 1:''' This example gets the name and the position of the components and outputs it in the chat.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;vcp&amp;quot;, -- short for 'vehicle component position'&lt;br /&gt;
    function()&lt;br /&gt;
        local theVeh = getPedOccupiedVehicle(localPlayer)&lt;br /&gt;
	local getComponent = getVehicleComponents(theVeh) -- returns table with all the components of the vehicle&lt;br /&gt;
        if (theVeh) then&lt;br /&gt;
            for k in pairs (getComponent) do&lt;br /&gt;
		local x, y, z = getVehicleComponentPosition(theVeh, k)&lt;br /&gt;
                outputChatBox(&amp;quot;Position of &amp;quot;..k..&amp;quot; is&amp;quot;..x..&amp;quot; &amp;quot;..y..&amp;quot; &amp;quot;..z)&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=BreakObject&amp;diff=38495</id>
		<title>BreakObject</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=BreakObject&amp;diff=38495"/>
		<updated>2014-01-18T16:50:07Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{client function}}&lt;br /&gt;
This function breaks a specific object.&lt;br /&gt;
Note: Only breakable objects can be broken.&lt;br /&gt;
&lt;br /&gt;
{{Note|This function does not support any kind of glass objects}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool breakObject ( object theObject )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theObject:''' An [[object]] element&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the object was successfully broken. ''false'' if the object is not breakable, or a wrong object was given.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example checks if the object created is breakable and if it is then breaks it.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;createObj&amp;quot;,&lt;br /&gt;
function(command, id)&lt;br /&gt;
    local x, y, z = getElementPosition(localPlayer)&lt;br /&gt;
    local object = createObject (id, x, y, z)&lt;br /&gt;
    if (id) then&lt;br /&gt;
        if isObjectBreakable(object) then&lt;br /&gt;
            breakObject(object)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_object_functions}}&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AR/getSoundFFTData&amp;diff=38494</id>
		<title>AR/getSoundFFTData</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AR/getSoundFFTData&amp;diff=38494"/>
		<updated>2014-01-18T16:37:51Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New feature/item|3.0130|1.3.0|4125|&lt;br /&gt;
This function gets the fast fourier transform data for an audio stream which is a table of floats representing the current audio frame.&lt;br /&gt;
This allows things like visualisations.&lt;br /&gt;
&lt;br /&gt;
a fast fourier transform generates a table of all the frequencies of the current audio frame which starts at the bass end of the spectrum to mids to highs in that order&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Should you have any problems there is an example resource located on the resource svn here:&lt;br /&gt;
[https://code.google.com/p/mtasa-resources/source/browse/#svn%2Ftrunk%2F%5Bgameplay%5D%2FVisualiser Visualiser]&lt;br /&gt;
&lt;br /&gt;
just type &amp;quot;startmusic mystreamurl&amp;quot; in your console and it will play on the cinema billboard near A51&lt;br /&gt;
{{New_feature|3.0139|1.3.2|&lt;br /&gt;
If the element is a player, this function will use the players voice.&lt;br /&gt;
}}&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getSoundFFTData ( element sound, int iSamples [, int iBands = 0 ] )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''sound:''' A sound element that is created using [[playSound]] or [[playSound3D]]. Streams are also supported&lt;br /&gt;
*'''iSamples:''' Allowed samples are 128, 256, 512, 1024, 2048, 4096, 8192 and 16384&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''iBands:''' Post processing option allows you to split the samples into the desired amount of bands or bars so if you only need 5 bars this saves a lot of cpu power compared to trying to do it in Lua&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a table of floats representing the current audio frame.&lt;br /&gt;
Returns false if the sound is not playing yet or hasn't buffered in the&lt;br /&gt;
case of streams.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;playsound&amp;quot;,&lt;br /&gt;
function () &lt;br /&gt;
    local sound  = playSound(&amp;quot;wasted.mp3&amp;quot;)&lt;br /&gt;
    local data = getSoundWaveData(sound, 512) -- returns table&lt;br /&gt;
    for i, v in pairs(data) do&lt;br /&gt;
        outputChatBox(v) -- outputs the float representing the current audio frame&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.2|Added player element to use a players voice}}&lt;br /&gt;
&lt;br /&gt;
==أنظر أيضاً==&lt;br /&gt;
{{AR/Audio_functions}}&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AR/getSoundFFTData&amp;diff=38493</id>
		<title>AR/getSoundFFTData</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AR/getSoundFFTData&amp;diff=38493"/>
		<updated>2014-01-18T16:37:25Z</updated>

		<summary type="html">&lt;p&gt;Prime: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Needs Example}}&lt;br /&gt;
{{New feature/item|3.0130|1.3.0|4125|&lt;br /&gt;
This function gets the fast fourier transform data for an audio stream which is a table of floats representing the current audio frame.&lt;br /&gt;
This allows things like visualisations.&lt;br /&gt;
&lt;br /&gt;
a fast fourier transform generates a table of all the frequencies of the current audio frame which starts at the bass end of the spectrum to mids to highs in that order&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Should you have any problems there is an example resource located on the resource svn here:&lt;br /&gt;
[https://code.google.com/p/mtasa-resources/source/browse/#svn%2Ftrunk%2F%5Bgameplay%5D%2FVisualiser Visualiser]&lt;br /&gt;
&lt;br /&gt;
just type &amp;quot;startmusic mystreamurl&amp;quot; in your console and it will play on the cinema billboard near A51&lt;br /&gt;
{{New_feature|3.0139|1.3.2|&lt;br /&gt;
If the element is a player, this function will use the players voice.&lt;br /&gt;
}}&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getSoundFFTData ( element sound, int iSamples [, int iBands = 0 ] )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''sound:''' A sound element that is created using [[playSound]] or [[playSound3D]]. Streams are also supported&lt;br /&gt;
*'''iSamples:''' Allowed samples are 128, 256, 512, 1024, 2048, 4096, 8192 and 16384&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''iBands:''' Post processing option allows you to split the samples into the desired amount of bands or bars so if you only need 5 bars this saves a lot of cpu power compared to trying to do it in Lua&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a table of floats representing the current audio frame.&lt;br /&gt;
Returns false if the sound is not playing yet or hasn't buffered in the&lt;br /&gt;
case of streams.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;playsound&amp;quot;,&lt;br /&gt;
function () &lt;br /&gt;
    local sound  = playSound(&amp;quot;wasted.mp3&amp;quot;)&lt;br /&gt;
    local data = getSoundWaveData(sound, 512) -- returns table&lt;br /&gt;
    for i, v in pairs(data) do&lt;br /&gt;
        outputChatBox(v) -- outputs the float representing the current audio frame&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.2|Added player element to use a players voice}}&lt;br /&gt;
&lt;br /&gt;
==أنظر أيضاً==&lt;br /&gt;
{{AR/Audio_functions}}&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AR/getSoundWaveData&amp;diff=38487</id>
		<title>AR/getSoundWaveData</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AR/getSoundWaveData&amp;diff=38487"/>
		<updated>2014-01-18T10:51:44Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New feature/item|3.0130|1.3.0|4125|&lt;br /&gt;
This function gets the wave form data for an audio stream which is a table of floats representing the current audio frame as a wave.&lt;br /&gt;
This allows things like visualisations.&lt;br /&gt;
}}&lt;br /&gt;
{{New_feature|3.0139|1.3.2|&lt;br /&gt;
If the element is a player, this function will use the players voice.&lt;br /&gt;
}}&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;table getSoundWaveData ( element sound, int iSamples )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''sound:''' A sound element that is created using [[playSound]] or [[playSound3D]]. Streams are also supported&lt;br /&gt;
*'''iSamples:''' Allowed samples are 128, 256, 512, 1024, 2048, 4096, 8192 and 16384 and determine how many samples to return from the currently playing audio&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a table of floats representing the current audio frame waveform.&lt;br /&gt;
Returns false if the sound is not playing yet or hasn't buffered in the&lt;br /&gt;
case of streams.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler(&amp;quot;playsound&amp;quot;,&lt;br /&gt;
function () &lt;br /&gt;
    local sound  = playSound(&amp;quot;wasted.mp3&amp;quot;)&lt;br /&gt;
    local data = getSoundWaveData(sound, 512) -- returns table&lt;br /&gt;
    for i, v in pairs(data) do&lt;br /&gt;
        outputChatBox(v) -- outputs the float representing the current audio frame waveform&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.2|Added player element to use a players voice}}&lt;br /&gt;
&lt;br /&gt;
==أنظر أيضاً==&lt;br /&gt;
{{AR/Audio_functions}}&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetProjectileForce&amp;diff=38486</id>
		<title>GetProjectileForce</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetProjectileForce&amp;diff=38486"/>
		<updated>2014-01-18T10:37:53Z</updated>

		<summary type="html">&lt;p&gt;Prime: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function returns the force of the specified projectile.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float getProjectileForce ( projectile theProjectile )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments==&lt;br /&gt;
*'''theProjectile:''' The [[projectiles| projectile]] element which force you want to retrieve.&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns a [[float]] if successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
'''Example 1:''' This example would outputs the force of the projectile on 1-100 scale. This function just works with projectiles which you throw so just grenades, satchel charge etc&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientProjectileCreation&amp;quot;, getRootElement(),&lt;br /&gt;
--The source of this event is the projectile that was created.&lt;br /&gt;
function ()&lt;br /&gt;
    local getForce = getProjectileForce(source)&lt;br /&gt;
    outputChatBox(getForce*100) -- outputs the force of the projectile on 1-100 scale&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
{{Client projectile functions}}&lt;br /&gt;
[[it:getProjectileForce]]&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetProjectileForce&amp;diff=38485</id>
		<title>GetProjectileForce</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetProjectileForce&amp;diff=38485"/>
		<updated>2014-01-18T10:36:55Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function returns the force of the specified projectile.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float getProjectileForce ( projectile theProjectile )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments==&lt;br /&gt;
*'''theProjectile:''' The [[projectiles| projectile]] element which force you want to retrieve.&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns a [[float]] if successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section class=&amp;quot;client&amp;quot; name=&amp;quot;Client script&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 1:''' This example would outputs the force of the projectile on 1-100 scale. This function just works with projectiles which you throw so just grenades, satchel charge etc&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientProjectileCreation&amp;quot;, getRootElement(),&lt;br /&gt;
--The source of this event is the projectile that was created.&lt;br /&gt;
function ()&lt;br /&gt;
    local getForce = getProjectileForce(source)&lt;br /&gt;
    outputChatBox(getForce*100) -- outputs the force of the projectile on 1-100 scale&lt;br /&gt;
end&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 projectile functions}}&lt;br /&gt;
[[it:getProjectileForce]]&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetSoundProperties&amp;diff=38484</id>
		<title>GetSoundProperties</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetSoundProperties&amp;diff=38484"/>
		<updated>2014-01-18T10:36:23Z</updated>

		<summary type="html">&lt;p&gt;Prime: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New feature/item|3.0130|1.3.0|4097|&lt;br /&gt;
This function gets the properties of a specific [[sound]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;float, float, float, bool getSoundProperties( element sound )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''sound:''' A sound element that is created using [[playSound]] or [[playSound3D]]&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
This function returns 3 floats and a boolean value:&lt;br /&gt;
&lt;br /&gt;
The first float is the sound's [http://en.wikipedia.org/wiki/Sampling_rate sample rate], the second one the sound's [http://en.wikipedia.org/wiki/Tempo tempo], and the third one the [http://en.wikipedia.org/wiki/Pitch_%28music%29 pitch] of the sound. The boolean representing whether the sound is reversed or not.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
'''Example 1:''' This example would return three float values representing the sample rate, tempo, pitch and a boolean value representing whether the sound is reversed or not, every 5 seconds.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local sound &lt;br /&gt;
local timer&lt;br /&gt;
&lt;br /&gt;
addCommandHandler(&amp;quot;playsound&amp;quot;,&lt;br /&gt;
function () &lt;br /&gt;
    sound = playSound(&amp;quot;wasted.mp3&amp;quot;)&lt;br /&gt;
    timer = setTimer(function() soundProperties(sound) end, 5000, 0)&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
function soundProperties(sound)&lt;br /&gt;
    local sampleRate, tempo, pitch, isReversed = getSoundProperties(sound) --gets the sample rate, tempo, pitch and a boolean value representing whether the sound is reversed or not.&lt;br /&gt;
    outputChatBox(sampleRate..&amp;quot; &amp;quot;..tempo..&amp;quot; &amp;quot;..pitch..&amp;quot; &amp;quot;..tostring(isReversed))&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_audio_functions}}&lt;br /&gt;
[[AR:getSoundProperties]]&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetSoundProperties&amp;diff=38483</id>
		<title>GetSoundProperties</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetSoundProperties&amp;diff=38483"/>
		<updated>2014-01-18T10:36:09Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{New feature/item|3.0130|1.3.0|4097|&lt;br /&gt;
This function gets the properties of a specific [[sound]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;float, float, float, bool getSoundProperties( element sound )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''sound:''' A sound element that is created using [[playSound]] or [[playSound3D]]&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
This function returns 3 floats and a boolean value:&lt;br /&gt;
&lt;br /&gt;
The first float is the sound's [http://en.wikipedia.org/wiki/Sampling_rate sample rate], the second one the sound's [http://en.wikipedia.org/wiki/Tempo tempo], and the third one the [http://en.wikipedia.org/wiki/Pitch_%28music%29 pitch] of the sound. The boolean representing whether the sound is reversed or not.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section class=&amp;quot;client&amp;quot; name=&amp;quot;Client script&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 1:''' This example would return three float values representing the sample rate, tempo, pitch and a boolean value representing whether the sound is reversed or not, every 5 seconds.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local sound &lt;br /&gt;
local timer&lt;br /&gt;
&lt;br /&gt;
addCommandHandler(&amp;quot;playsound&amp;quot;,&lt;br /&gt;
function () &lt;br /&gt;
    sound = playSound(&amp;quot;wasted.mp3&amp;quot;)&lt;br /&gt;
    timer = setTimer(function() soundProperties(sound) end, 5000, 0)&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
function soundProperties(sound)&lt;br /&gt;
    local sampleRate, tempo, pitch, isReversed = getSoundProperties(sound) --gets the sample rate, tempo, pitch and a boolean value representing whether the sound is reversed or not.&lt;br /&gt;
    outputChatBox(sampleRate..&amp;quot; &amp;quot;..tempo..&amp;quot; &amp;quot;..pitch..&amp;quot; &amp;quot;..tostring(isReversed))&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;
==See Also==&lt;br /&gt;
{{Client_audio_functions}}&lt;br /&gt;
[[AR:getSoundProperties]]&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDevelopmentMode&amp;diff=38482</id>
		<title>SetDevelopmentMode</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDevelopmentMode&amp;diff=38482"/>
		<updated>2014-01-18T10:34:53Z</updated>

		<summary type="html">&lt;p&gt;Prime: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function is used to set the development mode of the client. Setting development mode allows access to special commands which can assist with script debugging.&lt;br /&gt;
&lt;br /&gt;
Development mode commands:&lt;br /&gt;
* '''[[Client_Commands#showcol|showcol]]''': Enables colshapes to be viewed as a wireframe object.&lt;br /&gt;
* '''[[Client_Commands#showsound|showsound]]''': Enables world sound ids to be printed in the debug output window.&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 setDevelopmentMode ( bool enable )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''enable ''': A boolean to indicate whether development mode is on (true) or off (false) &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the mode was set correctly, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.1.1-9.03355|}}&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
'''Example 1:''' This example would set the development mode of the client. Use /showcol [&amp;lt;0-1&amp;gt;] and /showsound [&amp;lt;0-1&amp;gt;] later to enable/disable respective funtions. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler( &amp;quot;devmode&amp;quot;,&lt;br /&gt;
function ()&lt;br /&gt;
    setDevelopmentMode ( true )&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_utility_functions}}&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDevelopmentMode&amp;diff=38481</id>
		<title>SetDevelopmentMode</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDevelopmentMode&amp;diff=38481"/>
		<updated>2014-01-18T10:34:42Z</updated>

		<summary type="html">&lt;p&gt;Prime: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function is used to set the development mode of the client. Setting development mode allows access to special commands which can assist with script debugging.&lt;br /&gt;
&lt;br /&gt;
Development mode commands:&lt;br /&gt;
* '''[[Client_Commands#showcol|showcol]]''': Enables colshapes to be viewed as a wireframe object.&lt;br /&gt;
* '''[[Client_Commands#showsound|showsound]]''': Enables world sound ids to be printed in the debug output window.&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 setDevelopmentMode ( bool enable )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''enable ''': A boolean to indicate whether development mode is on (true) or off (false) &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the mode was set correctly, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.1.1-9.03355|}}&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
'''Example 1:''' This example would set the development mode of the client. Use /showcol [&amp;lt;0-1&amp;gt;] and /showsound [&amp;lt;0-1&amp;gt;] later to enable/disable respective funtions. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler( &amp;quot;devmode&amp;quot;,&lt;br /&gt;
function ()&lt;br /&gt;
	setDevelopmentMode ( true )&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_utility_functions}}&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetSoundProperties&amp;diff=38480</id>
		<title>GetSoundProperties</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetSoundProperties&amp;diff=38480"/>
		<updated>2014-01-18T10:33:31Z</updated>

		<summary type="html">&lt;p&gt;Prime: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Needs_Example}}&lt;br /&gt;
{{New feature/item|3.0130|1.3.0|4097|&lt;br /&gt;
This function gets the properties of a specific [[sound]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;float, float, float, bool getSoundProperties( element sound )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''sound:''' A sound element that is created using [[playSound]] or [[playSound3D]]&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
This function returns 3 floats and a boolean value:&lt;br /&gt;
&lt;br /&gt;
The first float is the sound's [http://en.wikipedia.org/wiki/Sampling_rate sample rate], the second one the sound's [http://en.wikipedia.org/wiki/Tempo tempo], and the third one the [http://en.wikipedia.org/wiki/Pitch_%28music%29 pitch] of the sound. The boolean representing whether the sound is reversed or not.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section class=&amp;quot;client&amp;quot; name=&amp;quot;Client script&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 1:''' This example would return three float values representing the sample rate, tempo, pitch and a boolean value representing whether the sound is reversed or not, every 5 seconds.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local sound &lt;br /&gt;
local timer&lt;br /&gt;
&lt;br /&gt;
addCommandHandler(&amp;quot;playsound&amp;quot;,&lt;br /&gt;
function () &lt;br /&gt;
    sound = playSound(&amp;quot;wasted.mp3&amp;quot;)&lt;br /&gt;
    timer = setTimer(function() soundProperties(sound) end, 5000, 0)&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
function soundProperties(sound)&lt;br /&gt;
    local sampleRate, tempo, pitch, isReversed = getSoundProperties(sound) --gets the sample rate, tempo, pitch and a boolean value representing whether the sound is reversed or not.&lt;br /&gt;
    outputChatBox(sampleRate..&amp;quot; &amp;quot;..tempo..&amp;quot; &amp;quot;..pitch..&amp;quot; &amp;quot;..tostring(isReversed))&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;
==See Also==&lt;br /&gt;
{{Client_audio_functions}}&lt;br /&gt;
[[AR:getSoundProperties]]&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetSoundProperties&amp;diff=38479</id>
		<title>GetSoundProperties</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetSoundProperties&amp;diff=38479"/>
		<updated>2014-01-18T10:18:07Z</updated>

		<summary type="html">&lt;p&gt;Prime: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Needs_Example}}&lt;br /&gt;
{{New feature/item|3.0130|1.3.0|4097|&lt;br /&gt;
This function gets the properties of a specific [[sound]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;float, float, float, bool getSoundProperties( element sound )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''sound:''' A sound element that is created using [[playSound]] or [[playSound3D]]&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
This function returns 3 floats and a boolean value:&lt;br /&gt;
&lt;br /&gt;
The first float is the sound's [http://en.wikipedia.org/wiki/Sampling_rate sample rate], the second one the sound's [http://en.wikipedia.org/wiki/Tempo tempo], and the third one the [http://en.wikipedia.org/wiki/Pitch_%28music%29 pitch] of the sound. The boolean representing whether the sound is reversed or not.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section class=&amp;quot;client&amp;quot; name=&amp;quot;Client script&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 1:''' This example would return three float values representing the sample rate, tempo, pitch and a boolean value representing whether the sound is reversed or not, every 5 seconds.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local sound &lt;br /&gt;
local timer&lt;br /&gt;
&lt;br /&gt;
addCommandHandler(&amp;quot;playsound&amp;quot;,&lt;br /&gt;
function () &lt;br /&gt;
        sound = playSound(&amp;quot;wasted.mp3&amp;quot;)&lt;br /&gt;
	timer = setTimer(function() soundProperties(sound) end, 5000, 0)&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
function soundProperties(sound)&lt;br /&gt;
	local sampleRate, tempo, pitch, isReversed = getSoundProperties(sound) --gets the sample rate, tempo, pitch and a boolean value representing whether the sound is reversed or not.&lt;br /&gt;
	outputChatBox(sampleRate..&amp;quot; &amp;quot;..tempo..&amp;quot; &amp;quot;..pitch..&amp;quot; &amp;quot;..tostring(isReversed))&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;
==See Also==&lt;br /&gt;
{{Client_audio_functions}}&lt;br /&gt;
[[AR:getSoundProperties]]&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetProjectileForce&amp;diff=38478</id>
		<title>GetProjectileForce</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetProjectileForce&amp;diff=38478"/>
		<updated>2014-01-18T09:51:19Z</updated>

		<summary type="html">&lt;p&gt;Prime: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Needs_Example}}&lt;br /&gt;
This function returns the force of the specified projectile.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float getProjectileForce ( projectile theProjectile )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Required Arguments==&lt;br /&gt;
*'''theProjectile:''' The [[projectiles| projectile]] element which force you want to retrieve.&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
Returns a [[float]] if successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section class=&amp;quot;client&amp;quot; name=&amp;quot;Client script&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 1:''' This example would outputs the force of the projectile on 1-100 scale. This function just works with projectiles which you throw so just grenades, satchel charge etc&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientProjectileCreation&amp;quot;, getRootElement(),&lt;br /&gt;
--The source of this event is the projectile that was created.&lt;br /&gt;
function ()&lt;br /&gt;
	local getForce = getProjectileForce(source)&lt;br /&gt;
	outputChatBox(getForce*100) -- outputs the force of the projectile on 1-100 scale&lt;br /&gt;
end&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 projectile functions}}&lt;br /&gt;
[[it:getProjectileForce]]&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetDevelopmentMode&amp;diff=38474</id>
		<title>SetDevelopmentMode</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetDevelopmentMode&amp;diff=38474"/>
		<updated>2014-01-18T08:42:46Z</updated>

		<summary type="html">&lt;p&gt;Prime: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function is used to set the development mode of the client. Setting development mode allows access to special commands which can assist with script debugging.&lt;br /&gt;
&lt;br /&gt;
Development mode commands:&lt;br /&gt;
* '''[[Client_Commands#showcol|showcol]]''': Enables colshapes to be viewed as a wireframe object.&lt;br /&gt;
* '''[[Client_Commands#showsound|showsound]]''': Enables world sound ids to be printed in the debug output window.&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 setDevelopmentMode ( bool enable )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''enable ''': A boolean to indicate whether development mode is on (true) or off (false) &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the mode was set correctly, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.1.1-9.03355|}}&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section class=&amp;quot;client&amp;quot; name=&amp;quot;Client script&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
'''Example 1:''' This example would set the development mode of the client. Use /showcol [&amp;lt;0-1&amp;gt;] and /showsound [&amp;lt;0-1&amp;gt;] later to enable/disable respective funtions. &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler( &amp;quot;devmode&amp;quot;,&lt;br /&gt;
function ()&lt;br /&gt;
	setDevelopmentMode ( true )&lt;br /&gt;
end&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_utility_functions}}&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RemovePedClothes&amp;diff=35736</id>
		<title>RemovePedClothes</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RemovePedClothes&amp;diff=35736"/>
		<updated>2013-05-05T19:53:59Z</updated>

		<summary type="html">&lt;p&gt;Prime: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function is used to remove the current clothes of a certain type on a [[ped]]. It will remove them if the clothesTexture and clothesModel aren't specified, or if they match the current clothes on that slot.&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 removePedClothes ( ped thePed, int clothesType, [ string clothesTexture, string clothesModel ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed''': The [[ped]] you want to remove clothes from.&lt;br /&gt;
*'''clothesType''': the clothes slot/type to remove. See the [[CJ Clothes|clothes catalog]].&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''clothesTexture''': (Server only) A string determining the clothes texture that will be removed. See the [[CJ Clothes|clothes catalog]].&lt;br /&gt;
*'''clothesModel''': (Server only) A string determining the clothes model that will be removed. See the [[CJ Clothes|clothes catalog]].&lt;br /&gt;
&lt;br /&gt;
==Returns==&lt;br /&gt;
This function returns ''true'' if the clothes were successfully removed from the ped, ''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 'moto' helmet to a player when he gets on a nrg bike, and removes it when he gets off.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function addHelmetOnEnter ( vehicleEntered, seat, jacked )&lt;br /&gt;
    if getElementModel ( vehicleEntered ) == 522 then      -- if it's a nrg&lt;br /&gt;
        addPedClothes ( source, &amp;quot;moto&amp;quot;, &amp;quot;moto&amp;quot;, 16 )       -- add the helmet&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerVehicleEnter&amp;quot;, getRootElement(), addHelmetOnEnter )&lt;br /&gt;
&lt;br /&gt;
function removeHelmetOnExit ( vehicleExited, seat, jacked )&lt;br /&gt;
    if getElementModel ( vehicleExited ) == 522 then       -- if it's a nrg&lt;br /&gt;
        removePedClothes ( source, 16, &amp;quot;moto&amp;quot;, &amp;quot;moto&amp;quot; )    -- remove that helmet&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerVehicleExit&amp;quot;, getRootElement(), removeHelmetOnExit )&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;
{{Ped functions}}&lt;/div&gt;</summary>
		<author><name>Prime</name></author>
	</entry>
</feed>