<?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=Ronwolf1705</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=Ronwolf1705"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Ronwolf1705"/>
	<updated>2026-04-08T06:32:41Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetCursorMoveOn&amp;diff=30194</id>
		<title>GetCursorMoveOn</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetCursorMoveOn&amp;diff=30194"/>
		<updated>2012-04-30T20:32:44Z</updated>

		<summary type="html">&lt;p&gt;Ronwolf1705: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
This function checks in which way the cursor is currently moving.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string getCursorMoveOn( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns left,right,up or down.&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 getCursorMoveOn()&lt;br /&gt;
    if ( isCursorShowing() ) then&lt;br /&gt;
	left = &amp;quot;left&amp;quot;&lt;br /&gt;
	right = &amp;quot;right&amp;quot;&lt;br /&gt;
	up = &amp;quot;up&amp;quot;&lt;br /&gt;
	down = &amp;quot;down&amp;quot;&lt;br /&gt;
    zero = &amp;quot;nil&amp;quot;&lt;br /&gt;
	if getElementData(localPlayer,&amp;quot;movew&amp;quot;) == right then&lt;br /&gt;
	return right&lt;br /&gt;
	elseif getElementData(localPlayer,&amp;quot;movew&amp;quot;) == left then&lt;br /&gt;
	return left&lt;br /&gt;
	elseif getElementData(localPlayer,&amp;quot;movew&amp;quot;) == up then&lt;br /&gt;
	return up&lt;br /&gt;
	elseif getElementData(localPlayer,&amp;quot;movew&amp;quot;) == down then&lt;br /&gt;
	return down&lt;br /&gt;
	elseif getElementData(localPlayer,&amp;quot;movew&amp;quot;) == zero then&lt;br /&gt;
	return false&lt;br /&gt;
	end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function executeMoveOn(cursorX,cursorY)&lt;br /&gt;
    if ( isCursorShowing() ) then&lt;br /&gt;
	setElementData(localPlayer,&amp;quot;moveX&amp;quot;,cursorX)&lt;br /&gt;
	setElementData(localPlayer,&amp;quot;moveY&amp;quot;,cursorY)&lt;br /&gt;
	     if cursorX &amp;gt; cX then&lt;br /&gt;
         setElementData(localPlayer,&amp;quot;movew&amp;quot;,right)&lt;br /&gt;
	     elseif cursorX &amp;lt; cX then&lt;br /&gt;
	     setElementData(localPlayer,&amp;quot;movew&amp;quot;,left)&lt;br /&gt;
	     elseif cursorY &amp;gt; cY then&lt;br /&gt;
	     setElementData(localPlayer,&amp;quot;movew&amp;quot;,down)&lt;br /&gt;
	     elseif cursorY &amp;lt; cY then&lt;br /&gt;
	     setElementData(localPlayer,&amp;quot;movew&amp;quot;,up)&lt;br /&gt;
	     end&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientCursorMove&amp;quot;,root,executeMoveOn)&lt;br /&gt;
&lt;br /&gt;
setTimer(&lt;br /&gt;
function()&lt;br /&gt;
    if ( isCursorShowing() ) then&lt;br /&gt;
	local curX = getElementData(localPlayer,&amp;quot;moveX&amp;quot;)&lt;br /&gt;
	local curY = getElementData(localPlayer,&amp;quot;moveY&amp;quot;)&lt;br /&gt;
		 if cursorX == cX then&lt;br /&gt;
		 setElementData(localPlayer,&amp;quot;movew&amp;quot;,zero)&lt;br /&gt;
		 elseif cursorY == cY then&lt;br /&gt;
		 setElementData(localPlayer,&amp;quot;movew&amp;quot;,zero)&lt;br /&gt;
		 end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
,50,0)&lt;br /&gt;
&lt;br /&gt;
function previousM()&lt;br /&gt;
   if ( isCursorShowing() ) then&lt;br /&gt;
    cX = getElementData(localPlayer,&amp;quot;moveX&amp;quot;)&lt;br /&gt;
	cY = getElementData(localPlayer,&amp;quot;moveY&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
setTimer(previousM,50,0)&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;Client-side example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clientside example checks in which way cursor is currently moving.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bindKey (&amp;quot;m&amp;quot;, &amp;quot;down&amp;quot;,&lt;br /&gt;
function()&lt;br /&gt;
showCursor( not isCursorShowing() )&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientCursorMove&amp;quot;,root,&lt;br /&gt;
function()&lt;br /&gt;
    if ( isCursorShowing() ) then&lt;br /&gt;
	moveOn = getCursorMoveOn()&lt;br /&gt;
	outputChatBox(&amp;quot;cursor is moving on : &amp;quot; .. moveOn, localPlayer)&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;
&lt;br /&gt;
By '''ronwolf1705'''.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Ronwolf1705</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetCursorMoveOn&amp;diff=30193</id>
		<title>GetCursorMoveOn</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetCursorMoveOn&amp;diff=30193"/>
		<updated>2012-04-30T20:32:21Z</updated>

		<summary type="html">&lt;p&gt;Ronwolf1705: Created page with &amp;quot;{{Useful Function}} This function checks in which way the cursor is currently moving. ==Syntax== &amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string getCursorMoveOn( )&amp;lt;/syntaxhighlight&amp;gt;  ===Returns=== Returns left,right,u...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Useful Function}}&lt;br /&gt;
This function checks in which way the cursor is currently moving.&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string getCursorMoveOn( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns left,right,up or down.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
{{RequiredFunctions|findRotation}}&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 getCursorMoveOn()&lt;br /&gt;
    if ( isCursorShowing() ) then&lt;br /&gt;
	left = &amp;quot;left&amp;quot;&lt;br /&gt;
	right = &amp;quot;right&amp;quot;&lt;br /&gt;
	up = &amp;quot;up&amp;quot;&lt;br /&gt;
	down = &amp;quot;down&amp;quot;&lt;br /&gt;
    zero = &amp;quot;nil&amp;quot;&lt;br /&gt;
	if getElementData(localPlayer,&amp;quot;movew&amp;quot;) == right then&lt;br /&gt;
	return right&lt;br /&gt;
	elseif getElementData(localPlayer,&amp;quot;movew&amp;quot;) == left then&lt;br /&gt;
	return left&lt;br /&gt;
	elseif getElementData(localPlayer,&amp;quot;movew&amp;quot;) == up then&lt;br /&gt;
	return up&lt;br /&gt;
	elseif getElementData(localPlayer,&amp;quot;movew&amp;quot;) == down then&lt;br /&gt;
	return down&lt;br /&gt;
	elseif getElementData(localPlayer,&amp;quot;movew&amp;quot;) == zero then&lt;br /&gt;
	return false&lt;br /&gt;
	end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function executeMoveOn(cursorX,cursorY)&lt;br /&gt;
    if ( isCursorShowing() ) then&lt;br /&gt;
	setElementData(localPlayer,&amp;quot;moveX&amp;quot;,cursorX)&lt;br /&gt;
	setElementData(localPlayer,&amp;quot;moveY&amp;quot;,cursorY)&lt;br /&gt;
	     if cursorX &amp;gt; cX then&lt;br /&gt;
         setElementData(localPlayer,&amp;quot;movew&amp;quot;,right)&lt;br /&gt;
	     elseif cursorX &amp;lt; cX then&lt;br /&gt;
	     setElementData(localPlayer,&amp;quot;movew&amp;quot;,left)&lt;br /&gt;
	     elseif cursorY &amp;gt; cY then&lt;br /&gt;
	     setElementData(localPlayer,&amp;quot;movew&amp;quot;,down)&lt;br /&gt;
	     elseif cursorY &amp;lt; cY then&lt;br /&gt;
	     setElementData(localPlayer,&amp;quot;movew&amp;quot;,up)&lt;br /&gt;
	     end&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler(&amp;quot;onClientCursorMove&amp;quot;,root,executeMoveOn)&lt;br /&gt;
&lt;br /&gt;
setTimer(&lt;br /&gt;
function()&lt;br /&gt;
    if ( isCursorShowing() ) then&lt;br /&gt;
	local curX = getElementData(localPlayer,&amp;quot;moveX&amp;quot;)&lt;br /&gt;
	local curY = getElementData(localPlayer,&amp;quot;moveY&amp;quot;)&lt;br /&gt;
		 if cursorX == cX then&lt;br /&gt;
		 setElementData(localPlayer,&amp;quot;movew&amp;quot;,zero)&lt;br /&gt;
		 elseif cursorY == cY then&lt;br /&gt;
		 setElementData(localPlayer,&amp;quot;movew&amp;quot;,zero)&lt;br /&gt;
		 end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
,50,0)&lt;br /&gt;
&lt;br /&gt;
function previousM()&lt;br /&gt;
   if ( isCursorShowing() ) then&lt;br /&gt;
    cX = getElementData(localPlayer,&amp;quot;moveX&amp;quot;)&lt;br /&gt;
	cY = getElementData(localPlayer,&amp;quot;moveY&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
setTimer(previousM,50,0)&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;Client-side example&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This clientside example checks in which way cursor is currently moving.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bindKey (&amp;quot;m&amp;quot;, &amp;quot;down&amp;quot;,&lt;br /&gt;
function()&lt;br /&gt;
showCursor( not isCursorShowing() )&lt;br /&gt;
end&lt;br /&gt;
)&lt;br /&gt;
&lt;br /&gt;
addEventHandler(&amp;quot;onClientCursorMove&amp;quot;,root,&lt;br /&gt;
function()&lt;br /&gt;
    if ( isCursorShowing() ) then&lt;br /&gt;
	moveOn = getCursorMoveOn()&lt;br /&gt;
	outputChatBox(&amp;quot;cursor is moving on : &amp;quot; .. moveOn, localPlayer)&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;
&lt;br /&gt;
By '''ronwolf1705'''.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Useful_Functions}}&lt;/div&gt;</summary>
		<author><name>Ronwolf1705</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=30191</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=30191"/>
		<updated>2012-04-30T20:21:06Z</updated>

		<summary type="html">&lt;p&gt;Ronwolf1705: &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;
*[[doForAllElements]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function can be used to execute a specified function for all elements of a specified type.&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;
*[[getPedGoTo]] &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 the position set by setPedGoTo.&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;
*[[setPedGoTo]] &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 target position of ped or player, and makes them move.&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;
[[Category:Useful Functions]]&lt;/div&gt;</summary>
		<author><name>Ronwolf1705</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=XmlCreateFile&amp;diff=30162</id>
		<title>XmlCreateFile</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=XmlCreateFile&amp;diff=30162"/>
		<updated>2012-04-28T12:49:19Z</updated>

		<summary type="html">&lt;p&gt;Ronwolf1705: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function creates a new XML document, which can later be saved to a file by using [[xmlSaveFile]]. This function will overwrite the file specified if it already exists.&lt;br /&gt;
&lt;br /&gt;
{{Needs_Checking|it's server-side only// ronwolf1705}} &lt;br /&gt;
&lt;br /&gt;
==Syntax== &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;
xmlnode xmlCreateFile ( string filePath, string rootNodeName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file will be in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if you want to create a file named 'new.xml' in the resource 'ctf', it can be created from another resource this way: ''xmlCreateFile(&amp;quot;:ctf/new.xml&amp;quot;, &amp;quot;newroot&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''xmlCreateFile(&amp;quot;new.xml&amp;quot;, &amp;quot;newroot&amp;quot;)''.&lt;br /&gt;
:Note that if a different resource than default is being accessed, the caller resource needs access to general.ModifyOtherObjects in the [[ACL]].&lt;br /&gt;
*'''rootNodeName:''' the name of the root node in the XML document.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&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;
xmlnode xmlCreateFile ( string filePath, string rootNodeName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file will be in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if you want to create a file named 'new.xml' in the resource 'ctf', it can be created from another resource this way: ''xmlCreateFile(&amp;quot;:ctf/new.xml&amp;quot;, &amp;quot;newroot&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''xmlCreateFile(&amp;quot;new.xml&amp;quot;, &amp;quot;newroot&amp;quot;)''.&lt;br /&gt;
:Note that if a different resource than default is being accessed, the caller resource needs access to general.ModifyOtherObjects in the [[ACL]].&lt;br /&gt;
*'''rootNodeName:''' the name of the root node in the XML document.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the root [[xmlnode]] object of the new XML file if successful, or ''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;
This example allows a player to use the command 'createfile' to create an .xml file.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Creates a file named &amp;quot;new.xml&amp;quot; with root node &amp;quot;newroot&amp;quot; and childnode &amp;quot;newchild&amp;quot;.&lt;br /&gt;
function createFileHandler()&lt;br /&gt;
local RootNode = xmlCreateFile(&amp;quot;new.xml&amp;quot;,&amp;quot; newroot&amp;quot;)&lt;br /&gt;
local NewNode = xmlCreateChild(RootNode, &amp;quot;newchild&amp;quot;)&lt;br /&gt;
xmlSaveFile(RootNode)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addCommandHandler(&amp;quot;createfile&amp;quot;, createFileHandler)&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;
{{XML_functions}}&lt;/div&gt;</summary>
		<author><name>Ronwolf1705</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=XmlCreateFile&amp;diff=30161</id>
		<title>XmlCreateFile</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=XmlCreateFile&amp;diff=30161"/>
		<updated>2012-04-28T12:48:53Z</updated>

		<summary type="html">&lt;p&gt;Ronwolf1705: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function creates a new XML document, which can later be saved to a file by using [[xmlSaveFile]]. This function will overwrite the file specified if it already exists.&lt;br /&gt;
&lt;br /&gt;
{{Needs_Checking|it's server-side only}} &lt;br /&gt;
&lt;br /&gt;
==Syntax== &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;
xmlnode xmlCreateFile ( string filePath, string rootNodeName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file will be in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if you want to create a file named 'new.xml' in the resource 'ctf', it can be created from another resource this way: ''xmlCreateFile(&amp;quot;:ctf/new.xml&amp;quot;, &amp;quot;newroot&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''xmlCreateFile(&amp;quot;new.xml&amp;quot;, &amp;quot;newroot&amp;quot;)''.&lt;br /&gt;
:Note that if a different resource than default is being accessed, the caller resource needs access to general.ModifyOtherObjects in the [[ACL]].&lt;br /&gt;
*'''rootNodeName:''' the name of the root node in the XML document.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/section&amp;gt;&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;
xmlnode xmlCreateFile ( string filePath, string rootNodeName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''filePath:''' The [[filepath]] of the file in the following format: '''&amp;quot;:resourceName/path&amp;quot;'''. 'resourceName' is the name of the resource the file will be in, and 'path' is the path from the root directory of the resource to the file.&lt;br /&gt;
:For example, if you want to create a file named 'new.xml' in the resource 'ctf', it can be created from another resource this way: ''xmlCreateFile(&amp;quot;:ctf/new.xml&amp;quot;, &amp;quot;newroot&amp;quot;)''.&lt;br /&gt;
:If the file is in the current resource, only the file path is necessary, e.g. ''xmlCreateFile(&amp;quot;new.xml&amp;quot;, &amp;quot;newroot&amp;quot;)''.&lt;br /&gt;
:Note that if a different resource than default is being accessed, the caller resource needs access to general.ModifyOtherObjects in the [[ACL]].&lt;br /&gt;
*'''rootNodeName:''' the name of the root node in the XML document.&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the root [[xmlnode]] object of the new XML file if successful, or ''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;
This example allows a player to use the command 'createfile' to create an .xml file.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- Creates a file named &amp;quot;new.xml&amp;quot; with root node &amp;quot;newroot&amp;quot; and childnode &amp;quot;newchild&amp;quot;.&lt;br /&gt;
function createFileHandler()&lt;br /&gt;
local RootNode = xmlCreateFile(&amp;quot;new.xml&amp;quot;,&amp;quot; newroot&amp;quot;)&lt;br /&gt;
local NewNode = xmlCreateChild(RootNode, &amp;quot;newchild&amp;quot;)&lt;br /&gt;
xmlSaveFile(RootNode)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
addCommandHandler(&amp;quot;createfile&amp;quot;, createFileHandler)&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;
{{XML_functions}}&lt;/div&gt;</summary>
		<author><name>Ronwolf1705</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPedAnimation&amp;diff=30153</id>
		<title>SetPedAnimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPedAnimation&amp;diff=30153"/>
		<updated>2012-04-28T12:41:34Z</updated>

		<summary type="html">&lt;p&gt;Ronwolf1705: /* Optional Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
Sets the current animation of a player or ped.  Not specifying the type of animation will automatically cancel the current one.&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 setPedAnimation ( ped thePed [, string block=nil, string anim=nil, int time=-1, bool loop=true, bool updatePosition=true, bool interruptable=true, bool freezeLastFrame = true] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' the player or ped you want to apply an animation to.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
*'''block:''' the [[Animations|animation]] block's name.&lt;br /&gt;
*'''anim:''' the name of the [[Animations|animation]] within the block.&lt;br /&gt;
*'''time:''' how long the animation will run for in milliseconds.&lt;br /&gt;
*'''loop:''' indicates whether or not the animation will loop.&lt;br /&gt;
*'''updatePosition:''' will change the actual coordinates of the ped according to the animation. Use this for e.g. walking animations.&lt;br /&gt;
*'''interruptable:''' if set to 'false' other tasks wont be able to interupt the animation.&lt;br /&gt;
*'''freezeLastFrame:''' ... (From 1.1 onwards).&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if succesful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&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;
This example creates a ped, rotates him, and makes him walk:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function makePed()&lt;br /&gt;
   ped1 = createPed(56, 1, 1, 4)&lt;br /&gt;
   setPedRotation(ped1, 315)&lt;br /&gt;
   setPedAnimation( ped1, &amp;quot;ped&amp;quot;, &amp;quot;WOMAN_walknorm&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;makemyped&amp;quot;, makePed)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Ped_functions}}&lt;br /&gt;
[[ru:setPedAnimation]]&lt;/div&gt;</summary>
		<author><name>Ronwolf1705</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPedAnimation&amp;diff=30152</id>
		<title>SetPedAnimation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPedAnimation&amp;diff=30152"/>
		<updated>2012-04-28T12:41:10Z</updated>

		<summary type="html">&lt;p&gt;Ronwolf1705: /* Optional Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{Server client function}}&lt;br /&gt;
&lt;br /&gt;
Sets the current animation of a player or ped.  Not specifying the type of animation will automatically cancel the current one.&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 setPedAnimation ( ped thePed [, string block=nil, string anim=nil, int time=-1, bool loop=true, bool updatePosition=true, bool interruptable=true, bool freezeLastFrame = true] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePed:''' the player or ped you want to apply an animation to.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
{{OptionalArg}}&lt;br /&gt;
*'''block:''' the [[Animations|animation]] block's name.&lt;br /&gt;
*'''anim:''' the name of the [[Animations#run_1armed|animation]] within the block.&lt;br /&gt;
*'''time:''' how long the animation will run for in milliseconds.&lt;br /&gt;
*'''loop:''' indicates whether or not the animation will loop.&lt;br /&gt;
*'''updatePosition:''' will change the actual coordinates of the ped according to the animation. Use this for e.g. walking animations.&lt;br /&gt;
*'''interruptable:''' if set to 'false' other tasks wont be able to interupt the animation.&lt;br /&gt;
*'''freezeLastFrame:''' ... (From 1.1 onwards).&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if succesful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&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;
This example creates a ped, rotates him, and makes him walk:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function makePed()&lt;br /&gt;
   ped1 = createPed(56, 1, 1, 4)&lt;br /&gt;
   setPedRotation(ped1, 315)&lt;br /&gt;
   setPedAnimation( ped1, &amp;quot;ped&amp;quot;, &amp;quot;WOMAN_walknorm&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler(&amp;quot;makemyped&amp;quot;, makePed)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Ped_functions}}&lt;br /&gt;
[[ru:setPedAnimation]]&lt;/div&gt;</summary>
		<author><name>Ronwolf1705</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Useful_Functions&amp;diff=30144</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=30144"/>
		<updated>2012-04-28T12:19:40Z</updated>

		<summary type="html">&lt;p&gt;Ronwolf1705: &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;
*[[doForAllElements]] &amp;lt;span style=&amp;quot;color:gray; font-family:'Georgia',sans-serif; font-size:smaller;&amp;quot;&amp;gt;» This function can be used to execute a specified function for all elements of a specified type.&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;
*[[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;
*[[setPedGoTo]] &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 target position of ped or player, and makes them move.&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;
[[Category:Useful Functions]]&lt;/div&gt;</summary>
		<author><name>Ronwolf1705</name></author>
	</entry>
</feed>