<?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=HuX</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=HuX"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/HuX"/>
	<updated>2026-04-20T08:18:55Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetBanNick&amp;diff=44827</id>
		<title>SetBanNick</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetBanNick&amp;diff=44827"/>
		<updated>2015-03-31T17:13:26Z</updated>

		<summary type="html">&lt;p&gt;HuX: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server function}}&lt;br /&gt;
&lt;br /&gt;
{{New feature/item|3.0141|1.4.1|7093|This function sets a new nick for a [[ban]].}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool setBanNick ( ban theBan, string theNick )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theBan:''' The [[ban]] you want to change the nick of.&lt;br /&gt;
*'''theNick:''' A string representing the nick you want to set the ban to.&lt;br /&gt;
&lt;br /&gt;
=== Returns ===&lt;br /&gt;
Returns ''true'' if changed, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- this example looks if there is a ban with nick 'Steve', and if there is, it changes ban nick to 'Mike'&lt;br /&gt;
function changeBanNick()&lt;br /&gt;
   for i,ban in pairs(getBans()) do&lt;br /&gt;
      if getBanNick(ban) == &amp;quot;Steve&amp;quot; then&lt;br /&gt;
         setBanNick(ban,&amp;quot;Mike&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;setbannick&amp;quot;,changeBanNick)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
{{Admin_functions}}&lt;/div&gt;</summary>
		<author><name>HuX</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetBanNick&amp;diff=44826</id>
		<title>SetBanNick</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetBanNick&amp;diff=44826"/>
		<updated>2015-03-31T17:12:54Z</updated>

		<summary type="html">&lt;p&gt;HuX: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server function}}&lt;br /&gt;
&lt;br /&gt;
{{New feature/item|3.0141|1.4.1|7093|This function sets a new nick for a [[ban]].}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool setBanNick ( ban theBan, string theNick )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theBan:''' The [[ban]] you want to change the nick of.&lt;br /&gt;
*'''theNick:''' A string representing the nick you want to set the ban to.&lt;br /&gt;
&lt;br /&gt;
=== Returns ===&lt;br /&gt;
Returns ''true'' if changed, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- this example looks if there is a ban with nick 'Steve', and if is, it changes ban nick to 'Mike'&lt;br /&gt;
function changeBanNick()&lt;br /&gt;
   for i,ban in pairs(getBans()) do&lt;br /&gt;
      if getBanNick(ban) == &amp;quot;Steve&amp;quot; then&lt;br /&gt;
         setBanNick(ban,&amp;quot;Mike&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;setbannick&amp;quot;,changeBanNick)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
{{Admin_functions}}&lt;/div&gt;</summary>
		<author><name>HuX</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetBanNick&amp;diff=44825</id>
		<title>SetBanNick</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetBanNick&amp;diff=44825"/>
		<updated>2015-03-31T17:12:34Z</updated>

		<summary type="html">&lt;p&gt;HuX: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server function}}&lt;br /&gt;
{{Needs Example}}&lt;br /&gt;
&lt;br /&gt;
{{New feature/item|3.0141|1.4.1|7093|This function sets a new nick for a [[ban]].}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool setBanNick ( ban theBan, string theNick )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theBan:''' The [[ban]] you want to change the nick of.&lt;br /&gt;
*'''theNick:''' A string representing the nick you want to set the ban to.&lt;br /&gt;
&lt;br /&gt;
=== Returns ===&lt;br /&gt;
Returns ''true'' if changed, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- this example looks if there is a ban with nick 'Steve', and if is, it changes ban nick to 'Mike'&lt;br /&gt;
function changeBanNick()&lt;br /&gt;
   for i,ban in pairs(getBans()) do&lt;br /&gt;
      if getBanNick(ban) == &amp;quot;Steve&amp;quot; then&lt;br /&gt;
         setBanNick(ban,&amp;quot;Mike&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;setbannick&amp;quot;,changeBanNick)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
{{Admin_functions}}&lt;/div&gt;</summary>
		<author><name>HuX</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetElementMatrix&amp;diff=44790</id>
		<title>GetElementMatrix</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetElementMatrix&amp;diff=44790"/>
		<updated>2015-03-09T23:12:12Z</updated>

		<summary type="html">&lt;p&gt;HuX: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client function}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This function gets an [[element]]'s transform [[matrix]]. This contains 16 float values that multiplied to a point will give you the point transformed. It is most useful for matrix calculations such as calculating offsets. For further information, please refer to a tutorial of matrices in computer graphics programming.&lt;br /&gt;
{{Note|The [[matrix]] returned by this function is [http://bugs.mtasa.com/view.php?id{{=}}6984 not setup correctly for some calculations] unless the '''legacy''' argument is set to '''''false'''''.}}&lt;br /&gt;
{{Tip|''For [[matrix]] manipulation which goes beyond the basic examples given on this page, see the [[Lua matrix library]].'' If you are using MTA: SA 1.4 or higher, using the built-in [[matrix]] class is also recommended.}}&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
table getElementMatrix ( element theElement [, bool legacy = true ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[element]]:getMatrix|matrix|setElementMatrix}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' The [[element]] which you wish to retrieve the [[matrix]] for.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
*'''legacy:''' Set to ''false'' to return correctly setup [[matrix]] (i.e. Last column in the first 3 rows set to zero).&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a multi-dimensional array (which can be transformed into a proper [[matrix]] class using ''Matrix.create'' method) containing a 4x4 matrix. Returns ''false'' if the element is not streamed in, and not a [[vehicle]], [[ped]] or [[object]].&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example creates a utility function that turns an offset into a position that is relative to the specified element.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getPositionFromElementOffset(element,offX,offY,offZ)&lt;br /&gt;
    local m = getElementMatrix ( element )  -- Get the matrix&lt;br /&gt;
    local x = offX * m[1][1] + offY * m[2][1] + offZ * m[3][1] + m[4][1]  -- Apply transform&lt;br /&gt;
    local y = offX * m[1][2] + offY * m[2][2] + offZ * m[3][2] + m[4][2]&lt;br /&gt;
    local z = offX * m[1][3] + offY * m[2][3] + offZ * m[3][3] + m[4][3]&lt;br /&gt;
    return x, y, z                               -- Return the transformed point&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Get the position of a point 3 units to the right of the element:&lt;br /&gt;
x,y,z = getPositionFromElementOffset(element,3,0,0)&lt;br /&gt;
&lt;br /&gt;
-- Get the position of a point 2 units in front of the element:&lt;br /&gt;
x,y,z = getPositionFromElementOffset(element,0,2,0)&lt;br /&gt;
&lt;br /&gt;
-- Get the position of a point 1 unit above the element:&lt;br /&gt;
x,y,z = getPositionFromElementOffset(element,0,0,1)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example creates some more matrix utility functions&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getMatrixLeft(m)&lt;br /&gt;
    return m[1][1], m[1][2], m[1][3]&lt;br /&gt;
end&lt;br /&gt;
function getMatrixForward(m)&lt;br /&gt;
    return m[2][1], m[2][2], m[2][3]&lt;br /&gt;
end&lt;br /&gt;
function getMatrixUp(m)&lt;br /&gt;
    return m[3][1], m[3][2], m[3][3]&lt;br /&gt;
end&lt;br /&gt;
function getMatrixPosition(m)&lt;br /&gt;
    return m[4][1], m[4][2], m[4][3]&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local mat = getElementMatrix(element)  -- Get the matrix&lt;br /&gt;
x,y,z = getMatrixLeft(mat)     -- Get the matrix left direction&lt;br /&gt;
x,y,z = getMatrixForward(mat)  -- Get the matrix forward direction&lt;br /&gt;
x,y,z = getMatrixUp(mat)       -- Get the matrix up direction&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This example function shows you what getElementMatrix does internally.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getElementMatrix(element)&lt;br /&gt;
    local rx, ry, rz = getElementRotation(element, &amp;quot;ZXY&amp;quot;)&lt;br /&gt;
    rx, ry, rz = math.rad(rx), math.rad(ry), math.rad(rz)&lt;br /&gt;
    local matrix = {}&lt;br /&gt;
    matrix[1] = {}&lt;br /&gt;
    matrix[1][1] = math.cos(rz)*math.cos(ry) - math.sin(rz)*math.sin(rx)*math.sin(ry)&lt;br /&gt;
    matrix[1][2] = math.cos(ry)*math.sin(rz) + math.cos(rz)*math.sin(rx)*math.sin(ry)&lt;br /&gt;
    matrix[1][3] = -math.cos(rx)*math.sin(ry)&lt;br /&gt;
    matrix[1][4] = 1&lt;br /&gt;
    &lt;br /&gt;
    matrix[2] = {}&lt;br /&gt;
    matrix[2][1] = -math.cos(rx)*math.sin(rz)&lt;br /&gt;
    matrix[2][2] = math.cos(rz)*math.cos(rx)&lt;br /&gt;
    matrix[2][3] = math.sin(rx)&lt;br /&gt;
    matrix[2][4] = 1&lt;br /&gt;
	&lt;br /&gt;
    matrix[3] = {}&lt;br /&gt;
    matrix[3][1] = math.cos(rz)*math.sin(ry) + math.cos(ry)*math.sin(rz)*math.sin(rx)&lt;br /&gt;
    matrix[3][2] = math.sin(rz)*math.sin(ry) - math.cos(rz)*math.cos(ry)*math.sin(rx)&lt;br /&gt;
    matrix[3][3] = math.cos(rx)*math.cos(ry)&lt;br /&gt;
    matrix[3][4] = 1&lt;br /&gt;
	&lt;br /&gt;
    matrix[4] = {}&lt;br /&gt;
    matrix[4][1], matrix[4][2], matrix[4][3] = getElementPosition(element)&lt;br /&gt;
    matrix[4][4] = 1&lt;br /&gt;
	&lt;br /&gt;
    return matrix&lt;br /&gt;
end&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.0-9.04186|Added legacy argument}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client_element_functions}}&lt;/div&gt;</summary>
		<author><name>HuX</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetFarClipDistance&amp;diff=44786</id>
		<title>SetFarClipDistance</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetFarClipDistance&amp;diff=44786"/>
		<updated>2015-03-07T20:41:37Z</updated>

		<summary type="html">&lt;p&gt;HuX: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{note box|Setting this less than 5 will cause problems to the client}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function is used to set the distance of render. Areas beyond the specified distance will not be rendered.&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 setFarClipDistance ( float distance )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''distance:''' A float specifying the distance of render.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the distance was set correctly, ''false'' if invalid arguments were passed.&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 adjusts the visibility range of the game world.&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;
		setFarClipDistance( 3000 ) -- We adjust visibility range to 3000 metres&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;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
This example adjusts the visibility range of the game world.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler( &amp;quot;onClientResourceStart&amp;quot;, resourceRoot,&lt;br /&gt;
	function( )&lt;br /&gt;
		setFarClipDistance( 3000 ) -- We adjust visibility range to 3000 metres&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;
{{World functions}}&lt;/div&gt;</summary>
		<author><name>HuX</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=TriggerClientEvent&amp;diff=44785</id>
		<title>TriggerClientEvent</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=TriggerClientEvent&amp;diff=44785"/>
		<updated>2015-03-07T19:32:00Z</updated>

		<summary type="html">&lt;p&gt;HuX: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--{{Needs_Checking|Something needs to be said about the steps required to help keep an event inside a resource. i.e. Setting 'theElement' to resourceRoot here, and setting the matching event handler's 'attachedTo' also to resourceRoot.}}&lt;br /&gt;
--&amp;gt;__NOTOC__&lt;br /&gt;
{{Server function}}&lt;br /&gt;
This function triggers an event previously registered on a client. This is the primary means of passing information between the server and the client. Clients have a similar [[triggerServerEvent]] function that can do the reverse. You can treat this function as if it was an asynchronous function call, using [[triggerServerEvent]] to pass back any returned information if necessary.&lt;br /&gt;
&lt;br /&gt;
Almost any data types can be passed as expected, including [[element]]s and complex nested [[table]]s. Non-element MTA data types like xmlNodes or resource pointers will not be able to be passed as they do not necessarily have a valid representation on the client.&lt;br /&gt;
&lt;br /&gt;
Events are sent reliably, so clients will receive them, but there may be (but shouldn't be) a significant delay before they are received. You should take this into account when using them.&lt;br /&gt;
&lt;br /&gt;
Keep in mind the bandwidth issues when using events - don't pass a large list of arguments unless you really need to. It is marginally more efficient to pass one large event than two smaller ones.&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool triggerClientEvent ( [table/element sendTo=getRootElement()], string name, element sourceElement, [arguments...] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''name:''' The name of the event to trigger client side. You should register this event with [[addEvent]] and add at least one event handler using [[addEventHandler]].&lt;br /&gt;
*'''sourceElement:''' The element that is the [[Event system#Event handlers|source]] of the event.&lt;br /&gt;
{{Note|To save client CPU, you should avoid setting '''sourceElement''' to the [[root element]] where possible. Using [[GetThisResource|resourceRoot]] is usually sufficient if the event is handled by the same resource on the client.}}&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''sendTo:''' The event will be sent to all [[player]]s that are children of the specified element. By default this is the root element, and hence the event is sent to all players. If you specify a single player it will just be sent to that player. This argument can also be a table of player elements.&lt;br /&gt;
*'''arguments...:''' A list of arguments to trigger with the event. You can pass any lua data type (except functions). You can also pass [[element]]s.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the event trigger has been sent, ''false'' if invalid arguments were specified.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
===Example 1===&lt;br /&gt;
This example shows how you can pass a simple &amp;quot;Hello World&amp;quot; message from the server to the all the clients using an event.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function greetingHandler ( message )&lt;br /&gt;
    outputChatBox ( &amp;quot;The server says: &amp;quot; .. message )&lt;br /&gt;
end&lt;br /&gt;
addEvent( &amp;quot;onGreeting&amp;quot;, true )&lt;br /&gt;
addEventHandler( &amp;quot;onGreeting&amp;quot;, localPlayer, greetingHandler )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&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;
function greetingCommand ( playerSource, commandName )&lt;br /&gt;
    triggerClientEvent ( playerSource, &amp;quot;onGreeting&amp;quot;, playerSource, &amp;quot;Hello World!&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;greet&amp;quot;, greetingCommand )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When the command &amp;quot;greet&amp;quot; is executed (by typing it in the server console or the player's console), the server's ''greetingCommand'' function is called. This triggers the client side event ''onGreeting'' with the string ''&amp;quot;Hello World!&amp;quot;''. This event is then handled by the ''greetingHandler'' function client side which then displays the message.&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
This example shows how you can pass a simple &amp;quot;Hello World&amp;quot; message from the server to '''a single''' client using an event.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function greetingHandler ( message )&lt;br /&gt;
    outputChatBox ( &amp;quot;The server says: &amp;quot; .. message )&lt;br /&gt;
end&lt;br /&gt;
addEvent( &amp;quot;onGreeting&amp;quot;, true )&lt;br /&gt;
addEventHandler( &amp;quot;onGreeting&amp;quot;, localPlayer, greetingHandler )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&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;
function greetingCommandOne ( playerSource, commandName, playerName )&lt;br /&gt;
    if playerName then&lt;br /&gt;
        local thePlayer = getPlayerFromName ( playerName )&lt;br /&gt;
        if thePlayer then&lt;br /&gt;
            triggerClientEvent ( thePlayer, &amp;quot;onGreeting&amp;quot;, thePlayer, &amp;quot;Hello World!&amp;quot; )&lt;br /&gt;
        else&lt;br /&gt;
            -- invalid player name specified&lt;br /&gt;
        end&lt;br /&gt;
    else&lt;br /&gt;
        -- No player name specified&lt;br /&gt;
    end &lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;greet_one&amp;quot;, greetingCommandOne )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This works like the first example except an extra ''thePlayer'' argument is specified for triggerClientEvent.&lt;br /&gt;
&lt;br /&gt;
==Changelog==&lt;br /&gt;
{{ChangelogHeader}}&lt;br /&gt;
{{ChangelogItem|1.3.0-9.04570|Added option to use a list of player elements for the 'sendTo' argument}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Event functions}}&lt;br /&gt;
[[ru:triggerClientEvent]]&lt;/div&gt;</summary>
		<author><name>HuX</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientPedHitByWaterCannon&amp;diff=44376</id>
		<title>OnClientPedHitByWaterCannon</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientPedHitByWaterCannon&amp;diff=44376"/>
		<updated>2015-02-08T12:14:06Z</updated>

		<summary type="html">&lt;p&gt;HuX: /* Cancel effect */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client event}}&lt;br /&gt;
This event is fired when a ped is hit by a water cannon.&lt;br /&gt;
{{Note|This event is only triggered for peds that are streamed in}}&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
ped pedHit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''pedHit:''' the ped which got shot by the water cannon&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The source of this event is the vehicle who shot the water cannon.&lt;br /&gt;
&lt;br /&gt;
==Type==&lt;br /&gt;
This event is a pre reaction event meaning it occurs before any game level reaction to the collision which include:&lt;br /&gt;
* Peds flying off&lt;br /&gt;
* Peds being knocked down&lt;br /&gt;
&lt;br /&gt;
==Cancel effect==&lt;br /&gt;
If this event is [[Event system#Canceling|canceled]], the ped will not be knocked down&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section class=&amp;quot;client&amp;quot; name=&amp;quot;Client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example says who got hit by a water cannon.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function outputPlayerHitByWater(thePed)&lt;br /&gt;
	if (getElementType(thePed) ~= &amp;quot;player&amp;quot;) then&lt;br /&gt;
		return false -- This event is for peds and players but this example only wants players&lt;br /&gt;
	end&lt;br /&gt;
	local hitPed = getPlayerName(thePed)&lt;br /&gt;
	outputChatBox(hitPed..&amp;quot; got hit by a water cannon!&amp;quot;, 255, 0, 0)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientPedHitByWaterCannon&amp;quot;, root, outputPlayerHitByWater)&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;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.0-9.03931|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===Client ped events===&lt;br /&gt;
{{Client_ped_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>HuX</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetProjectileCounter&amp;diff=44375</id>
		<title>GetProjectileCounter</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetProjectileCounter&amp;diff=44375"/>
		<updated>2015-02-08T12:11:13Z</updated>

		<summary type="html">&lt;p&gt;HuX: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
Get the time left before a projectile detonates.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int getProjectileCounter ( projectile projectile )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
{{OOP||[[projectile]]:getCounter|counter|setProjectileCounter}}&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* projectile: the projectile to get the timer of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the the time in milliseconds to detonation which depending on the projectile type will do different things:&lt;br /&gt;
* Grenades will explode when it hits 0&lt;br /&gt;
* Teargas may be a duration timer&lt;br /&gt;
* Both types of rockets will explode when it hits 0&lt;br /&gt;
* Satchels restarts so I do not think it does anything&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
With this example you can find out how long does it take for a projectile to explode/end&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getProjectileBoomTime()&lt;br /&gt;
outputChatBox(&amp;quot;Time for &amp;quot;..getProjectileType(source)..&amp;quot; to explode/end is &amp;quot;..getProjectileCounter(source)..&amp;quot; miliseconds.&amp;quot;,255,0,0)&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientProjectileCreation&amp;quot;,root,getProjectileBoomTime)&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;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.0-9.04555|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client projectile functions}}&lt;/div&gt;</summary>
		<author><name>HuX</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientPedHitByWaterCannon&amp;diff=44064</id>
		<title>OnClientPedHitByWaterCannon</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientPedHitByWaterCannon&amp;diff=44064"/>
		<updated>2015-01-25T20:44:05Z</updated>

		<summary type="html">&lt;p&gt;HuX: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client event}}&lt;br /&gt;
This event is fired when a ped is hit by a water cannon.&lt;br /&gt;
{{Note|This event is only triggered for peds that are streamed in}}&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
ped pedHit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''pedHit:''' the ped which got shot by the water cannon&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The source of this event is the vehicle who shot the water cannon.&lt;br /&gt;
&lt;br /&gt;
==Type==&lt;br /&gt;
This event is a pre reaction event meaning it occurs before any game level reaction to the collision which include:&lt;br /&gt;
* Peds flying off&lt;br /&gt;
* Peds being knocked down&lt;br /&gt;
&lt;br /&gt;
==Cancel effect==&lt;br /&gt;
If this event is [[Event system#Canceling|canceled]], the Ped will not be knocked down&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section class=&amp;quot;client&amp;quot; name=&amp;quot;Client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example outputs who got hit by water cannon.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
 function outputPlayerHitByWater(thePed)&lt;br /&gt;
 local hitPed = getPlayerName(thePed) or &amp;quot;ped&amp;quot;&lt;br /&gt;
 outputChatBox(hitPed..&amp;quot; got hit by water cannon!&amp;quot;, 255, 0, 0)&lt;br /&gt;
 end&lt;br /&gt;
 addEventHandler(&amp;quot;onClientPedHitByWaterCannon&amp;quot;,root,outputPlayerHitByWater)&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
'''Example was created by HuX'''&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.0-9.03931|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===Client ped events===&lt;br /&gt;
{{Client_ped_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>HuX</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientPedHitByWaterCannon&amp;diff=44063</id>
		<title>OnClientPedHitByWaterCannon</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientPedHitByWaterCannon&amp;diff=44063"/>
		<updated>2015-01-25T20:42:55Z</updated>

		<summary type="html">&lt;p&gt;HuX: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client event}}&lt;br /&gt;
{{Needs Example}}&lt;br /&gt;
This event is fired when a ped is hit by a water cannon.&lt;br /&gt;
{{Note|This event is only triggered for peds that are streamed in}}&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
ped pedHit&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
*'''pedHit:''' the ped which got shot by the water cannon&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The source of this event is the vehicle who shot the water cannon.&lt;br /&gt;
&lt;br /&gt;
==Type==&lt;br /&gt;
This event is a pre reaction event meaning it occurs before any game level reaction to the collision which include:&lt;br /&gt;
* Peds flying off&lt;br /&gt;
* Peds being knocked down&lt;br /&gt;
&lt;br /&gt;
==Cancel effect==&lt;br /&gt;
If this event is [[Event system#Canceling|canceled]], the Ped will not be knocked down&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section class=&amp;quot;client&amp;quot; name=&amp;quot;Client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example outputs who got hit by water cannon.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
 function outputPlayerHitByWater(thePed)&lt;br /&gt;
 local hitPed = getPlayerName(thePed) or &amp;quot;ped&amp;quot;&lt;br /&gt;
 outputChatBox(hitPed..&amp;quot; got hit by water cannon!&amp;quot;, 255, 0, 0)&lt;br /&gt;
 end&lt;br /&gt;
 addEventHandler(&amp;quot;onClientPedHitByWaterCannon&amp;quot;,root,outputPlayerHitByWater)&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
'''Example was created by HuX'''&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.0-9.03931|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===Client ped events===&lt;br /&gt;
{{Client_ped_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>HuX</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=HR/banPlayer&amp;diff=42735</id>
		<title>HR/banPlayer</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=HR/banPlayer&amp;diff=42735"/>
		<updated>2014-10-26T23:25:43Z</updated>

		<summary type="html">&lt;p&gt;HuX: /* Izborni Argumenti */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server function}}&lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
Ova funkcija će prognati određenog igrača pomoću njegovog IP-a, [[serial]]-a, ili nadimka&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Deprecated_feature|3|1.0|&lt;br /&gt;
This function will ban the specified player from the server by IP.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
ban banPlayer ( player prognaniIgrač, [ bool IP = true, bool Nadimak = false, bool Serial = false, &lt;br /&gt;
player odgovoranIgrač = nil, string razlog = nil, int sekunde = 0 ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Deprecated_feature|3|1.0|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool banPlayer ( player prognaniIgrač , [ element odgovoranElement, string razlog ] )         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
{{OOP||[[player]]:ban||}}&lt;br /&gt;
===Potrebni Argumenti=== &lt;br /&gt;
*'''prognaniIgrač:''' Igrač koji će biti prognan sa servera.&lt;br /&gt;
&lt;br /&gt;
===Izborni Argumenti=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
*'''IP:''' Hoće li igrač biti prognan pomoću IP-a?&lt;br /&gt;
*'''Nadimak:''' Hoće li igrač biti prognan pomoću nadimka?&lt;br /&gt;
*'''Serial:''' Hoće li igrač biti prognan pomoću serial-a?&lt;br /&gt;
&lt;br /&gt;
:'''NAPOMENA:''' da prognaš pomoću nadimka ili serial-a, ''verifyserials'' mora biti upaljen u datoteci konfiguracije servera.&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
*'''odgovoranElement:''' Element koji je odgovoran za prognuće igrača. Ovo može biti igrač ili korijen ([[getRootElement]]()) (Najviše 30 slova ako se koristi string).&lt;br /&gt;
*'''razlog:''' Razlog zbog kojeg će igrač biti prognan sa servera.&lt;br /&gt;
*'''sekunde:''' Broj sekundi koliko će igrač biti prognan sa servera. Ovo može biti 0 za beskonačnu količinu vremena.&lt;br /&gt;
&lt;br /&gt;
===Vraća===&lt;br /&gt;
{{Deprecated_feature|3|1.0|&lt;br /&gt;
Vraća ''true'' ako je igrač prognan uspješno, ''false'' ako su nevaljani argumenti naznačeni.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
Vraća [[ban]] objekt ako je prognan uspješno, ili ''false'' ako je neuspješno.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Primjer==&lt;br /&gt;
Ovaj primjer dopušta igraču da progna bilo koga ako ima ACL prava.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Dodaj &amp;quot;ban&amp;quot; komandu&lt;br /&gt;
-- Primjer sa igračem&lt;br /&gt;
function banPlayerCommand ( theClient, commandName, bannedName, reason )&lt;br /&gt;
&lt;br /&gt;
	-- Obavijesti igrača ako nema ACL prava&lt;br /&gt;
	if ( hasObjectPermissionTo ( theClient, &amp;quot;function.banPlayer&amp;quot; ) ) then&lt;br /&gt;
		--Pronađi igrača iz imena&lt;br /&gt;
		local bannedPlayer = getPlayerFromName ( bannedName )&lt;br /&gt;
&lt;br /&gt;
		--Prognaj igrača&lt;br /&gt;
		banPlayer ( bannedPlayer, theClient, reason )&lt;br /&gt;
		outputChatBox ( &amp;quot;progon: &amp;quot; .. bannedName .. &amp;quot; uspješno prognan&amp;quot;, theClient )&lt;br /&gt;
&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox ( &amp;quot;progon: Nemaš dopuštenje&amp;quot;, theClient )&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;ban&amp;quot;, banPlayerCommand )&lt;br /&gt;
&lt;br /&gt;
-- Primjer funkcije sa korijenovim elementom. Ovdje možeš predati igračev element funkciji.&lt;br /&gt;
function banCheater(theCheater)&lt;br /&gt;
	banPlayer(theCheater, getRootElement(), &amp;quot;Ti si prognan zbog varanja.&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ovo je primjer &amp;quot;Zaštitnog Zida&amp;quot; Igračevoga računa na prijavi.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
Firewall = &lt;br /&gt;
{&lt;br /&gt;
    [ 'AccountName' ] = 'SerialPlayer',&lt;br /&gt;
    [ '3ash8' ] = '9C9F3B55D9D7BB7135FF274D3BF444E4',&lt;br /&gt;
    [ 'test5' ] = '1D6F76CF8D7193792D13789849498452',&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
addEventHandler ( 'onPlayerLogin', getRootElement ( ),&lt;br /&gt;
    function ( _, theCurrentAccount )&lt;br /&gt;
    local Serial = Firewall[getAccountName(theCurrentAccount)]&lt;br /&gt;
        if ( Serial ) then&lt;br /&gt;
            if Serial ~= getPlayerSerial ( source ) then&lt;br /&gt;
                banPlayer ( source, false, false, true, getRootElement ( ), 'razlog prognuća' )&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;
==Vidi također==&lt;br /&gt;
{{Admin_functions}}&lt;br /&gt;
[[es:banPlayer]]&lt;br /&gt;
[[ru:BanPlayer]]&lt;/div&gt;</summary>
		<author><name>HuX</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=BanPlayer&amp;diff=42734</id>
		<title>BanPlayer</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=BanPlayer&amp;diff=42734"/>
		<updated>2014-10-26T23:21:56Z</updated>

		<summary type="html">&lt;p&gt;HuX: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server function}}&lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
This function will ban the specified player by either IP, [[serial]] or username&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Deprecated_feature|3|1.0|&lt;br /&gt;
This function will ban the specified player from the server by IP.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
ban banPlayer ( player bannedPlayer, [ bool IP = true, bool Username = false, bool Serial = false, &lt;br /&gt;
player responsiblePlayer = nil, string reason = nil, int seconds = 0 ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Deprecated_feature|3|1.0|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool banPlayer ( player bannedPlayer , [ element responsibleElement, string reason ] )         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
{{OOP||[[player]]:ban||}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''bannedPlayer:''' The player that will be banned from the server.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
*'''IP:''' Will player be banned by IP?&lt;br /&gt;
*'''Username:''' Will player be banned by username?&lt;br /&gt;
*'''Serial:''' Will player be banned by serial?&lt;br /&gt;
&lt;br /&gt;
:'''Note:''' to ban by username or serial, ''verifyserials'' must be enabled in the server configuration file.&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
*'''responsibleElement:''' The element that is responsible for banning the player. This can be a player or the root ([[getRootElement]]()) (Maximum 30 characters if using a string).&lt;br /&gt;
*'''reason:''' The reason the player will be banned from the server.&lt;br /&gt;
*'''seconds:''' The amount of seconds the player will be banned from the server for. This can be 0 for an infinite amount of time.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
{{Deprecated_feature|3|1.0|&lt;br /&gt;
Returns ''true'' if the player was banned succesfully, ''false'' if invalid arguments are specified.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
Returns a [[ban]] object if banned successfully, or ''false'' if unsuccessful.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example lets a player ban anyone if he has ACL rights.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--Add the &amp;quot;ban&amp;quot; command handler&lt;br /&gt;
-- Example with the player&lt;br /&gt;
function banPlayerCommand ( theClient, commandName, bannedName, reason )&lt;br /&gt;
&lt;br /&gt;
	-- Give the player a nice error if he doesn't have rights&lt;br /&gt;
	if ( hasObjectPermissionTo ( theClient, &amp;quot;function.banPlayer&amp;quot; ) ) then&lt;br /&gt;
		--Get player element from the name&lt;br /&gt;
		local bannedPlayer = getPlayerFromName ( bannedName )&lt;br /&gt;
&lt;br /&gt;
		--Ban the player&lt;br /&gt;
		banPlayer ( bannedPlayer, theClient, reason )&lt;br /&gt;
		outputChatBox ( &amp;quot;ban: &amp;quot; .. bannedName .. &amp;quot; successfully banned&amp;quot;, theClient )&lt;br /&gt;
&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox ( &amp;quot;ban: You don't have enough permissions&amp;quot;, theClient )&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;ban&amp;quot;, banPlayerCommand )&lt;br /&gt;
&lt;br /&gt;
-- Example function with the root element. Here you would pass a player element to the function.&lt;br /&gt;
function banCheater(theCheater)&lt;br /&gt;
	banPlayer(theCheater, getRootElement(), &amp;quot;You are banned because of cheating.&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This example is Firewall Account Player by serial on Login&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
Firewall = &lt;br /&gt;
{&lt;br /&gt;
    [ 'AccountName' ] = 'SerialPlayer',&lt;br /&gt;
    [ '3ash8' ] = '9C9F3B55D9D7BB7135FF274D3BF444E4',&lt;br /&gt;
    [ 'test5' ] = '1D6F76CF8D7193792D13789849498452',&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
addEventHandler ( 'onPlayerLogin', getRootElement ( ),&lt;br /&gt;
    function ( _, theCurrentAccount )&lt;br /&gt;
    local Serial = Firewall[getAccountName(theCurrentAccount)]&lt;br /&gt;
        if ( Serial ) then&lt;br /&gt;
            if Serial ~= getPlayerSerial ( source ) then&lt;br /&gt;
                banPlayer ( source, false, false, true, getRootElement ( ), 'reason ban' )&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;
{{Admin_functions}}&lt;br /&gt;
[[es:banPlayer]]&lt;br /&gt;
[[ru:BanPlayer]]&lt;/div&gt;</summary>
		<author><name>HuX</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=BanPlayer&amp;diff=42733</id>
		<title>BanPlayer</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=BanPlayer&amp;diff=42733"/>
		<updated>2014-10-26T23:20:02Z</updated>

		<summary type="html">&lt;p&gt;HuX: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server function}}&lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
This function will ban the specified player by either IP, [[serial]] or username&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Deprecated_feature|3|1.0|&lt;br /&gt;
This function will ban the specified player from the server by IP.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
ban banPlayer ( player bannedPlayer, [ bool IP = true, bool Username = false, bool Serial = false, &lt;br /&gt;
player responsiblePlayer = nil, string reason = nil, int seconds = 0 ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Deprecated_feature|3|1.0|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool banPlayer ( player bannedPlayer , [ element responsibleElement, string reason ] )         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
{{OOP||[[player]]:ban||}}&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''bannedPlayer:''' The player that will be banned from the server.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
*'''IP:''' Will player be banned by IP?&lt;br /&gt;
*'''Username:''' Will player be banned by username?&lt;br /&gt;
*'''Serial:''' Will player be banned by serial?&lt;br /&gt;
&lt;br /&gt;
:'''Note:''' to ban by username or serial, ''verifyserials'' must be enabled in the server configuration file.&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
*'''responsibleElement:''' The element that is responsible for banning the player. This can be a player or the root ([[getRootElement]]()) (Maximum 30 characters if using a string).&lt;br /&gt;
*'''reason:''' The reason the player will be banned from the server.&lt;br /&gt;
*'''seconds:''' The amount of seconds the player will be banned from the server for. This can be 0 for an infinite amount of time.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
{{Deprecated_feature|3|1.0|&lt;br /&gt;
Returns ''true'' if the player was banned succesfully, ''false'' if invalid arguments are specified.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
Returns a [[ban]] object if banned successfully, or ''false'' if unsuccessful.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example lets a player ban anyone if he has ACL rights.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--Add the &amp;quot;ban&amp;quot; command handler&lt;br /&gt;
-- Example with the player&lt;br /&gt;
function banPlayerCommand ( theClient, commandName, bannedName, reason )&lt;br /&gt;
&lt;br /&gt;
	-- Give the player a nice error if he doesn't have rights&lt;br /&gt;
	if ( hasObjectPermissionTo ( theClient, &amp;quot;function.banPlayer&amp;quot; ) ) then&lt;br /&gt;
		--Get player element from the name&lt;br /&gt;
		local bannedPlayer = getPlayerFromName ( bannedName )&lt;br /&gt;
&lt;br /&gt;
		--Ban the player&lt;br /&gt;
		banPlayer ( bannedPlayer, theClient, reason )&lt;br /&gt;
		outputChatBox ( &amp;quot;ban: &amp;quot; .. bannedName .. &amp;quot; successfully banned&amp;quot;, theClient )&lt;br /&gt;
&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox ( &amp;quot;ban: You don't have enough permissions&amp;quot;, theClient )&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;ban&amp;quot;, banPlayerCommand )&lt;br /&gt;
&lt;br /&gt;
-- Example function with the root element. Here you would pass a player element to the function.&lt;br /&gt;
function banCheater(theCheater)&lt;br /&gt;
	banPlayer(theCheater, getRootElement(), &amp;quot;You are banned because of cheating.&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This example is Firewall Account Player by serial on Login&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
Firewall = &lt;br /&gt;
{&lt;br /&gt;
    [ 'AccountName' ] = 'SerialPlayer',&lt;br /&gt;
    [ '3ash8' ] = '9C9F3B55D9D7BB7135FF274D3BF444E4',&lt;br /&gt;
    [ 'test5' ] = '1D6F76CF8D7193792D13789849498452',&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
addEventHandler ( 'onPlayerLogin', getRootElement ( ),&lt;br /&gt;
    function ( _, theCurrentAccount )&lt;br /&gt;
    local Serial = Firewall[getAccountName(theCurrentAccount)]&lt;br /&gt;
        if ( Serial ) then&lt;br /&gt;
            if Serial ~= getPlayerSerial ( source ) then&lt;br /&gt;
                banPlayer ( source, false, false, true, getRootElement ( ), 'reason ban' )&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;
{{Admin_functions}}&lt;br /&gt;
[[es:banPlayer]]&lt;br /&gt;
[[ru:BanPlayer]]&lt;br /&gt;
[[hr:banPlayer]]&lt;/div&gt;</summary>
		<author><name>HuX</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=HR/banPlayer&amp;diff=42732</id>
		<title>HR/banPlayer</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=HR/banPlayer&amp;diff=42732"/>
		<updated>2014-10-26T22:10:24Z</updated>

		<summary type="html">&lt;p&gt;HuX: Created page with &amp;quot;__NOTOC__  {{Server function}} {{New feature|3|1.0| Ova funkcija će prognati određenog igrača pomoću njegovog IP-a, serial-a, ili nadimka }}  {{Deprecated_feature|3|1....&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server function}}&lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
Ova funkcija će prognati određenog igrača pomoću njegovog IP-a, [[serial]]-a, ili nadimka&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Deprecated_feature|3|1.0|&lt;br /&gt;
This function will ban the specified player from the server by IP.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
ban banPlayer ( player prognaniIgrač, [ bool IP = true, bool Nadimak = false, bool Serial = false, &lt;br /&gt;
player odgovoranIgrač = nil, string razlog = nil, int sekunde = 0 ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Deprecated_feature|3|1.0|&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool banPlayer ( player prognaniIgrač , [ element odgovoranElement, string razlog ] )         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
{{OOP||[[player]]:ban||}}&lt;br /&gt;
===Potrebni Argumenti=== &lt;br /&gt;
*'''prognaniIgrač:''' Igrač koji će biti prognan sa servera.&lt;br /&gt;
&lt;br /&gt;
===Izborni Argumenti=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
*'''IP:''' Hoće li igrač biti prognan pomoću IP-a?&lt;br /&gt;
*'''Nadimak:''' Hoće li igrač biti prognan pomoću nadimka?&lt;br /&gt;
*'''Serial:''' Hoće li igrač biti prognan pomoću serial-a?&lt;br /&gt;
&lt;br /&gt;
:'''Napomena:''' da prognaš pomoću nadimka ili serial-a, ''verifyserials'' mora biti upaljen u datoteci konfiguracije servera.&lt;br /&gt;
&lt;br /&gt;
}}&lt;br /&gt;
*'''odgovoranElement:''' Element koji je odgovoran za prognuće igrača. Ovo može biti igrač ili korijen ([[getRootElement]]()) (Najviše 30 slova ako se koristi string).&lt;br /&gt;
*'''razlog:''' Razlog zbog kojeg će igrač biti prognan sa servera.&lt;br /&gt;
*'''sekunde:''' Broj sekundi koliko će igrač biti prognan sa servera. Ovo može biti 0 za beskonačnu količinu vremena.&lt;br /&gt;
&lt;br /&gt;
===Vraća===&lt;br /&gt;
{{Deprecated_feature|3|1.0|&lt;br /&gt;
Vraća ''true'' ako je igrač prognan uspješno, ''false'' ako su nevaljani argumenti naznačeni.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{New feature|3|1.0|&lt;br /&gt;
Vraća [[ban]] objekt ako je prognan uspješno, ili ''false'' ako je neuspješno.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Primjer==&lt;br /&gt;
Ovaj primjer dopušta igraču da progna bilo koga ako ima ACL prava.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Dodaj &amp;quot;ban&amp;quot; komandu&lt;br /&gt;
-- Primjer sa igračem&lt;br /&gt;
function banPlayerCommand ( theClient, commandName, bannedName, reason )&lt;br /&gt;
&lt;br /&gt;
	-- Obavijesti igrača ako nema ACL prava&lt;br /&gt;
	if ( hasObjectPermissionTo ( theClient, &amp;quot;function.banPlayer&amp;quot; ) ) then&lt;br /&gt;
		--Pronađi igrača iz imena&lt;br /&gt;
		local bannedPlayer = getPlayerFromName ( bannedName )&lt;br /&gt;
&lt;br /&gt;
		--Prognaj igrača&lt;br /&gt;
		banPlayer ( bannedPlayer, theClient, reason )&lt;br /&gt;
		outputChatBox ( &amp;quot;progon: &amp;quot; .. bannedName .. &amp;quot; uspješno prognan&amp;quot;, theClient )&lt;br /&gt;
&lt;br /&gt;
	else&lt;br /&gt;
		outputChatBox ( &amp;quot;progon: Nemaš dopuštenje&amp;quot;, theClient )&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;ban&amp;quot;, banPlayerCommand )&lt;br /&gt;
&lt;br /&gt;
-- Primjer funkcije sa korijenovim elementom. Ovdje možeš predati igračev element funkciji.&lt;br /&gt;
function banCheater(theCheater)&lt;br /&gt;
	banPlayer(theCheater, getRootElement(), &amp;quot;Ti si prognan zbog varanja.&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ovo je primjer &amp;quot;Zaštitnog Zida&amp;quot; Igračevoga računa na prijavi.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
Firewall = &lt;br /&gt;
{&lt;br /&gt;
    [ 'AccountName' ] = 'SerialPlayer',&lt;br /&gt;
    [ '3ash8' ] = '9C9F3B55D9D7BB7135FF274D3BF444E4',&lt;br /&gt;
    [ 'test5' ] = '1D6F76CF8D7193792D13789849498452',&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
addEventHandler ( 'onPlayerLogin', getRootElement ( ),&lt;br /&gt;
    function ( _, theCurrentAccount )&lt;br /&gt;
    local Serial = Firewall[getAccountName(theCurrentAccount)]&lt;br /&gt;
        if ( Serial ) then&lt;br /&gt;
            if Serial ~= getPlayerSerial ( source ) then&lt;br /&gt;
                banPlayer ( source, false, false, true, getRootElement ( ), 'razlog prognuća' )&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;
==Vidi također==&lt;br /&gt;
{{Admin_functions}}&lt;br /&gt;
[[es:banPlayer]]&lt;br /&gt;
[[ru:BanPlayer]]&lt;/div&gt;</summary>
		<author><name>HuX</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User_talk:HuX&amp;diff=42728</id>
		<title>User talk:HuX</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User_talk:HuX&amp;diff=42728"/>
		<updated>2014-10-25T15:34:51Z</updated>

		<summary type="html">&lt;p&gt;HuX: Created page with &amp;quot;test&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;test&lt;/div&gt;</summary>
		<author><name>HuX</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetWeaponFlags&amp;diff=42568</id>
		<title>GetWeaponFlags</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetWeaponFlags&amp;diff=42568"/>
		<updated>2014-10-12T22:15:22Z</updated>

		<summary type="html">&lt;p&gt;HuX: /* Required Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
{{Needs_Example}}&lt;br /&gt;
Gets the flags of the custom weapon (used to determine what to hit)&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;value getWeaponFlags ( weapon theWeapon, string theFlag )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''theWeapon:''' The weapon to get the flag of.&lt;br /&gt;
* '''theFlag:''' The weapon flag to get:&lt;br /&gt;
** bool disable_model disable the weapon model of the weapon&lt;br /&gt;
** flags edit the processLineOfSight flags used to find the hit position&lt;br /&gt;
** bool checkBuildings&lt;br /&gt;
** bool checkCarTires&lt;br /&gt;
** bool checkDummies&lt;br /&gt;
** bool checkObjects&lt;br /&gt;
** bool checkPeds&lt;br /&gt;
** bool checkVehicles&lt;br /&gt;
** bool checkSeeThroughStuff&lt;br /&gt;
** bool checkShootThroughStuff&lt;br /&gt;
** bool instant_reload reload the weapon instantly rather than doing a reload&lt;br /&gt;
** bool shoot_if_out_of_range shoot the target position if out of weapon range&lt;br /&gt;
** bool shoot_if_blocked shoot the target position if blocked&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the ''value(s)'' on success (flags have 8 values), ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;--TODO&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
{{Requirements|n/a|1.3.0-9.04555|}}&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client weapon creation functions}}&lt;/div&gt;</summary>
		<author><name>HuX</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetModelHandling&amp;diff=42567</id>
		<title>GetModelHandling</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetModelHandling&amp;diff=42567"/>
		<updated>2014-10-12T22:08:36Z</updated>

		<summary type="html">&lt;p&gt;HuX: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
{{Needs_Example}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This function returns a table containing the handling data of the specified vehicle model.&lt;br /&gt;
&lt;br /&gt;
Note: the data returned may not reflect the actual handling of a particular vehicle, since this may be overriden by the [[setVehicleHandling]] function.&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 getModelHandling ( int modelId ) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''modelId:''' The vehicle model you wish to get the handling data of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''table'' containing all the handling data, ''false'' if an invalid vehicle model is specified. Here is a list of valid table properties and what they return:&lt;br /&gt;
{{Handling Properties}}&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getHandlings(thePlayer,commandName,id) &lt;br /&gt;
   if id then&lt;br /&gt;
     local getVehicleHandlings = getModelHandling(id) &lt;br /&gt;
	    for k in pairs (getVehicleHandlings) do &lt;br /&gt;
	       outputChatBox(tostring(k)) &lt;br /&gt;
	    end&lt;br /&gt;
   else return end &lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;gethandling&amp;quot;,getHandlings)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See other vehicle functions==&lt;br /&gt;
{{Vehicle functions}}&lt;/div&gt;</summary>
		<author><name>HuX</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetModelHandling&amp;diff=42566</id>
		<title>GetModelHandling</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetModelHandling&amp;diff=42566"/>
		<updated>2014-10-12T22:08:15Z</updated>

		<summary type="html">&lt;p&gt;HuX: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
{{Needs_Example}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This function returns a table containing the handling data of the specified vehicle model.&lt;br /&gt;
&lt;br /&gt;
Note: the data returned may not reflect the actual handling of a particular vehicle, since this may be overriden by the [[setVehicleHandling]] function.&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 getModelHandling ( int modelId ) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''modelId:''' The vehicle model you wish to get the handling data of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''table'' containing all the handling data, ''false'' if an invalid vehicle model is specified. Here is a list of valid table properties and what they return:&lt;br /&gt;
{{Handling Properties}}&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getHandlings(thePlayer,commandName,id) &lt;br /&gt;
   if id then&lt;br /&gt;
     local getVehicleHandlings = getModelHandling(id) &lt;br /&gt;
	    for k in pairs (getVehicleHandlings) do &lt;br /&gt;
		outputChatBox(tostring(k)) &lt;br /&gt;
	    end&lt;br /&gt;
   else return end &lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;gethandling&amp;quot;,getHandlings)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See other vehicle functions==&lt;br /&gt;
{{Vehicle functions}}&lt;/div&gt;</summary>
		<author><name>HuX</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetModelHandling&amp;diff=42565</id>
		<title>GetModelHandling</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetModelHandling&amp;diff=42565"/>
		<updated>2014-10-12T22:07:55Z</updated>

		<summary type="html">&lt;p&gt;HuX: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
{{Needs_Example}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This function returns a table containing the handling data of the specified vehicle model.&lt;br /&gt;
&lt;br /&gt;
Note: the data returned may not reflect the actual handling of a particular vehicle, since this may be overriden by the [[setVehicleHandling]] function.&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 getModelHandling ( int modelId ) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''modelId:''' The vehicle model you wish to get the handling data of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''table'' containing all the handling data, ''false'' if an invalid vehicle model is specified. Here is a list of valid table properties and what they return:&lt;br /&gt;
{{Handling Properties}}&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getHandlings(thePlayer,commandName,id) &lt;br /&gt;
   if id then&lt;br /&gt;
     local getVehicleHandlings = getModelHandling(id) &lt;br /&gt;
	    for k in pairs (getVehicleHandlings) do &lt;br /&gt;
		outputChatBox(tostring(k)) &lt;br /&gt;
		end&lt;br /&gt;
   else return end &lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;gethandling&amp;quot;,getHandlings)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See other vehicle functions==&lt;br /&gt;
{{Vehicle functions}}&lt;/div&gt;</summary>
		<author><name>HuX</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetModelHandling&amp;diff=42564</id>
		<title>GetModelHandling</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetModelHandling&amp;diff=42564"/>
		<updated>2014-10-12T22:06:58Z</updated>

		<summary type="html">&lt;p&gt;HuX: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
{{Needs_Example}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This function returns a table containing the handling data of the specified vehicle model.&lt;br /&gt;
&lt;br /&gt;
Note: the data returned may not reflect the actual handling of a particular vehicle, since this may be overriden by the [[setVehicleHandling]] function.&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 getModelHandling ( int modelId ) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''modelId:''' The vehicle model you wish to get the handling data of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''table'' containing all the handling data, ''false'' if an invalid vehicle model is specified. Here is a list of valid table properties and what they return:&lt;br /&gt;
{{Handling Properties}}&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getHandlings(thePlayer,commandName,id) &lt;br /&gt;
   if id then&lt;br /&gt;
     local getVehicleHandlings = getModelHandling(id) &lt;br /&gt;
	    for k in pairs (getVehicleHandlings) do &lt;br /&gt;
		outputChatBox(tostring(k)) &lt;br /&gt;
		end&lt;br /&gt;
   else return end &lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;gethandling&amp;quot;,getHandlings) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See other vehicle functions==&lt;br /&gt;
{{Vehicle functions}}&lt;/div&gt;</summary>
		<author><name>HuX</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetModelHandling&amp;diff=42563</id>
		<title>GetModelHandling</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetModelHandling&amp;diff=42563"/>
		<updated>2014-10-12T22:03:41Z</updated>

		<summary type="html">&lt;p&gt;HuX: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Server function}}&lt;br /&gt;
{{Needs_Example}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This function returns a table containing the handling data of the specified vehicle model.&lt;br /&gt;
&lt;br /&gt;
Note: the data returned may not reflect the actual handling of a particular vehicle, since this may be overriden by the [[setVehicleHandling]] function.&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 getModelHandling ( int modelId ) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''modelId:''' The vehicle model you wish to get the handling data of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''table'' containing all the handling data, ''false'' if an invalid vehicle model is specified. Here is a list of valid table properties and what they return:&lt;br /&gt;
{{Handling Properties}}&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;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function getHandlings(thePlayer,commandName,id) -- 'id' represents a vehicle ID(number)&lt;br /&gt;
   if id then&lt;br /&gt;
     local getVehicleHandlings = getModelHandling(id) -- returns a table&lt;br /&gt;
	    for k in pairs (getVehicleHandlings) do -- for our table do&lt;br /&gt;
		outputChatBox(tostring(k)) -- output every model's handling property&lt;br /&gt;
		end&lt;br /&gt;
   else return end -- if no id then stop executing the code&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;gethandling&amp;quot;,getHandlings) -- attach the function to command 'gethandling'&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See other vehicle functions==&lt;br /&gt;
{{Vehicle functions}}&lt;/div&gt;</summary>
		<author><name>HuX</name></author>
	</entry>
</feed>