<?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=Ken+Xeiko</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=Ken+Xeiko"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Ken_Xeiko"/>
	<updated>2026-05-15T07:38:40Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:Admin&amp;diff=32574</id>
		<title>Resource:Admin</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:Admin&amp;diff=32574"/>
		<updated>2012-08-22T00:32:05Z</updated>

		<summary type="html">&lt;p&gt;Ken Xeiko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Resource page}}&lt;br /&gt;
A quick tutorial on how to get admin rights and install admin resource.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;section name=&amp;quot;MTA 1.0.0 and lower&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;false&amp;quot;&amp;gt;&lt;br /&gt;
'''Note:''' Since mta 1.0.5 the accounts.xml file has been removed and replaced by sqlite.&lt;br /&gt;
&lt;br /&gt;
At first, open the '''accounts.xml''' file located in '''server\mods\deathmatch\''' and add a line with your account details, like on the following example.&lt;br /&gt;
&lt;br /&gt;
[[Image:admin_accounts.png]]&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To add an account in '''MTA {{padleft:|3|{{Current Version|full}}}}''' use the following command in the server&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The server needs to run for this action&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addaccount &amp;lt;username&amp;gt; &amp;lt;password&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Server should not be running when you are editing the acl file below&lt;br /&gt;
&lt;br /&gt;
Then you open the '''acl.xml''' file located in the same folder and add yourself as an object to the Admin group by using the 'user.*' syntax, where * would be your account name.&lt;br /&gt;
&lt;br /&gt;
[[Image:admin_acl.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now open your '''mtaserver.conf''' file and scroll to the bottom, make sure the admin resource is added to the ones that start with the server (note: protected=&amp;quot;1&amp;quot; means that it can not be stopped).&lt;br /&gt;
&lt;br /&gt;
[[Image:admin_mtaserver.png]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now that you're done with server files, you can finally start it. Connect to the server itself and login with your account details: use 'login [username] &amp;lt;password&amp;gt;'. If it tells you to press 'p' you have done everything right, congratulations! If not, do this from the very beginning.&lt;br /&gt;
[[Category:Scripting Concepts]]&lt;br /&gt;
&lt;br /&gt;
[[it:Resource:Admin]]&lt;br /&gt;
[[ru:Resource:Admin]]&lt;/div&gt;</summary>
		<author><name>Ken Xeiko</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=32192</id>
		<title>Template:Useful Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=32192"/>
		<updated>2012-08-07T14:25:48Z</updated>

		<summary type="html">&lt;p&gt;Ken Xeiko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[callClientFunction]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any clientside function from the server's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[callServerFunction]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any server-side function from the client's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[centerWindow]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function center the window in any resolution.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[Check]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if it's arguments are of the right types and calls the error-function if one isn't.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[coroutine.resume]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Fix for hidden coroutine error messages&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[dxDrawColorText]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a dx text with #RRGGBB color codes support.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[findRotation]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Takes two points and returns the direction from point A to point B.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[FormatDate]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Formats a date on the basis of a format string and returns it.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[getAge]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia', sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the age of a birthday.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[getAlivePlayersInTeam]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the alive players in a team.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[getCursorMoveOn]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks in which way the cursor is currently moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[getElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get element speed in kph or mph units.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[getPlayerFromNamePart]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get player From his Name part.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[getPointFromDistanceRotation]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Finds a point based on a starting point, direction and distance.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[getResourceSettings]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource settings.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[getTimestamp]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» With this function you can get the [http://en.wikipedia.org/wiki/Unix_time UNIX timestamp].&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[IfElse]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Returns one of two values based on a boolean expression.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[isLeapYear]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Checks if the given year is a leap year.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[iterElements]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Returns an iterator for your for loops saving time typing ipairs( getElementsByType( type ) ), instead you type: iterElements( type ).&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[math.round]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Rounds a number whereas the number of decimals to keep and the method may be set.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[onVehicleWeaponFire]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This code implements an event that is triggered when a player in a vehicle fires a vehicles weapon.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[RGBToHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a string representing the color in hexadecimal.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[setElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to set moving element speed in kph or mph units.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[setTableProtected]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Protects a table and makes it read-only.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[setVehicleGravityPoint]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This clientside function sets a vehicle's gravity in the direction of a 3 dimensional coordinate with the strength specified.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[isVehicleOnRoof]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether vehicle is on roof.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[string.explode]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function splits a string at a given separator pattern and returns a table with the pieces.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[table.copy]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function copies a whole table and all the tables in that table.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[table.map]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function goes through a table and replaces every field with the return of the passed function, where the field's value is passed as first argument and optionally more arguments.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[table.size]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Finds the absolute size of a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[toHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a decimal number to a hexadecimal number, as a fix to be used clientside.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[var_dump]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;»This function outputs information about one or more variables using outputConsole(). &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[multi_check]] &amp;lt;span style=&amp;quot;color: gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks one element to many, handy and clean. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[isElementInPhotograph]] &amp;lt;span style=&amp;quot;color: gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element was in the player's camera picture. This needs writing still. --[[User:Ransom|Ransom]] 21:45, 2 May 2012 (UTC) &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[getOffsetFromXYZ]]  &amp;lt;span style=&amp;quot;color: gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to take an entity and a position and calculate the relative offset between them accounting for rotations. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[dxDrawGifImage]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function simulates the effect of a GIF image by using image sprites.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[getPlayersInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets all the players in a photograph.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[dxDrawRectangle3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D rectangle.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[dxDrawImage3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D image.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[string.count]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function counts a text from a text.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[getOnlineAdmins]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function will give the online admins.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[dxGetFontSizeFromHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculate a font size from given height for dxDraw.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[isElementInRange]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check is the element's range to the main point is smaller than (or as big as) the maximum range.&amp;lt;/span&amp;gt;&lt;br /&gt;
[[Category:Useful Functions]]&lt;/div&gt;</summary>
		<author><name>Ken Xeiko</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=32191</id>
		<title>Template:Useful Functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=32191"/>
		<updated>2012-08-07T14:25:19Z</updated>

		<summary type="html">&lt;p&gt;Ken Xeiko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[callClientFunction]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any clientside function from the server's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[callServerFunction]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to call any server-side function from the client's side.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[centerWindow]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function center the window in any resolution.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[Check]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if it's arguments are of the right types and calls the error-function if one isn't.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[coroutine.resume]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Fix for hidden coroutine error messages&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[dxDrawColorText]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a dx text with #RRGGBB color codes support.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[findRotation]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Takes two points and returns the direction from point A to point B.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[FormatDate]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Formats a date on the basis of a format string and returns it.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[getAge]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia', sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculates the age of a birthday.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[getAlivePlayersInTeam]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the alive players in a team.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[getCursorMoveOn]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks in which way the cursor is currently moving.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[getElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get element speed in kph or mph units.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[getPlayerFromNamePart]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to get player From his Name part.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[getPointFromDistanceRotation]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Finds a point based on a starting point, direction and distance.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[getResourceSettings]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a table of the resource settings.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[getTimestamp]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» With this function you can get the [http://en.wikipedia.org/wiki/Unix_time UNIX timestamp].&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[IfElse]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Returns one of two values based on a boolean expression.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[isLeapYear]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Checks if the given year is a leap year.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[iterElements]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Returns an iterator for your for loops saving time typing ipairs( getElementsByType( type ) ), instead you type: iterElements( type ).&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[math.round]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Rounds a number whereas the number of decimals to keep and the method may be set.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[onVehicleWeaponFire]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This code implements an event that is triggered when a player in a vehicle fires a vehicles weapon.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[RGBToHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function returns a string representing the color in hexadecimal.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[setElementSpeed]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to set moving element speed in kph or mph units.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[setTableProtected]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Protects a table and makes it read-only.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[setVehicleGravityPoint]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This clientside function sets a vehicle's gravity in the direction of a 3 dimensional coordinate with the strength specified.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[isVehicleOnRoof]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks whether vehicle is on roof.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[string.explode]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function splits a string at a given separator pattern and returns a table with the pieces.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[table.copy]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function copies a whole table and all the tables in that table.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[table.map]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function goes through a table and replaces every field with the return of the passed function, where the field's value is passed as first argument and optionally more arguments.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[table.size]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» Finds the absolute size of a table.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[toHex]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function converts a decimal number to a hexadecimal number, as a fix to be used clientside.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[var_dump]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;»This function outputs information about one or more variables using outputConsole(). &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[multi_check]] &amp;lt;span style=&amp;quot;color: gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks one element to many, handy and clean. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[isElementInPhotograph]] &amp;lt;span style=&amp;quot;color: gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function checks if an element was in the player's camera picture. This needs writing still. --[[User:Ransom|Ransom]] 21:45, 2 May 2012 (UTC) &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[getOffsetFromXYZ]]  &amp;lt;span style=&amp;quot;color: gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to take an entity and a position and calculate the relative offset between them accounting for rotations. &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[dxDrawGifImage]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function simulates the effect of a GIF image by using image sprites.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[getPlayersInPhotograph]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function gets all the players in a photograph.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[dxDrawRectangle3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D rectangle.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[dxDrawImage3D]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function draws a 3D image.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[string.count]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function counts a text from a text.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[getOnlineAdmins]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function will give the online admins.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[dxGetFontSizeFromHeight]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function allows you to check is the element's range to the main point is smaller than (or as big as) the maximum range.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[[isElementInRange]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function calculate a font size from height.&amp;lt;/span&amp;gt;&lt;br /&gt;
[[Category:Useful Functions]]&lt;/div&gt;</summary>
		<author><name>Ken Xeiko</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsElementInRange&amp;diff=32138</id>
		<title>IsElementInRange</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsElementInRange&amp;diff=32138"/>
		<updated>2012-08-03T21:47:07Z</updated>

		<summary type="html">&lt;p&gt;Ken Xeiko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
This function allows you to check is the element's range to the main point is smaller than (or as big as) the maximum range.&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool isElementInRange( element theElement, float x, float y, float z, float range )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' the element whose range we want to check.&lt;br /&gt;
*'''x:''' the x coordinate of the main point.&lt;br /&gt;
*'''y:''' the y coordinate of the main point.&lt;br /&gt;
*'''z:''' the z coordinate of the main point.&lt;br /&gt;
*'''range:''' the range of the main point to the element.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
*Returns ''true'' if the element is in range of the main point, ''false'' otherwise.&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 isElementInRange(theElement, x, y, z, range)&lt;br /&gt;
   if theElement and x and y and z and range then&lt;br /&gt;
      local px, py, pz = getElementPosition (theElement)&lt;br /&gt;
      return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5 &amp;lt;= range -- returns true if it the range of the element to the main point is smaller than (or as big as) the maximum range.&lt;br /&gt;
   else&lt;br /&gt;
      return false&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
 &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;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example&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;killnear&amp;quot;,&lt;br /&gt;
function (player)&lt;br /&gt;
   local x, y, z = getElementPosition (player)&lt;br /&gt;
   for _,p in ipairs (getElementsByType ('player')) do&lt;br /&gt;
      if isElementInRange (p, x, y, z, 25) then -- check if the player's range to the command user is 25m.&lt;br /&gt;
         if p ~= player then&lt;br /&gt;
            killPed (p, player) -- kill player within 25m from the command user.&lt;br /&gt;
         end&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;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function created by '''KenXeiko'''.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Ken Xeiko</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsElementInRange&amp;diff=32137</id>
		<title>IsElementInRange</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsElementInRange&amp;diff=32137"/>
		<updated>2012-08-03T21:44:30Z</updated>

		<summary type="html">&lt;p&gt;Ken Xeiko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
This function allows you to check is the element's range to the main point is smaller than (or as big as) the maximum range.&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool isElementInRange( element theElement, float x, float y, float z, fload range )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' the element whose range we want to check.&lt;br /&gt;
*'''x:''' the x coordinate of the main point.&lt;br /&gt;
*'''y:''' the y coordinate of the main point.&lt;br /&gt;
*'''z:''' the z coordinate of the main point.&lt;br /&gt;
*'''range:''' the range of the main point to the element.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
*Returns ''true'' if the element is in range of the main point, ''false'' otherwise.&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 isElementInRange(theElement, x, y, z, range)&lt;br /&gt;
   if theElement and x and y and z and range then&lt;br /&gt;
      local px, py, pz = getElementPosition (theElement)&lt;br /&gt;
      return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5 &amp;lt;= range -- returns true if it the range of the element to the main point is smaller than (or as big as) the maximum range.&lt;br /&gt;
   else&lt;br /&gt;
      return false&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
 &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;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example&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;killnear&amp;quot;,&lt;br /&gt;
function (player)&lt;br /&gt;
   local x, y, z = getElementPosition (player)&lt;br /&gt;
   for _,p in ipairs (getElementsByType ('player')) do&lt;br /&gt;
      if isElementInRange (p, x, y, z, 25) then -- check if the player's range to the command user is 25m.&lt;br /&gt;
         if p ~= player then&lt;br /&gt;
            killPed (p, player) -- kill player within 25m from the command user.&lt;br /&gt;
         end&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;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function created by '''KenXeiko'''.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Ken Xeiko</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsElementInRange&amp;diff=32136</id>
		<title>IsElementInRange</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsElementInRange&amp;diff=32136"/>
		<updated>2012-08-03T21:43:15Z</updated>

		<summary type="html">&lt;p&gt;Ken Xeiko: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
This function allows you to find out is the element in range of the main point.&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool isElementInRange( element theElement, float x, float y, float z, fload range )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' the element whose range we want to check.&lt;br /&gt;
*'''x:''' the x coordinate of the main point.&lt;br /&gt;
*'''y:''' the y coordinate of the main point.&lt;br /&gt;
*'''z:''' the z coordinate of the main point.&lt;br /&gt;
*'''range:''' the range of the main point to the element.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
*Returns ''true'' if the element is in range of the main point, ''false'' otherwise.&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 isElementInRange(theElement, x, y, z, range)&lt;br /&gt;
   if theElement and x and y and z and range then&lt;br /&gt;
      local px, py, pz = getElementPosition (theElement)&lt;br /&gt;
      return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5 &amp;lt;= range -- returns true if it the range of the element to the main point is smaller than (or as big as) the maximum range.&lt;br /&gt;
   else&lt;br /&gt;
      return false&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
 &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;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example&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;killnear&amp;quot;,&lt;br /&gt;
function (player)&lt;br /&gt;
   local x, y, z = getElementPosition (player)&lt;br /&gt;
   for _,p in ipairs (getElementsByType ('player')) do&lt;br /&gt;
      if isElementInRange (p, x, y, z, 25) then -- check if the player's range to the command user is 25m.&lt;br /&gt;
         if p ~= player then&lt;br /&gt;
            killPed (p, player) -- kill player within 25m from the command user.&lt;br /&gt;
         end&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;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function created by '''KenXeiko'''.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Ken Xeiko</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsElementInRange&amp;diff=32135</id>
		<title>IsElementInRange</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsElementInRange&amp;diff=32135"/>
		<updated>2012-08-03T21:42:22Z</updated>

		<summary type="html">&lt;p&gt;Ken Xeiko: /* Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
This function allows you to find out is the element in range of the main point.&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool isElementInRange( element theElement, float x, float y, float z, fload range )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' the element whose range we want to check.&lt;br /&gt;
*'''x:''' the x coordinate of the main point.&lt;br /&gt;
*'''y:''' the y coordinate of the main point.&lt;br /&gt;
*'''z:''' the z coordinate of the main point.&lt;br /&gt;
*'''range:''' the range of the main point to the element.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
*Returns ''true'' if the element is in range of the main point, ''false'' otherwise.&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 isElementInRange(theElement, x, y, z, range)&lt;br /&gt;
   if theElement and x and y and z and range then&lt;br /&gt;
      local px, py, pz = getElementPosition (theElement)&lt;br /&gt;
      return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5 &amp;lt;= range -- returns true if it the range of the element to the main point is smaller than (or as big as) the maximum range.&lt;br /&gt;
   else&lt;br /&gt;
      return false&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
 &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;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example&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;killnear&amp;quot;,&lt;br /&gt;
function (player)&lt;br /&gt;
   local x, y, z = getElementPosition (player)&lt;br /&gt;
   for _,p in ipairs (getElementsByType ('player')) do&lt;br /&gt;
      if isElementInRange (p, x, y, z, 25) then&lt;br /&gt;
         if p ~= player then&lt;br /&gt;
            killPed (p, player) -- kill player within 25m from the command user.&lt;br /&gt;
         end&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;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function created by '''KenXeiko'''.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Ken Xeiko</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsElementInRange&amp;diff=32134</id>
		<title>IsElementInRange</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsElementInRange&amp;diff=32134"/>
		<updated>2012-08-03T21:42:07Z</updated>

		<summary type="html">&lt;p&gt;Ken Xeiko: /* Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
This function allows you to find out is the element in range of the main point.&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool isElementInRange( element theElement, float x, float y, float z, fload range )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' the element whose range we want to check.&lt;br /&gt;
*'''x:''' the x coordinate of the main point.&lt;br /&gt;
*'''y:''' the y coordinate of the main point.&lt;br /&gt;
*'''z:''' the z coordinate of the main point.&lt;br /&gt;
*'''range:''' the range of the main point to the element.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
*Returns ''true'' if the element is in range of the main point, ''false'' otherwise.&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 isElementInRange(theElement, x, y, z, range)&lt;br /&gt;
   if theElementand x and y and z and range then&lt;br /&gt;
      local px, py, pz = getElementPosition (theElement)&lt;br /&gt;
      return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5 &amp;lt;= range -- returns true if it the range of the element to the main point is smaller than (or as big as) the maximum range.&lt;br /&gt;
   else&lt;br /&gt;
      return false&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
 &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;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example&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;killnear&amp;quot;,&lt;br /&gt;
function (player)&lt;br /&gt;
   local x, y, z = getElementPosition (player)&lt;br /&gt;
   for _,p in ipairs (getElementsByType ('player')) do&lt;br /&gt;
      if isElementInRange (p, x, y, z, 25) then&lt;br /&gt;
         if p ~= player then&lt;br /&gt;
            killPed (p, player) -- kill player within 25m from the command user.&lt;br /&gt;
         end&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;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function created by '''KenXeiko'''.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Ken Xeiko</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsElementInRange&amp;diff=32133</id>
		<title>IsElementInRange</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsElementInRange&amp;diff=32133"/>
		<updated>2012-08-03T21:41:22Z</updated>

		<summary type="html">&lt;p&gt;Ken Xeiko: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
This function allows you to find out is the element in range of the main point.&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool isElementInRange( element theElement, float x, float y, float z, fload range )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' the element whose range we want to check.&lt;br /&gt;
*'''x:''' the x coordinate of the main point.&lt;br /&gt;
*'''y:''' the y coordinate of the main point.&lt;br /&gt;
*'''z:''' the z coordinate of the main point.&lt;br /&gt;
*'''range:''' the range of the main point to the element.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
*Returns ''true'' if the element is in range of the main point, ''false'' otherwise.&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 isElementInRange(element, x, y, z, range)&lt;br /&gt;
   if element and x and y and z and range then&lt;br /&gt;
      local px, py, pz = getElementPosition (player)&lt;br /&gt;
      return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5 &amp;lt;= range -- returns true if it the range of the element to the main point is smaller than (or as big as) the maximum range.&lt;br /&gt;
   else&lt;br /&gt;
      return false&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
 &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;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example&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;killnear&amp;quot;,&lt;br /&gt;
function (player)&lt;br /&gt;
   local x, y, z = getElementPosition (player)&lt;br /&gt;
   for _,p in ipairs (getElementsByType ('player')) do&lt;br /&gt;
      if isElementInRange (p, x, y, z, 25) then&lt;br /&gt;
         if p ~= player then&lt;br /&gt;
            killPed (p, player) -- kill player within 25m from the command user.&lt;br /&gt;
         end&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;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function created by '''KenXeiko'''.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Ken Xeiko</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsElementInRange&amp;diff=32132</id>
		<title>IsElementInRange</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsElementInRange&amp;diff=32132"/>
		<updated>2012-08-03T21:40:49Z</updated>

		<summary type="html">&lt;p&gt;Ken Xeiko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
This function allows you to find out is the element in range of the main point.&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool isElementInRange( element theElement, float x, float y, float z, fload range )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' the element whose range we want to check.&lt;br /&gt;
*'''x:''' the x coordinate of the main point.&lt;br /&gt;
*'''y:''' the y coordinate of the main point.&lt;br /&gt;
*'''z:''' the z coordinate of the main point.&lt;br /&gt;
*'''range:''' the range of the main point to the element.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
*Returns ''true'' if the element is in range of the main point, ''false'' otherwise.&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 isElementInRange(element, x, y, z, range)&lt;br /&gt;
   if element and x and y and z and range then&lt;br /&gt;
      local px, py, pz = getElementPosition (player)&lt;br /&gt;
      return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5 &amp;lt;= range -- returns true if it the range of the element to the main point is smaller than (or as big as) the maximum range.&lt;br /&gt;
   else&lt;br /&gt;
      return false&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
 &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;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example&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;killnear&amp;quot;,&lt;br /&gt;
function (player)&lt;br /&gt;
   local x, y, z = getElementPosition (player)&lt;br /&gt;
   for _,p in ipairs(getElementsByType('player')) do&lt;br /&gt;
      if isElementInRange(p, x, y, z, 25) then&lt;br /&gt;
         if p ~= player then&lt;br /&gt;
            killPed (p, player) -- kill player within 25m from the command user.&lt;br /&gt;
         end&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;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Function created by '''KenXeiko'''.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Ken Xeiko</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsElementInRange&amp;diff=32131</id>
		<title>IsElementInRange</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsElementInRange&amp;diff=32131"/>
		<updated>2012-08-03T21:36:19Z</updated>

		<summary type="html">&lt;p&gt;Ken Xeiko: Created page with &amp;quot;__NOTOC__ {{Useful Function}} This function allows you to find out is the element in range of the main point. ==Syntax==  &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt; bool isElementInRange( element theElement,...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Useful Function}}&lt;br /&gt;
This function allows you to find out is the element in range of the main point.&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool isElementInRange( element theElement, float x, float y, float z, fload range )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' the element whose range we want to check.&lt;br /&gt;
*'''x:''' the x coordinate of the main point.&lt;br /&gt;
*'''y:''' the y coordinate of the main point.&lt;br /&gt;
*'''z:''' the z coordinate of the main point.&lt;br /&gt;
*'''range:''' the range of the main point to the element.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
*Returns ''true'' if the element is in range of the main point, ''false'' otherwise.&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 isElementInRange(element, x, y, z, range)&lt;br /&gt;
   if element and x and y and z and range then&lt;br /&gt;
      local px,py,pz = getElementPosition (player)&lt;br /&gt;
      return ((x-px)^2+(y-py)^2+(z-pz)^2)^0.5 &amp;lt;= range -- returns true if it the range of the element to the main point is smaller than (or as big as) the maximum range.&lt;br /&gt;
   else&lt;br /&gt;
      return false&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;/div&gt;</summary>
		<author><name>Ken Xeiko</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetElementAttachedOffsets&amp;diff=32127</id>
		<title>GetElementAttachedOffsets</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetElementAttachedOffsets&amp;diff=32127"/>
		<updated>2012-08-03T12:45:42Z</updated>

		<summary type="html">&lt;p&gt;Ken Xeiko: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function returns the offsets of an element that has been attached to another element using [[attachElements]].&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, float, float, float getElementAttachedOffsets ( element theElement )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' The attached element.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns 6 [[float|floats]], of which the first 3 indicate the position offset (x, y, z), and the last 3 indicate the rotation offset (x, y, z), if successful. ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
'''Example:''' This example creates a car with a minigun&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Offsets&lt;br /&gt;
local x,y,z,rx,ry,rz= 0,-1.5,-0.1,0,0,-90&lt;br /&gt;
&lt;br /&gt;
function createArmedBobcat(cmd)&lt;br /&gt;
    local lx, ly, lz = getElementPosition(getLocalPlayer()) -- get the position of the player&lt;br /&gt;
    lx = lx + 5 -- add 5 units to the x position&lt;br /&gt;
    &lt;br /&gt;
    veh = createVehicle( 422, lx, ly, lz) -- create a bobcat&lt;br /&gt;
    base = createObject( 2985, 2,2,2) -- create a minigun_base object&lt;br /&gt;
    setElementCollisionsEnabled ( base, false ) -- the minigun_base damages the car&lt;br /&gt;
    -- you could alternatively load an empty col file for the minigun object&lt;br /&gt;
    attachElements ( base, veh,  x,y,z,rx,ry,rz) -- attach the base to the bobcat&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function rotateIt(cmd, addZ)&lt;br /&gt;
    if(addZ) then&lt;br /&gt;
        local x, y, z, rz, ry, rz = getElementAttachedOffsets (base) -- get the offsets&lt;br /&gt;
        rz = rz + addZ&lt;br /&gt;
        setElementAttachedOffsets (base, x, y, z, rx, ry, rz) -- update offsets&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addCommandHandler(&amp;quot;bobcat&amp;quot;, createArmedBobcat)&lt;br /&gt;
addCommandHandler(&amp;quot;rotate&amp;quot;, rotateIt)&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>Ken Xeiko</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientPlayerWeaponFire&amp;diff=32126</id>
		<title>OnClientPlayerWeaponFire</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientPlayerWeaponFire&amp;diff=32126"/>
		<updated>2012-08-03T12:42:48Z</updated>

		<summary type="html">&lt;p&gt;Ken Xeiko: /* Parameters */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Client event}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This event is called when player shoots a weapon.  This does not trigger for projectiles based, or melee weapons. Also note that this event is only triggered for players nearby the local player's camera. This is due to elements far away being streamed out.&lt;br /&gt;
&lt;br /&gt;
==Parameters==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int weapon, int ammo, int ammoInClip, float hitX, float hitY, float hitZ, element hitElement, float startX, float startY, float startZ&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
*'''weapon''':  an [[int]] representing [[weapons|weapon]] used for making a shot.&lt;br /&gt;
*'''ammo''': an [[int]] ammount of ammo left for this weapon type.&lt;br /&gt;
*'''ammoInClip''': an [[int]] ammount of ammo left for this weapon type in clip.&lt;br /&gt;
*'''hitX''', '''hitY''', '''hitZ''': [[float]] world coordinates representing a hit point.&lt;br /&gt;
*'''hitElement''': an [[element]] which was hit by a shot.&lt;br /&gt;
{{New feature/item|3.0152|1.3.1|4311|&lt;br /&gt;
*'''startX''', '''startY''', '''startZ''': [[float]] world coordinates representing the start of the bullet. Note: This is not the gun muzzle.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the streamed in [[player]] who fired the weapon.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example sends a warning to the local player if they shoot another player with a minigun.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--First, we create a function for the event handler to use.&lt;br /&gt;
function onClientPlayerWeaponFireFunc(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement )&lt;br /&gt;
    if weapon == 38 and getElementType(hitElement)==&amp;quot;player&amp;quot; then -- If the player shoots with a minigun, and hits another player...&lt;br /&gt;
         outputChatBox ( &amp;quot;Don't kill people with minigun, it's lame!&amp;quot;, 255, 0, 0 ) -- We output a warning to him.&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
-- Add this as a handler so that the function will be triggered every time the local player fires.&lt;br /&gt;
addEventHandler ( &amp;quot;onClientPlayerWeaponFire&amp;quot;, getLocalPlayer(), onClientPlayerWeaponFireFunc )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This example makes the Shotgun fire explosive rounds.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function onClientPlayerWeaponFireFunc(weapon, ammo, ammoInClip, hitX, hitY, hitZ, hitElement)&lt;br /&gt;
    if (weapon == 25) then -- If the player shoots with a shotgun&lt;br /&gt;
        createExplosion(hitX, hitY, hitZ, 12, true, false, true) -- Creates a tiny explosion where the bullet hit.&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
-- Add this as a handler so that the function will be triggered every time a player fires.&lt;br /&gt;
addEventHandler(&amp;quot;onClientPlayerWeaponFire&amp;quot;, root, onClientPlayerWeaponFireFunc)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
===Client player events===&lt;br /&gt;
{{Client_player_events}}&lt;br /&gt;
===Client event functions===&lt;br /&gt;
{{Client_event_functions}}&lt;/div&gt;</summary>
		<author><name>Ken Xeiko</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User:Ken_Xeiko&amp;diff=31965</id>
		<title>User:Ken Xeiko</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User:Ken_Xeiko&amp;diff=31965"/>
		<updated>2012-07-22T12:18:31Z</updated>

		<summary type="html">&lt;p&gt;Ken Xeiko: /* ToDo List */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;KenXeiko is only an gamer which is addicted of coding and scripting.&lt;br /&gt;
And also a fan of MTA:SA.&lt;br /&gt;
&lt;br /&gt;
==TODO List==&lt;br /&gt;
* Learn more about C++ and training more with it.&lt;br /&gt;
* Make more funny things on MTA:SA.&lt;/div&gt;</summary>
		<author><name>Ken Xeiko</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetElementAttachedOffsets&amp;diff=31964</id>
		<title>GetElementAttachedOffsets</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetElementAttachedOffsets&amp;diff=31964"/>
		<updated>2012-07-22T11:54:58Z</updated>

		<summary type="html">&lt;p&gt;Ken Xeiko: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function returns the offsets of an element that has been attached to another element using [[attachElements]].&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, float, float, float getElementAttachedOffsets ( element theElement )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' The attached element.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns 6 [[float|floats]], of which the first 3 indicate the position offset (x, y, z), and the last 3 indicate the rotation offset (x, y, z), if successful. ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Client&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
'''Example:''' This example creates a car with a minigun&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Offsets&lt;br /&gt;
local x,y,z,rx,ry,rz= 0,-1.5,-0.1,0,0,-90&lt;br /&gt;
&lt;br /&gt;
function createArmedBobcat(cmd)&lt;br /&gt;
    local lx, ly, lz = getElementPosition(getLocalPlayer()) -- get the position of the player&lt;br /&gt;
    lx = lx + 5 -- add 5 units to the x position&lt;br /&gt;
    &lt;br /&gt;
    veh = createVehicle( 422, lx, ly, lz) -- create a bobcat&lt;br /&gt;
    base = createObject( 2985, 2,2,2) -- create a minigun_base object&lt;br /&gt;
    setElementCollisionsEnabled ( base, false ) -- the minigun_base damages the car&lt;br /&gt;
    -- you could alternatively load an empty col file for the minigun object&lt;br /&gt;
    attachElements ( base, veh,  x,y,z,rx,ry,rz) -- attach the base to the bobcat&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function rotateIt(cmd, addZ)&lt;br /&gt;
    if(addZ) then&lt;br /&gt;
        local x, y, z, rz, ry, rz = getElementAttachedOffsets -- get the offsets&lt;br /&gt;
        rz = rz + addZ&lt;br /&gt;
        setElementAttachedOffsets (base, x, y, z, rx, ry, rz) -- update offsets&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addCommandHandler(&amp;quot;bobcat&amp;quot;, createArmedBobcat)&lt;br /&gt;
addCommandHandler(&amp;quot;rotate&amp;quot;, rotateIt)&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>Ken Xeiko</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User:Ken_Xeiko&amp;diff=31889</id>
		<title>User:Ken Xeiko</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User:Ken_Xeiko&amp;diff=31889"/>
		<updated>2012-07-14T14:14:57Z</updated>

		<summary type="html">&lt;p&gt;Ken Xeiko: Created page with &amp;quot;KenXeiko is only an gamer which is addicted of coding and scripting. And also a fan of MTA:SA.  ==ToDo List== * Learn more about C++ and training more with it. * Make more funny ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;KenXeiko is only an gamer which is addicted of coding and scripting.&lt;br /&gt;
And also a fan of MTA:SA.&lt;br /&gt;
&lt;br /&gt;
==ToDo List==&lt;br /&gt;
* Learn more about C++ and training more with it.&lt;br /&gt;
* Make more funny things on MTA:SA.&lt;br /&gt;
* Learn deustch (or my teacher will kill me, pff).&lt;/div&gt;</summary>
		<author><name>Ken Xeiko</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetWorldSpecialPropertyEnabled&amp;diff=31888</id>
		<title>SetWorldSpecialPropertyEnabled</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetWorldSpecialPropertyEnabled&amp;diff=31888"/>
		<updated>2012-07-14T14:07:00Z</updated>

		<summary type="html">&lt;p&gt;Ken Xeiko: /* Required Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
&lt;br /&gt;
Enables or disables a special world property (cheat).&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool setWorldSpecialPropertyEnabled ( string propname, bool enable )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''propname:''' the name of the property to set. Possible values are:&lt;br /&gt;
**'''hovercars''' - no known equivalent PC cheat, and allows cars to drive on water.&lt;br /&gt;
**'''aircars''' - equivalent of the RIPAZHA cheat, and allows cars to fly.&lt;br /&gt;
**'''extrabunny''' - equivalent of the CJPHONEHOME or JHJOECW cheat, and allows you to bunny hop on bicycles much higher.&lt;br /&gt;
**'''extrajump''' - equivalent of the KANGAROO cheat, and allows you to jump on foot much higher.&lt;br /&gt;
*'''enable:''' whether or not to enable the property.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client world functions}}&lt;/div&gt;</summary>
		<author><name>Ken Xeiko</name></author>
	</entry>
</feed>