<?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=Black+Dragon</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=Black+Dragon"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Black_Dragon"/>
	<updated>2026-05-02T14:19:18Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:Maplimits&amp;diff=13508</id>
		<title>Resource:Maplimits</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:Maplimits&amp;diff=13508"/>
		<updated>2007-12-06T17:19:47Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: New page: __NOTOC__ Map Limits is a resource that allows defining points in a .map file to border a map. A player outside the border area will lose health until he dies or returns to the game area. ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Map Limits is a resource that allows defining points in a .map file to border a map. A player outside the border area will lose health until he dies or returns to the game area.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
Syntax:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;maplimit&amp;gt;&lt;br /&gt;
	&amp;lt;point x=&amp;quot;&amp;quot; y=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;point x=&amp;quot;&amp;quot; y=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;point x=&amp;quot;&amp;quot; y=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/maplimit&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When using maplimits in ones map, at least three points must be made.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Note that the sequence of points &amp;lt;b&amp;gt;matters&amp;lt;/b&amp;gt;. For example, this would create a square shaped border:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;point x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;point x=&amp;quot;1&amp;quot; y=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;point x=&amp;quot;1&amp;quot; y=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;point x=&amp;quot;0&amp;quot; y=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
While this would create two triangles:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;point x=&amp;quot;0&amp;quot; y=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;point x=&amp;quot;1&amp;quot; y=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;point x=&amp;quot;0&amp;quot; y=&amp;quot;1&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;point x=&amp;quot;1&amp;quot; y=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:CDM&amp;diff=13507</id>
		<title>Resource:CDM</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:CDM&amp;diff=13507"/>
		<updated>2007-12-06T17:10:24Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Classic DeathMatch is a gamemode that imitates the gameplay of MTA:VC. Before spawning the player is given the choice to select a class/team, and after spawning he's allowed to do whatever he wants, unless the map loaded limits him or instructs him otherwise.&lt;br /&gt;
&lt;br /&gt;
==Ingame keys==&lt;br /&gt;
Left/Right - used to scroll through teams/classes while in spawnscreen. &amp;lt;br&amp;gt;&lt;br /&gt;
Enter - used to confirm a team/class selection from the spawnscreen. &amp;lt;br&amp;gt;&lt;br /&gt;
I - used to show vehicles that are close to the player. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
Syntax:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;team name=&amp;quot;&amp;quot; red=&amp;quot;&amp;quot; green=&amp;quot;&amp;quot; blue=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;camera lookX=&amp;quot;&amp;quot; lookY=&amp;quot;&amp;quot; lookZ=&amp;quot;&amp;quot; posX=&amp;quot;&amp;quot; posY=&amp;quot;&amp;quot; posZ=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;weapon model=&amp;quot;&amp;quot; ammo=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;skin model=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;spawnpoint posX=&amp;quot;&amp;quot; posY=&amp;quot;&amp;quot; posZ=&amp;quot;&amp;quot; rot=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/team&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When making a CDM map, one must define at least two teams, and each team must have a name, and it is optional to also give the teams colors (if none specified, defaults to white).&amp;lt;br&amp;gt;&lt;br /&gt;
Inside each team there are a few definable things-&lt;br /&gt;
* Camera - this is used for the camera on the spawnscreen when the team is selected. lookX/Y/Z refer to the position the camera would 'look' at, posX/Y/Z refers to the cameras position. Not specifying a camera or specifying it wrong would result in defaulting the camera to 0, 0, 0, 0, 0, 0. Note: only the first &amp;lt;camera&amp;gt; data in each team would be read.&lt;br /&gt;
* Weapons - this is used as to give players weapons that their team/class receives on spawn. model refers to the weapon ID, ammo refers to how much ammo of the weapon will the player spawn with. While not specifying weapons is alright, specifying them wrong would result in an error and the map would not load. You can specify as many weapons as you wish.&lt;br /&gt;
* Skins - this is used for players spawning skins. The skin they will spawn with is picked randomly from the list of skins in the current team. model refers to the skin ID. While not specifying skins would result in all players of this teams spawning with the CJ skin, specifying them wrong would result in an error and the map would not load. You can specify as many skins as you wish.&lt;br /&gt;
* Spawnpoints - this is to determinate where the players would spawn. The spawnpoint the player would spawn at is randomly picked from the list of spawnpoints in the current team. posX/Y/Z refers to the spawnpoints position, rot refers to the spawning rotation. You must specify at least one spawnpoint per team, as if you specify less than one or specify a spawnpoint wrong will result in an error and the map would not load.&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:CTF&amp;diff=13506</id>
		<title>Resource:CTF</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:CTF&amp;diff=13506"/>
		<updated>2007-12-06T17:10:16Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: New page: __NOTOC__ Capture the Flag is a team based gamemode. Players capture enemy teams flags and return them to their own to gain points. The team with the most points by the end of the round wi...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Capture the Flag is a team based gamemode. Players capture enemy teams flags and return them to their own to gain points. The team with the most points by the end of the round wins.&lt;br /&gt;
&lt;br /&gt;
==Ingame keys==&lt;br /&gt;
Left/Right - used to scroll through teams while in spawnscreen. &amp;lt;br&amp;gt;&lt;br /&gt;
Enter - used to confirm a team selection from the spawnscreen. &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Note: spawnscreen might be disabled on some maps.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
Syntax:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;team name=&amp;quot;&amp;quot; colorR=&amp;quot;&amp;quot; colorG=&amp;quot;&amp;quot; colorB=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;flag name=&amp;quot;&amp;quot; posX=&amp;quot;&amp;quot; posY=&amp;quot;&amp;quot; posZ=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
	&amp;lt;spawnpoint posX=&amp;quot;&amp;quot; posY=&amp;quot;&amp;quot; posZ=&amp;quot;&amp;quot; rot=&amp;quot;&amp;quot; model=&amp;quot;&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/team&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When making a CTF map, one must define at least two teams.&amp;lt;br&amp;gt;&lt;br /&gt;
Inside each team there are a few definable things-&lt;br /&gt;
* Flags - used to define a flag. Name refers to the flags name, and posX/Y/Z refers to the flags position. Each team must have at least one flag.&lt;br /&gt;
* * Spawnpoints - this is to determinate where the players would spawn. The spawnpoint the player would spawn at is randomly picked from the list of spawnpoints in the current team. posX/Y/Z refers to the spawnpoints position, rot refers to the spawning rotation. You must specify at least one spawnpoint per team.&lt;br /&gt;
&lt;br /&gt;
==Settings==&lt;br /&gt;
Syntax:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&amp;lt;settings respawnTime=&amp;quot;&amp;quot; roundTime=&amp;quot;&amp;quot; spawnScreen=&amp;quot;&amp;quot; blips=&amp;quot;&amp;quot;/&amp;gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* respawnTime refers to the amount of milliseconds a player has to wait before spawning after being killed. Default is 4500.&lt;br /&gt;
* roundTime refers to the amount of milliseconds a round lasts. Default is 600000.&lt;br /&gt;
* spawnScreen - if the value is &amp;quot;on&amp;quot;, spawnscreen is on. Otherwise, not spawnscreen would appear.&lt;br /&gt;
* blips - if the value is &amp;quot;all&amp;quot;, all player blips and flag blips would be shown; if it's &amp;quot;team&amp;quot;, only the players teams player blips and flag blips would be shown; otherwise, CTF won't show blips.&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User:Black_Dragon&amp;diff=12379</id>
		<title>User:Black Dragon</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User:Black_Dragon&amp;diff=12379"/>
		<updated>2007-10-04T14:19:35Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Stuff===&lt;br /&gt;
&lt;br /&gt;
[[User:Black_Dragon/cdm|CDM]] [''cdm''] &amp;lt;br&amp;gt;&lt;br /&gt;
[[User:Black_Dragon/ctf|CTF]] [''ctf''] &amp;lt;br&amp;gt;&lt;br /&gt;
[[User:Black_Dragon/maplimits|Map Limits]] [''maplimits''] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Misc.===&lt;br /&gt;
[[User:Black_Dragon/hay|Hay - the song]] &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User:Black_Dragon&amp;diff=12378</id>
		<title>User:Black Dragon</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User:Black_Dragon&amp;diff=12378"/>
		<updated>2007-10-04T14:19:19Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Stuff===&lt;br /&gt;
&lt;br /&gt;
[[User:Black_Dragon/cdm|CDM]] [''cdm''] &amp;lt;br&amp;gt;&lt;br /&gt;
[[User:Black_Dragon/ctf|CTF]] [''ctf''] &amp;lt;br&amp;gt;&lt;br /&gt;
[[User:Black_Dragon/maplimits|Map Limits]] [''maplimits''] &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Misc.===&lt;br /&gt;
[[User:Black_Dragon/hay|Hay - the song]] [''hay''] &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Resource:CDM&amp;diff=12264</id>
		<title>Resource:CDM</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Resource:CDM&amp;diff=12264"/>
		<updated>2007-09-28T13:18:02Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: New page: __NOTOC__ Classic DeathMatch is a gamemode that imitates the gameplay of MTA:VC. Before spawning the player is given the choice to select a class/team, and after spawning he's allowed to d...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
Classic DeathMatch is a gamemode that imitates the gameplay of MTA:VC. Before spawning the player is given the choice to select a class/team, and after spawning he's allowed to do whatever he wants, unless the map loaded limits him or instructs him otherwise.&lt;br /&gt;
&lt;br /&gt;
==Ingame keys==&lt;br /&gt;
Left/Right - used to scroll through teams/classes while in spawnscreen. &amp;lt;br&amp;gt;&lt;br /&gt;
Enter - used to confirm a team/class selection from the spawnscreen. &amp;lt;br&amp;gt;&lt;br /&gt;
I - used to show vehicles that are close to the player. &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
Syntax:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;team name=&amp;quot;&amp;quot; red=&amp;quot;&amp;quot; green=&amp;quot;&amp;quot; blue=&amp;quot;&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;camera lookX=&amp;quot;&amp;quot; lookY=&amp;quot;&amp;quot; lookZ=&amp;quot;&amp;quot; posX=&amp;quot;&amp;quot; posY=&amp;quot;&amp;quot; posZ=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;weapon model=&amp;quot;&amp;quot; ammo=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;skin model=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
	&amp;lt;spawnpoint posX=&amp;quot;&amp;quot; posY=&amp;quot;&amp;quot; posZ=&amp;quot;&amp;quot; rot=&amp;quot;&amp;quot;/&amp;gt;&lt;br /&gt;
&amp;lt;/team&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When making a CDM map, one must define at least two teams, and each team must have a name, and it is optional to also give the teams colors (if none specified, defaults to white).&lt;br /&gt;
Inside each team there are a few definable things-&lt;br /&gt;
* Camera - this is used for the camera on the spawnscreen when the team is selected. lookX/Y/Z refer to the position the camera would 'look' at, posX/Y/Z refers to the cameras position. Not specifying a camera or specifying it wrong would result in defaulting the camera to 0, 0, 0, 0, 0, 0. Note: only the first &amp;lt;camera&amp;gt; data in each team would be read.&lt;br /&gt;
* Weapons - this is used as to give players weapons that their team/class receives on spawn. model refers to the weapon ID, ammo refers to how much ammo of the weapon will the player spawn with. While not specifying weapons is alright, specifying them wrong would result in an error and the map would not load. You can specify as many weapons as you wish.&lt;br /&gt;
* Skins - this is used for players spawning skins. The skin they will spawn with is picked randomly from the list of skins in the current team. model refers to the skin ID. While not specifying skins would result in all players of this teams spawning with the CJ skin, specifying them wrong would result in an error and the map would not load. You can specify as many skins as you wish.&lt;br /&gt;
* Spawnpoints - this is to determinate where the players would spawn. The spawnpoint the player would spawn at is randomly picked from the list of spawnpoints in the current team. posX/Y/Z refers to the spawnpoints position, rot refers to the spawning rotation. You must specify at least one spawnpoint per team, as if you specify less than one or specify a spawnpoint wrong will result in an error and the map would not load.&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User:Black_Dragon&amp;diff=12258</id>
		<title>User:Black Dragon</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User:Black_Dragon&amp;diff=12258"/>
		<updated>2007-09-28T12:47:18Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: New page: ===Stuff===  CDM [''cdm''] &amp;lt;br&amp;gt; CTF [''ctf''] &amp;lt;br&amp;gt; Map Limits [''maplimits''] &amp;lt;br&amp;gt;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===Stuff===&lt;br /&gt;
&lt;br /&gt;
[[User:Black_Dragon/cdm|CDM]] [''cdm''] &amp;lt;br&amp;gt;&lt;br /&gt;
[[User:Black_Dragon/ctf|CTF]] [''ctf''] &amp;lt;br&amp;gt;&lt;br /&gt;
[[User:Black_Dragon/maplimits|Map Limits]] [''maplimits''] &amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleLandingGearDown&amp;diff=10084</id>
		<title>GetVehicleLandingGearDown</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleLandingGearDown&amp;diff=10084"/>
		<updated>2007-08-11T11:33:09Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{server client function}}&lt;br /&gt;
This function is used to check whether a vehicles' landing gear is down or not. Only planes can be used with this function.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool getVehicleLandingGearDown ( vehicle thevehicle )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thevehicle:''' The vehicle that you wish to check its' landing gear state.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if landing gear is down, ''false'' if the landing gear is up.&amp;lt;br /&amp;gt;&lt;br /&gt;
Returns ''nil'' if the vehicle has no landing gear, or is invalid.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This function tells you to pull up if you're flying low in a hydra with your landing gear up.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function checkGear( player )&lt;br /&gt;
    vehicle = getPlayerOccupiedVehicle( player )    --Get the players vehicle&lt;br /&gt;
    if ( ( getVehicleID(vehicle) == 520 ) and ( getVehicleLandingGearDown( vehicle ) == false ) ) then    --if the vehicle is a hydra, and the landing gear is up&lt;br /&gt;
        outputChatBox( &amp;quot;Pull up!&amp;quot;, player )    --tell the player to pull up.&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Vehicle functions}}&lt;br /&gt;
[[Category:Incomplete]]&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleIDFromName&amp;diff=10083</id>
		<title>GetVehicleIDFromName</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleIDFromName&amp;diff=10083"/>
		<updated>2007-08-11T11:32:22Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{server client function}}&lt;br /&gt;
This function retrieves the ID of a vehicle as an integer value from its name.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int getVehicleIDFromName ( string name )             &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''name:''' A [[string]] containing the name of the vehicle.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an [[int]] if the name exists, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This will allow the player to create a vehicle by name and it's ID will be displayed in the chatbox when the vehicle is spawned.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createvehiclecommand ( player, commandName, carname )&lt;br /&gt;
--This function is triggered by the text &amp;quot;spawnvehicle&amp;quot; in the console.&lt;br /&gt;
--The player must also specify the added varible carname to specify&lt;br /&gt;
--what car they wish to spawn.&lt;br /&gt;
carid = getVehicleIDFromName ( carname )&lt;br /&gt;
--Get the ID of the car the player asked for and store it to the&lt;br /&gt;
--varible 'carid'&lt;br /&gt;
local x, y, z = getElementPosition ( player )&lt;br /&gt;
--Get the position of the player to spawn the car near this location&lt;br /&gt;
	if carid == false then&lt;br /&gt;
		outputChatBox ( &amp;quot;That is not a valid car name&amp;quot; )&lt;br /&gt;
	else&lt;br /&gt;
		createVehicle ( carid, x + 5, y, z )&lt;br /&gt;
		--Spawn the car using it's ID. Spawn it at x + 5 from the player so it doesn't crush him&lt;br /&gt;
		outputChatBox ( &amp;quot;A vehicle with an ID of &amp;quot;..carid..&amp;quot; was created!&amp;quot; )&lt;br /&gt;
	end&lt;br /&gt;
	--If the entered car name returns no car ID, the string will be empty and false will be returned.&lt;br /&gt;
	--If the string does have any value, we create the car and announce the car ID in the chatbox,&lt;br /&gt;
	--because a car did exist under the given car name.&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;spawnvehicle&amp;quot;, &amp;quot;createvehiclecommand&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Vehicle functions}}&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleID&amp;diff=10082</id>
		<title>GetVehicleID</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleID&amp;diff=10082"/>
		<updated>2007-08-11T11:31:42Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{server client function}}&lt;br /&gt;
This function retrieves the ID of a vehicle as an integer value.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int getVehicleID ( vehicle theVehicle )             &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theVehicle:''' The vehicle you want to get the ID of. &lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an integer containing the requested vehicle's ID, or false if the vehicle passed to the function is invalid.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function planeEnter ( theVehicle, seat, jacked ) --when someone enters a vehicle&lt;br /&gt;
  id = getVehicleID ( theVehicle ) -- get the ID of the vehicle&lt;br /&gt;
  if id == 519 or 577 then --if theVehicle is one of these two planes&lt;br /&gt;
     vehiclename = getVehicleName ( theVehicle ) -- define the vehicle name &lt;br /&gt;
     outputChatBox ( &amp;quot;Someone stole a &amp;quot;..vehiclename..&amp;quot;!&amp;quot; ) -- announce that someone stole the plane&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
-- add the event to the event handler&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerEnterVehicle&amp;quot;, getRootElement(), planeEnter )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{IDs}}&lt;br /&gt;
&lt;br /&gt;
{{Vehicle_functions}}&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetResourceConfig&amp;diff=10081</id>
		<title>GetResourceConfig</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetResourceConfig&amp;diff=10081"/>
		<updated>2007-08-11T11:30:36Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{server client function}}&lt;br /&gt;
This function is used to return the root node of a configuration file. Config files must be predefined in a resource's [[meta file]].&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
xmlnode getResourceConfig ( [resource theResource = getThisResource()], string filename )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''filename:''' The exact file name of the configuration file. (e.g. &amp;quot;file.xml&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''theResource:''' The resource from which the function calls the configuration file&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the root node of the specified configuration file. If the file is corrupted, not defined in the meta file or doesn't exist, returns false.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
In the example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function resourceStart ( resourcename )    --When the resource is started&lt;br /&gt;
    if ( resourcename == getThisResource () ) then    --if the resource is this one&lt;br /&gt;
        node = getResourceConfig( resourcename, &amp;quot;file.xml&amp;quot; )    --get the configuration file&lt;br /&gt;
        local subNode = xmlFindSubNode( node, &amp;quot;group&amp;quot;, 1 )    --get a subnode in it&lt;br /&gt;
        outputChatBox( xmlNodeGetAttribute( node, &amp;quot;attr&amp;quot; ) )    --output its' the attributes value to chatbox.&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onResourceStart&amp;quot;, getRootElement(), resourceStart )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Resource_functions}}&lt;br /&gt;
[[Category:Incomplete]]&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetResourceLastStartTime&amp;diff=10080</id>
		<title>GetResourceLastStartTime</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetResourceLastStartTime&amp;diff=10080"/>
		<updated>2007-08-11T11:30:04Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{server function}}&lt;br /&gt;
Used to check the last starting time and date of a function&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string getResourceLastStartTime ( resource theResource )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theResource:''' The resource of which you'd like to check the last starting time and date.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a string with the time and date, or false if the resource does not exist.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This function outputs to chatbox when the current resource was started.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function whenStarted()&lt;br /&gt;
    local startTime = getResourceLastStartTime ( getThisResource() )    --Get the time and date&lt;br /&gt;
    outputChatBox( &amp;quot;This resource was started on: &amp;quot; .. startTime )    --tell everybody when the current resource was started.&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Resource functions}}&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetResourceInfo&amp;diff=10079</id>
		<title>GetResourceInfo</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetResourceInfo&amp;diff=10079"/>
		<updated>2007-08-11T11:29:54Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Needs_Checking|may return a string, bool or nil (?) --[[User:Jbeta|jbeta]]}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
{{server function}}&lt;br /&gt;
This function retrieves the value of any attribute in a resource info tag.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string getResourceInfo ( resource theResource, string attribute ) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theResource:''' the resource we are getting the info from.&lt;br /&gt;
*'''attribute:''' the name of the attribute we want info about.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''string'' with the attribute value if it exists, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This function tells the server who's the author who made the currently running resource.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function outputAuthor()&lt;br /&gt;
    author = getResourceInfo ( getThisResource(), &amp;quot;author&amp;quot; )    --Get the authors name&lt;br /&gt;
    if author then    --if it exists&lt;br /&gt;
        outputChatBox( author .. &amp;quot; made this script.&amp;quot; )    --tell the world his name&lt;br /&gt;
    else    --if it doesn't&lt;br /&gt;
        outputChatBox( &amp;quot;I've no idea who made this script.&amp;quot; )    --apologize.&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Resource_functions}}&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetRandomPlayer&amp;diff=10078</id>
		<title>GetRandomPlayer</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetRandomPlayer&amp;diff=10078"/>
		<updated>2007-08-11T11:27:47Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
{{server function}}&lt;br /&gt;
This function returns a random [[player]]. It is useful for assigning objectives to random players in a Manhunt mode, for example.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;player getRandomPlayer ( )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
''This function has no arguments.''&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This code outputs a random's player name.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
randomPlayer = getRandomPlayer ( )&lt;br /&gt;
outputChatBox ( getClientName ( randomPlayer )..&amp;quot; is now the fugitive!&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Player functions}}&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetRadarAreaSize&amp;diff=10077</id>
		<title>GetRadarAreaSize</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetRadarAreaSize&amp;diff=10077"/>
		<updated>2007-08-11T11:27:34Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{server function}}&lt;br /&gt;
Used for getting the X and Y size of an existing radar area.&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 getRadarAreaSize ( radararea theRadararea )              &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theRadararea:''' The radararea element whose size you wish to get.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns two ''floats'' indicating the X and Y length of the radar area respectively, ''false'' if the radar area doesn't exist.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
The following example looks for radar areas whose size is smaller than 100 by 100:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
radarareas = getElementsByType ( &amp;quot;radararea&amp;quot; ) -- get a tabele of radararea elements&lt;br /&gt;
for k,v in ipairs(radarareas) do -- use a generic for loop to step through each of the elements&lt;br /&gt;
   local sizeX, sizeY = getRadarAreaSize ( v ) -- get the size of the radar area&lt;br /&gt;
   if ( sizeX &amp;lt; 100 and sizeY &amp;lt; 100 ) then -- check if it's smaller than 100 by 100&lt;br /&gt;
      outputChatBox ( &amp;quot;A small radar area was found!&amp;quot; )&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This example creates a radar area and stores it's size in variables x and y:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
greenArea = createRadarArea ( 1024, 1024, 50, 120, 0, 220, 0, 85 )&lt;br /&gt;
local x, y = getRadarAreaSize ( greenArea )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Radar area_functions}}&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetRadarAreaColor&amp;diff=10076</id>
		<title>GetRadarAreaColor</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetRadarAreaColor&amp;diff=10076"/>
		<updated>2007-08-11T11:27:08Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{server function}}&lt;br /&gt;
This function can be used to retrieve the current color of a Radar Area.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int int int int getRadarAreaColor ( radararea theRadararea )              &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theRadararea:''' The radar area you wish to retrieve the colour of&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns four integers in RGBA format (''red'', ''green'', ''blue'', ''alpha''), with a maximum value of 255 for each.  Alpha decides transparancy where 255 is opaque and 0 is transparent.  Returns ''false'' if the radararea is invalid.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example checks the color of a radararea defined as 'area' and announces if it is ballas or grove street.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local r,g,b,a = getRadarAreaColor ( area ) --get the color of 'area' and define it as 'r', 'g', 'b' and 'a'&lt;br /&gt;
if g == 255 then --if the radar area is fully green&lt;br /&gt;
    outputChatBox ( &amp;quot;This is Grove Street turf!&amp;quot; ) --announce it as grove street area&lt;br /&gt;
elseif r == 255 then --if it is fully red however&lt;br /&gt;
    outputChatBox ( &amp;quot;This is Ballas turf!&amp;quot; ) --announce it as ballas area&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Radar area functions}}&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetPlayerWantedLevel&amp;diff=10075</id>
		<title>GetPlayerWantedLevel</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPlayerWantedLevel&amp;diff=10075"/>
		<updated>2007-08-11T11:26:16Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{server function}}&lt;br /&gt;
This function gets a player's current wanted level. The wanted level is indicated by the amount of stars a player has on the [[HUD]].&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int getPlayerWantedLevel ( player thePlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePlayer:''' The player whose wanted level you wish to get&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an ''int'' from 0 to 6 representing the player's wanted level, ''false'' if the player does not exist.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example finds which players in the server have a wanted level:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local players = getElementsByType ( &amp;quot;player&amp;quot; ) -- get a table of all the players in the server&lt;br /&gt;
for theKey,thePlayer in ipairs(players) do -- use a generic for loop to step through each player&lt;br /&gt;
   local level = getPlayerWantedLevel ( thePlayer ) -- get the wanted level of the player&lt;br /&gt;
   if ( level &amp;gt; 0 ) then -- if the player has any stars, announce it in the chat:&lt;br /&gt;
      outputChatBox ( getClientName ( thePlayer ) .. &amp;quot; has a wanted level of &amp;quot; .. level .. &amp;quot;  stars!&amp;quot; )&lt;br /&gt;
   end &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Player functions}}&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleLandingGearDown&amp;diff=9394</id>
		<title>GetVehicleLandingGearDown</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleLandingGearDown&amp;diff=9394"/>
		<updated>2007-07-30T14:03:15Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
This function is used to check whether a vehicles' landing gear is down or not.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool getVehicleLandingGearDown ( vehicle thevehicle )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thevehicle:''' The vehicle that you wish to check its' landing gear state.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if landing gear is down, ''false'' if the landing gear is up.&amp;lt;br /&amp;gt;&lt;br /&gt;
Returns ''nil'' if the vehicle has no landing gear, or is invalid.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This function tells you to pull up if you're flying low in a hydra with your landing gear up.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function checkGear( player )&lt;br /&gt;
    vehicle = getPlayerOccupiedVehicle( player )    --Get the players vehicle&lt;br /&gt;
    if ( ( getVehicleID(vehicle) == 520 ) and ( getVehicleLandingGearDown( vehicle ) == false ) ) then    --if the vehicle is a hydra, and the landing gear is up&lt;br /&gt;
        outputChatBox( &amp;quot;Pull up!&amp;quot;, player )    --tell the player to pull up.&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&amp;lt;!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --&amp;gt;&lt;br /&gt;
{{Vehicle functions}}&lt;br /&gt;
[[Category:Incomplete]]&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleIDFromName&amp;diff=9390</id>
		<title>GetVehicleIDFromName</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleIDFromName&amp;diff=9390"/>
		<updated>2007-07-30T13:49:21Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
This function retrieves the ID of a vehicle as an integer value from its name.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int getVehicleIDFromName ( string name )             &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''name:''' A [[string]] containing the name of the vehicle.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an [[int]] if the name exists, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This will allow the player to create a vehicle by name and it's ID will be displayed in the chatbox when the vehicle is spawned.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createvehiclecommand ( player, commandName, carname )&lt;br /&gt;
--This function is triggered by the text &amp;quot;spawnvehicle&amp;quot; in the console.&lt;br /&gt;
--The player must also specify the added varible carname to specify&lt;br /&gt;
--what car they wish to spawn.&lt;br /&gt;
carid = getVehicleIDFromName ( carname )&lt;br /&gt;
--Get the ID of the car the player asked for and store it to the&lt;br /&gt;
--varible 'carid'&lt;br /&gt;
local x, y, z = getElementPosition ( player )&lt;br /&gt;
--Get the position of the player to spawn the car near this location&lt;br /&gt;
	if carid == false then&lt;br /&gt;
		outputChatBox ( &amp;quot;That is not a valid car name&amp;quot; )&lt;br /&gt;
	else&lt;br /&gt;
		createVehicle ( carid, x + 5, y, z )&lt;br /&gt;
		--Spawn the car using it's ID. Spawn it at x + 5 from the player so it doesn't crush him&lt;br /&gt;
		outputChatBox ( &amp;quot;A vehicle with an ID of &amp;quot;..carid..&amp;quot; was created!&amp;quot; )&lt;br /&gt;
	end&lt;br /&gt;
	--If the entered car name returns no car ID, the string will be empty and false will be returned.&lt;br /&gt;
	--If the string does have any value, we create the car and announce the car ID in the chatbox,&lt;br /&gt;
	--because a car did exist under the given car name.&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;spawnvehicle&amp;quot;, &amp;quot;createvehiclecommand&amp;quot; )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Vehicle functions}}&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetResourceLastStartTime&amp;diff=9378</id>
		<title>GetResourceLastStartTime</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetResourceLastStartTime&amp;diff=9378"/>
		<updated>2007-07-30T09:49:56Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
Used to check the last starting time and date of a function&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;string getResourceLastStartTime ( resource theResource )&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theResource:''' The resource of which you'd like to check the last starting time and date.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a string with the time and date, or false if the resource does not exist.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This function outputs to chatbox when the current resource was started.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function whenStarted()&lt;br /&gt;
    local startTime = getResourceLastStartTime ( getThisResource() )    --Get the time and date&lt;br /&gt;
    outputChatBox( &amp;quot;This resource was started on: &amp;quot; .. startTime )    --tell everybody when the current resource was started.&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Resource functions}}&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetResourceInfo&amp;diff=9377</id>
		<title>GetResourceInfo</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetResourceInfo&amp;diff=9377"/>
		<updated>2007-07-30T09:37:57Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Needs_Checking|may return a string, bool or nil (?) --[[User:Jbeta|jbeta]]}}&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This function retrieves the value of any attribute in a resource info tag.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string getResourceInfo ( resource theResource, string attribute ) &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theResource:''' the resource we are getting the info from.&lt;br /&gt;
*'''attribute:''' the name of the attribute we want info about.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a ''string'' with the attribute value if it exists, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This function tells the server who's the author who made the currently running resource.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function outputAuthor()&lt;br /&gt;
    author = getResourceInfo ( getThisResource(), &amp;quot;author&amp;quot; )    --Get the authors name&lt;br /&gt;
    if author then    --if it exists&lt;br /&gt;
        outputChatBox( author .. &amp;quot; made this script.&amp;quot; )    --tell the world his name&lt;br /&gt;
    else    --if it doesn't&lt;br /&gt;
        outputChatBox( &amp;quot;I've no idea who made this script.&amp;quot; )    --apologize.&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Resource_functions}}&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetResourceConfig&amp;diff=9369</id>
		<title>GetResourceConfig</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetResourceConfig&amp;diff=9369"/>
		<updated>2007-07-30T09:23:48Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
This function is used to return the root node of a configuration file. Config files must be predefined in a resource's [[meta file]].&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
xmlnode getResourceConfig ( [resource theResource = getThisResource()], string filename )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''filename:''' The exact file name of the configuration file. (e.g. &amp;quot;file.xml&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments===&lt;br /&gt;
*'''theResource:''' The resource from which the function calls the configuration file&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the root node of the specified configuration file. If the file is corrupted, not defined in the meta file or doesn't exist, returns false.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
In the example&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function resourceStart ( resourcename )    --When the resource is started&lt;br /&gt;
    if ( resourcename == getThisResource () ) then    --if the resource is this one&lt;br /&gt;
        node = getResourceConfig( resourcename, &amp;quot;file.xml&amp;quot; )    --get the configuration file&lt;br /&gt;
        local subNode = xmlFindSubNode( node, &amp;quot;group&amp;quot;, 1 )    --get a subnode in it&lt;br /&gt;
        outputChatBox( xmlNodeGetAttribute( node, &amp;quot;attr&amp;quot; ) )    --output its' the attributes value to chatbox.&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onResourceStart&amp;quot;, getRootElement(), resourceStart )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Resource_functions}}&lt;br /&gt;
[[Category:Incomplete]]&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetRadarAreaSize&amp;diff=9368</id>
		<title>GetRadarAreaSize</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetRadarAreaSize&amp;diff=9368"/>
		<updated>2007-07-30T09:12:45Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
Used for getting the X and Y size of an existing radar area.&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 getRadarAreaSize ( radararea theRadararea )              &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theRadararea:''' The radararea element whose size you wish to get.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns two ''floats'' indicating the X and Y length of the radar area respectively, ''false'' if the radar area doesn't exist.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
The following example looks for radar areas whose size is smaller than 100 by 100:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
radarareas = getElementsByType ( &amp;quot;radararea&amp;quot; ) -- get a tabele of radararea elements&lt;br /&gt;
for k,v in ipairs(radarareas) do -- use a generic for loop to step through each of the elements&lt;br /&gt;
   local sizeX, sizeY = getRadarAreaSize ( v ) -- get the size of the radar area&lt;br /&gt;
   if ( sizeX &amp;lt; 100 and sizeY &amp;lt; 100 ) then -- check if it's smaller than 100 by 100&lt;br /&gt;
      outputChatBox ( &amp;quot;A small radar area was found!&amp;quot; )&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
This example creates a radar area and stores it's size in variables x and y:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
greenArea = createRadarArea ( 1024, 1024, 50, 120, 0, 220, 0, 85 )&lt;br /&gt;
local x, y = getRadarAreaSize ( greenArea )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Radar area_functions}}&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetPlayerWantedLevel&amp;diff=9363</id>
		<title>GetPlayerWantedLevel</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPlayerWantedLevel&amp;diff=9363"/>
		<updated>2007-07-30T09:01:29Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
This function gets a player's current wanted level. The wanted level is indicated by the amount of stars a player has on the [[HUD]].&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
int getPlayerWantedLevel ( player thePlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePlayer:''' The player whose wanted level you wish to get&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an ''int'' from 0 to 6 representing the player's wanted level, ''false'' if the player does not exist.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example finds which players in the server have a wanted level:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local players = getElementsByType ( &amp;quot;player&amp;quot; ) -- get a table of all the players in the server&lt;br /&gt;
for theKey,thePlayer in ipairs(players) do -- use a generic for loop to step through each player&lt;br /&gt;
   local level = getPlayerWantedLevel ( thePlayer ) -- get the wanted level of the player&lt;br /&gt;
   if ( level &amp;gt; 0 ) then -- if the player has any stars, announce it in the chat:&lt;br /&gt;
      outputChatBox ( getClientName ( thePlayer ) .. &amp;quot; has a wanted level of &amp;quot; .. level .. &amp;quot;  stars!&amp;quot; )&lt;br /&gt;
   end &lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Player functions}}&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetVehicleLandingGearDown&amp;diff=8750</id>
		<title>SetVehicleLandingGearDown</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetVehicleLandingGearDown&amp;diff=8750"/>
		<updated>2007-06-20T17:06:41Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
This function is used to set the landing gear state of certain vehicles.&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 setVehicleLandingGearDown ( vehicle thevehicle, bool gearstate )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thevehicle:''' The vehicle of which you wish to set the landing gear state.&lt;br /&gt;
*'''gearstate:''' ''true'' or ''false''.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;!-- Explain what the example is in a single sentance --&amp;gt;&lt;br /&gt;
This example does...&lt;br /&gt;
&amp;lt;!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--This line does...&lt;br /&gt;
blabhalbalhb --abababa&lt;br /&gt;
--This line does this...&lt;br /&gt;
mooo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&amp;lt;!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --&amp;gt;&lt;br /&gt;
{{Vehicle functions}}&lt;br /&gt;
[[Category:Incomplete]]&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetVehicleDoorsUndamageable&amp;diff=8749</id>
		<title>SetVehicleDoorsUndamageable</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetVehicleDoorsUndamageable&amp;diff=8749"/>
		<updated>2007-06-20T17:03:06Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
This function is used to make a cars doors undamageable.&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 setVehicleDoorsUndamageable ( vehicle thevehicle, bool state )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thevehicle:''' The vehicle of which you wish to set the car door damageability.&lt;br /&gt;
*'''state:''' ''true'' or ''false''.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;!-- Explain what the example is in a single sentance --&amp;gt;&lt;br /&gt;
This example does...&lt;br /&gt;
&amp;lt;!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--This line does...&lt;br /&gt;
blabhalbalhb --abababa&lt;br /&gt;
--This line does this...&lt;br /&gt;
mooo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&amp;lt;!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --&amp;gt;&lt;br /&gt;
{{FunctionArea_functions}}&lt;br /&gt;
[[Category:Incomplete]] -- leave this unless you complete the function&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetSkyGradient&amp;diff=8748</id>
		<title>SetSkyGradient</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetSkyGradient&amp;diff=8748"/>
		<updated>2007-06-20T16:56:48Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
This function changes the sky color to a gradient.&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 setSkyGradient ( [ int topRed = 0, int topGreen = 0, int topBlue = 0, int bottomRed = 0, int bottomGreen = 0, int bottomBlue = 0 ] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''topRed:''' The ''red'' value of the upper part of the sky.&lt;br /&gt;
*'''topGreen:''' The ''green'' value of the upper part of the sky.&lt;br /&gt;
*'''topBlue:''' The ''blue'' value of the upper part of the sky.&lt;br /&gt;
*'''bottomRed:''' The ''red'' value of the lower part of the sky.&lt;br /&gt;
*'''bottomGreen:''' The ''green'' value of the lower part of the sky.&lt;br /&gt;
*'''bottomBlue:''' The ''blue'' value of the lower part of the sky.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if sky color was set correctly, ''false'' if the values go beyond 0 to 256, or are not numeric.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example sets the sky to a hot pink color.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
setSkyGradient( 200, 0, 100, 200, 0, 100 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client world functions}}&lt;br /&gt;
[[Category:Incomplete]]&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetMapName&amp;diff=8747</id>
		<title>SetMapName</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetMapName&amp;diff=8747"/>
		<updated>2007-06-20T16:51:00Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
This function is used to set a map name that will be visible via The All Seeing Eye.&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 setMapName ( string mapName )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''mapName:''' The name you wish ASE to show.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if map name was set successfully, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;!-- Explain what the example is in a single sentance --&amp;gt;&lt;br /&gt;
This example does...&lt;br /&gt;
&amp;lt;!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--This line does...&lt;br /&gt;
blabhalbalhb --abababa&lt;br /&gt;
--This line does this...&lt;br /&gt;
mooo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&amp;lt;!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --&amp;gt;&lt;br /&gt;
{{FunctionArea_functions}}&lt;br /&gt;
[[Category:Incomplete]] -- leave this unless you complete the function&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleLandingGearDown&amp;diff=8745</id>
		<title>GetVehicleLandingGearDown</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleLandingGearDown&amp;diff=8745"/>
		<updated>2007-06-20T16:38:58Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
This function is used to check whether a vehicles' landing gear is down or not.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool getVehicleLandingGearDown ( vehicle thevehicle )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thevehicle:''' The vehicle that you wish to check its' landing gear state.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if landing gear is down, ''false'' if the landing gear is up.&amp;lt;br /&amp;gt;&lt;br /&gt;
Returns ''nil'' if the vehicle has no landing gear, or is invalid.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;!-- Explain what the example is in a single sentance --&amp;gt;&lt;br /&gt;
This example does...&lt;br /&gt;
&amp;lt;!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--This line does...&lt;br /&gt;
blabhalbalhb --abababa&lt;br /&gt;
--This line does this...&lt;br /&gt;
mooo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&amp;lt;!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --&amp;gt;&lt;br /&gt;
{{Vehicle functions}}&lt;br /&gt;
[[Category:Incomplete]]&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetResourceName&amp;diff=8744</id>
		<title>GetResourceName</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetResourceName&amp;diff=8744"/>
		<updated>2007-06-20T16:35:32Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
This function is used to get resources names.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string getResourceName ( resource )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''resource:''' The resource you wish to get the name of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a string with the resource name in it, or ''false'' if the resource does not exist.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;!-- Explain what the example is in a single sentance --&amp;gt;&lt;br /&gt;
This example does...&lt;br /&gt;
&amp;lt;!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--This line does...&lt;br /&gt;
blabhalbalhb --abababa&lt;br /&gt;
--This line does this...&lt;br /&gt;
mooo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&amp;lt;!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --&amp;gt;&lt;br /&gt;
{{FunctionArea_functions}}&lt;br /&gt;
[[Category:Incomplete]] -- leave this unless you complete the function&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetResourceLoadFailureReason&amp;diff=8743</id>
		<title>GetResourceLoadFailureReason</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetResourceLoadFailureReason&amp;diff=8743"/>
		<updated>2007-06-20T16:33:09Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
This function is used to determinate the reason for a resource to not start.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string getResourceLoadFailureReason ( resource )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''resource:''' The resource you wish to check.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a string with the failure reason in it, or ''false'' if the resource doesn't exist.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;!-- Explain what the example is in a single sentance --&amp;gt;&lt;br /&gt;
This example does...&lt;br /&gt;
&amp;lt;!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--This line does...&lt;br /&gt;
blabhalbalhb --abababa&lt;br /&gt;
--This line does this...&lt;br /&gt;
mooo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&amp;lt;!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --&amp;gt;&lt;br /&gt;
{{FunctionArea_functions}}&lt;br /&gt;
[[Category:Incomplete]] -- leave this unless you complete the function&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=TriggerServerEvent&amp;diff=8742</id>
		<title>TriggerServerEvent</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=TriggerServerEvent&amp;diff=8742"/>
		<updated>2007-06-20T15:25:13Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
This function triggers an event on servers. This is the primary means of passing information between the client and the server. Servers have a similar [[triggerClientEvent]] function that can do the reverse. You can treat this function as if it was an asynchronous function call, using [[triggerClientEvent]] to pass back any returned information if necessary.&lt;br /&gt;
&lt;br /&gt;
Almost any data types can be passed as expected, including [[elements]] and complex nested [[tables]]. Special data types like xmlNodes will not be able to be passed as they do not necessarily have a valid representation on the client.&lt;br /&gt;
&lt;br /&gt;
Events are sent reliably, so the server will receive them, but there may be (but shouldn't be) a significant delay before they are received. You should take this into account when using them.&lt;br /&gt;
&lt;br /&gt;
Keep in mind the bandwidth issues when using events - don't pass a large list of arguments unless you really need to. It is marginally more efficient to pass one large event than two smaller ones.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool triggerServerEvent ( string event, element theElement, [arguments...] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''event:''' The name of the event to trigger server-side. You should register this event with [[addEvent]] and add at least one event handler using [[addEventHandler]].&lt;br /&gt;
*'''theElement:''' The element that is the ''source'' of the event. This could be another player, or if this isn't relevant, use the root element.&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
*'''arguments...:''' A list of arguments to trigger with the event. You can pass any lua data type (except functions). You can also pass [[elements]].&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the event trigger has been sent, ''false'' if invalid arguments were specified.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example shows how you can pass a simple &amp;quot;Hello World&amp;quot; message from the client to the server using an event.&lt;br /&gt;
&lt;br /&gt;
'''Server:'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEvent(&amp;quot;onGreeting&amp;quot;)&lt;br /&gt;
addEventHandler(&amp;quot;onGreeting&amp;quot;, getRootElement(), &amp;quot;greetingHandler&amp;quot;)&lt;br /&gt;
function greetingHandler ( message )&lt;br /&gt;
    outputChatBox ( &amp;quot;The client says: &amp;quot; .. message )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Client:'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler ( &amp;quot;greet&amp;quot;, &amp;quot;greetingCommand&amp;quot; )&lt;br /&gt;
function greetingCommand ( source, commandName )&lt;br /&gt;
    triggerServerEvent ( &amp;quot;onGreeting&amp;quot;, getRootElement(), &amp;quot;Hello World!&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
When the command &amp;quot;greet&amp;quot; is executed (by typing it in the server console or the player's console), the clients ''greetingCommand'' function is called. This triggers the server-side event ''onGreeting'' with the string ''&amp;quot;Hello World!&amp;quot;''. This event is then handled by the ''greetingHandler'' function server-side which then displays the message.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{FunctionArea_functions}}&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=TriggerClientEvent&amp;diff=8741</id>
		<title>TriggerClientEvent</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=TriggerClientEvent&amp;diff=8741"/>
		<updated>2007-06-20T15:14:02Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
This function triggers an event on clients. This is the primary means of passing information between the server and the client. Clients have a similar [[triggerServerEvent]] function that can do the reverse. You can treat this function as if it was an asynchronous function call, using [[triggerServerEvent]] to pass back any returned information if necessary.&lt;br /&gt;
&lt;br /&gt;
Almost any data types can be passed as expected, including [[elements]] and complex nested [[tables]]. Special data types like xmlNodes will not be able to be passed as they do not necessarily have a valid representation on the client.&lt;br /&gt;
&lt;br /&gt;
Events are sent reliably, so clients will receive them, but there may be (but shouldn't be) a significant delay before they are received. You should take this into account when using them.&lt;br /&gt;
&lt;br /&gt;
Keep in mind the bandwidth issues when using events - don't pass a large list of arguments unless you really need to. It is marginally more efficient to pass one large event than two smaller ones.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool triggerClientEvent ( [element triggerFor=getRootElement()], string name, element theElement, [arguments...] )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''name:''' The name of the event to trigger client side. You should register this event with [[addEvent]] and add at least one event handler using [[addEventHandler]].&lt;br /&gt;
*'''theElement:''' The element that is the ''source'' of the event. This could be another player, or if this isn't relevant, use the root element.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Only include this section below if there are optional arguments --&amp;gt;&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''triggerFor:''' The event will be triggered on all [[players]] that are children of the specified element. By default this is the root element, and hence the event is triggered on all elements. If you specify a single player it will just be triggered for that player.&lt;br /&gt;
*'''arguments...:''' A list of arguments to trigger with the event. You can pass any lua data type (except functions). You can also pass [[elements]].&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the event trigger has been sent, ''false'' if invalid arguments were specified.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example shows how you can pass a simple &amp;quot;Hello World&amp;quot; message from the server to the client using an event.&lt;br /&gt;
&lt;br /&gt;
'''Client:'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEvent(&amp;quot;onGreeting&amp;quot;)&lt;br /&gt;
addEventHandler(&amp;quot;onGreeting&amp;quot;, getRootElement(), &amp;quot;greetingHandler&amp;quot;)&lt;br /&gt;
function greetingHandler ( message )&lt;br /&gt;
    outputChatBox ( &amp;quot;The server says: &amp;quot; .. message )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Server:'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler ( &amp;quot;greet&amp;quot;, &amp;quot;greetingCommand&amp;quot; )&lt;br /&gt;
function greetingCommand ( source, commandName )&lt;br /&gt;
    triggerClientEvent ( &amp;quot;onGreeting&amp;quot;, getRootElement(), &amp;quot;Hello World!&amp;quot; )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
When the command &amp;quot;greet&amp;quot; is executed (by typing it in the server console or the player's console), the server's ''greetingCommand'' function is called. This triggers the client side event ''onGreeting'' with the string ''&amp;quot;Hello World!&amp;quot;''. This event is then handled by the ''greetingHandler'' function client side which then displays the message.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Event_functions}}&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=XmlSaveFile&amp;diff=8740</id>
		<title>XmlSaveFile</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=XmlSaveFile&amp;diff=8740"/>
		<updated>2007-06-20T15:12:38Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
This function saves a loaded XML file.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool xmlSaveFile ( xmlnode rootNode ) &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''rootNode:''' the root [[xmlnode]] of the loaded XML file.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if save was successful, ''false'' if the XML file does not exist.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--This line does...&lt;br /&gt;
blabhalbalhb --abababa&lt;br /&gt;
--This line does this...&lt;br /&gt;
mooo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{XML_functions}}&lt;br /&gt;
[[Category:Incomplete]]&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=XmlNodeSetAttribute&amp;diff=8739</id>
		<title>XmlNodeSetAttribute</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=XmlNodeSetAttribute&amp;diff=8739"/>
		<updated>2007-06-20T15:10:45Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
This function is used to edit an attribute of a node in a configuration file.&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 xmlNodeSetAttribute ( xmlnode xmlnode, string name, var value )             &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''xmlnode:''' The node in which you wish to edit the attribute.&lt;br /&gt;
*'''name:''' The name of the attribute.&lt;br /&gt;
*'''value:''' The value which you wish to change the attribute to.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if edit was successful, ''false'' if the node and/or attribute do not exist, or if they're faulty.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example does...&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--This line does...&lt;br /&gt;
blabhalbalhb --abababa&lt;br /&gt;
--This line does this...&lt;br /&gt;
mooo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{FunctionArea_Functions}}&lt;br /&gt;
{{XML_functions}}&lt;br /&gt;
[[Category:Incomplete]]&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=XmlNodeGetAttribute&amp;diff=8737</id>
		<title>XmlNodeGetAttribute</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=XmlNodeGetAttribute&amp;diff=8737"/>
		<updated>2007-06-20T15:06:04Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
This function is used to return an attribute of a node in a configuration file.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
string xmlNodeGetAttribute ( xmlnode xmlnode, string name )             &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''xmlnode:''' The node from which you wish to return the attribute&lt;br /&gt;
*'''name:''' The name of the attribute.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the attribute in string form.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example does...&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--This line does...&lt;br /&gt;
blabhalbalhb --abababa&lt;br /&gt;
--This line does this...&lt;br /&gt;
mooo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{FunctionArea_Functions}}&lt;br /&gt;
{{XML_functions}}&lt;br /&gt;
[[Category:Incomplete]]&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=RemoveAccount&amp;diff=8736</id>
		<title>RemoveAccount</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=RemoveAccount&amp;diff=8736"/>
		<updated>2007-06-20T14:56:10Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
This function is used to delete existing player accounts.&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 removeAccount ( account theAccount )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theAccount:''' The account you wish to remove&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if account was successfully removed, ''false'' if the account does not exist.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;!-- Explain what the example is in a single sentance --&amp;gt;&lt;br /&gt;
This example does...&lt;br /&gt;
&amp;lt;!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--This line does...&lt;br /&gt;
blabhalbalhb --abababa&lt;br /&gt;
--This line does this...&lt;br /&gt;
mooo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&amp;lt;!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --&amp;gt;&lt;br /&gt;
{{FunctionArea_functions}}&lt;br /&gt;
[[Category:Incomplete]]&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SpawnVehicle&amp;diff=8735</id>
		<title>SpawnVehicle</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SpawnVehicle&amp;diff=8735"/>
		<updated>2007-06-20T14:53:22Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
Respawns vehicles to where they were first spawned.&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 respawnVehicle ( vehicle thevehicle )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thevehicle:''' The vehicle you wish to respawn&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the vehicle respawned successfully, ''false'' if the passed argument does not exist or is not a vehicle.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;!-- Explain what the example is in a single sentance --&amp;gt;&lt;br /&gt;
This example does...&lt;br /&gt;
&amp;lt;!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--This line does...&lt;br /&gt;
blabhalbalhb --abababa&lt;br /&gt;
--This line does this...&lt;br /&gt;
mooo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&amp;lt;!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --&amp;gt;&lt;br /&gt;
{{Vehicle functions}}&lt;br /&gt;
[[Category:Incomplete]]&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsVehicleOnGround&amp;diff=8734</id>
		<title>IsVehicleOnGround</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsVehicleOnGround&amp;diff=8734"/>
		<updated>2007-06-20T14:48:09Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
Checks to see if a vehicle has contact with the ground.&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 isVehicleOnGround ( vehicle thevehicle )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thevehicle:''' The vehicle you wish to check.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if vehicle is on the ground, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;!-- Explain what the example is in a single sentance --&amp;gt;&lt;br /&gt;
This example does...&lt;br /&gt;
&amp;lt;!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--This line does...&lt;br /&gt;
blabhalbalhb --abababa&lt;br /&gt;
--This line does this...&lt;br /&gt;
mooo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&amp;lt;!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --&amp;gt;&lt;br /&gt;
{{FunctionArea_functions}}&lt;br /&gt;
[[Category:Incomplete]] -- leave this unless you complete the function&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsElementAttached&amp;diff=8733</id>
		<title>IsElementAttached</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsElementAttached&amp;diff=8733"/>
		<updated>2007-06-20T14:44:53Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
&amp;lt;!-- Describe in plain english what this function does. Don't go into details, just give an overview --&amp;gt;&lt;br /&gt;
This functions checks whether or not an element is attached to another element.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;!-- NOTE: don't use 'special' names for variable names, e.g. you shouldn't be writing things like 'player player, vehicle vehicle', instead write something like 'player thePlayer, vehicle vehicleToGetInto'. This is less confusing and prevents the syntax highlighting being odd --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool isElementAttached ( theElement )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
&amp;lt;!-- List each argument one per line. This should be the argument's name as in the argument list above, NOT the argument's data type --&amp;gt;&lt;br /&gt;
*'''theElement:''' The element to check for attachment.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
&amp;lt;!-- Make this descriptive. Explain what cases will return false. If you're unsure, add a tag to it so we can check --&amp;gt;&lt;br /&gt;
Returns ''true'' if the specified element is attached to another element, ''false'' if it is not attached or if an improper argument is passed.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;!-- Explain what the example is in a single sentance --&amp;gt;&lt;br /&gt;
This examples checks if a player is attached to anything when they enter a console command:&lt;br /&gt;
&amp;lt;!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- add a command handler for 'amiattached' to call the function 'consoleIsPlayerAttached':&lt;br /&gt;
addCommandHandler ( &amp;quot;amiattached&amp;quot;, &amp;quot;consoleIsPlayerAttached&amp;quot; )&lt;br /&gt;
function consoleIsPlayerAttached ( player, command )&lt;br /&gt;
   if ( player ) then -- if a player triggered this command&lt;br /&gt;
      local status = isElementAttached ( player ) -- call the function and store it's result in the 'status' variable&lt;br /&gt;
      if ( status ) then -- if the function returned true, tell the player he is attached to something&lt;br /&gt;
         outputConsole ( &amp;quot;You are attached to an element!&amp;quot;, player )&lt;br /&gt;
      else -- if the function returned false, tell the player he is not attached to anything&lt;br /&gt;
         outputConsole ( &amp;quot;You are not attached to an element.&amp;quot;, player )&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Element_functions}}&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=IsControlEnabled&amp;diff=8732</id>
		<title>IsControlEnabled</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=IsControlEnabled&amp;diff=8732"/>
		<updated>2007-06-20T14:43:28Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
Checks whether a GTA control is enabled or disabled for a certain player.&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 isControlEnabled ( player theplayer, string control )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePlayer:''' The player you wish the control status of.&lt;br /&gt;
*'''control:''' The control you wish to check. See [[control names]] for a list of possible controls.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if control is enabled, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
--This line does...&lt;br /&gt;
blabhalbalhb --abababa&lt;br /&gt;
--This line does this...&lt;br /&gt;
mooo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&amp;lt;!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --&amp;gt;&lt;br /&gt;
{{FunctionArea_functions}}&lt;br /&gt;
[[Category:Incomplete]] -- leave this unless you complete the function&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetResourceConfig&amp;diff=8643</id>
		<title>GetResourceConfig</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetResourceConfig&amp;diff=8643"/>
		<updated>2007-06-14T09:07:46Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
&amp;lt;!-- Describe in plain english what this function does. Don't go into details, just give an overview --&amp;gt;&lt;br /&gt;
This function is used to return the root node of a configuration file. (defined in meta.xml)&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;!-- NOTE: don't use 'special' names for variable names, e.g. you shouldn't be writing things like 'player player, vehicle vehicle', instead write something like 'player thePlayer, vehicle vehicleToGetInto'. This is less confusing and prevents the syntax highlighting being odd --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
xmlnode getResourceConfig ( resource theResource, string filename )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
&amp;lt;!-- List each argument one per line. This should be the argument's name as in the argument list above, NOT the argument's data type --&amp;gt;&lt;br /&gt;
*'''theResource:''' The resource from which the function calls the configuration file&lt;br /&gt;
*'''filename:''' The exact file name of the configuration file. (e.g. &amp;quot;file.xml&amp;quot; )&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
&amp;lt;!-- Make this descriptive. Explain what cases will return false. If you're unsure, add a tag to it so we can check --&amp;gt;&lt;br /&gt;
Returns the root node of the specified configuration file. If the file is corrupted, not defined in meta.xml or doesn't exist, returns false.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&amp;lt;!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --&amp;gt;&lt;br /&gt;
{{FunctionArea_functions}}&lt;br /&gt;
[[Category:Incomplete]]&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetElementBoundingBox&amp;diff=8641</id>
		<title>GetElementBoundingBox</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetElementBoundingBox&amp;diff=8641"/>
		<updated>2007-06-14T08:15:32Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
This function returns the minimum and maximum x,y,z coords of an element's bounding box.&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 getElementBoundingBox ( element theElement )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theElement:''' the element whose bounding box we want to get.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
*Returns ''min x, min y, min z, max x, max y, max z'' if the passed element is valid, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example outputs to chatbox the minimum and the maximum coords of an element. If the element doesn't exist or doesn't have such coords, it outputs &amp;quot;false&amp;quot;.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function minMaxOutput( element )&lt;br /&gt;
    x0, y0, z0, x1, y1, z1 = getElementBoundingBox ( element )&lt;br /&gt;
    if ( x0 ) then&lt;br /&gt;
        outputChatBox( &amp;quot;The coords are: &amp;quot; .. x0 .. &amp;quot;, &amp;quot; .. y0 .. &amp;quot;, &amp;quot; .. z0 .. &amp;quot;, &amp;quot; .. x1 .. &amp;quot;, &amp;quot; .. y1 .. &amp;quot;, &amp;quot; .. z1 )&lt;br /&gt;
    else&lt;br /&gt;
        outputChatBox( &amp;quot;false&amp;quot; )&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client element functions}}&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetCameraTarget&amp;diff=8640</id>
		<title>GetCameraTarget</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetCameraTarget&amp;diff=8640"/>
		<updated>2007-06-14T08:05:20Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
This function returns an [[element]] that corresponds to the current target of the specified player's camera (i.e. what it is following). &lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
element getCameraTarget ( player thePlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePlayer:''' The player whose camera you wish to receive the target of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an [[element]] if the function was successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example checks wether a players cameras target is another player, and returns true or false accordingly.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function isTargetPlayer( player )&lt;br /&gt;
    local target = getCameraTarget( player )&lt;br /&gt;
    if ( getElementType ( target ) == &amp;quot;player&amp;quot;  ) then  --If target is a player&lt;br /&gt;
        return true  --Return true&lt;br /&gt;
    else&lt;br /&gt;
        return false  --Otherwise, return false.&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Camera functions}}&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetCameraTarget&amp;diff=8639</id>
		<title>GetCameraTarget</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetCameraTarget&amp;diff=8639"/>
		<updated>2007-06-14T08:01:09Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
This function returns an [[element]] that corresponds to the current target of the specified player's camera (i.e. what it is following). &lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
element getCameraTarget ( player thePlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePlayer:''' The player whose camera you wish to receive the target of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an [[element]] if the function was successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example returns the element which was set as the players cameras target, otherwise, returning false.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function returnCamTarget( player )&lt;br /&gt;
    local target = getCameraTarget( player )&lt;br /&gt;
    if ( target ) then  --If target is not false&lt;br /&gt;
        return target  --Return target&lt;br /&gt;
    else&lt;br /&gt;
        return false  --Otherwise, return false.&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Camera functions}}&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=AddAccount&amp;diff=8637</id>
		<title>AddAccount</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=AddAccount&amp;diff=8637"/>
		<updated>2007-06-14T07:49:56Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
This function adds an account to the list of registered account of the current server.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;!-- NOTE: don't use 'special' names for variable names, e.g. you shouldn't be writing things like 'player player, vehicle vehicle', instead write something like 'player thePlayer, vehicle vehicleToGetInto'. This is less confusing and prevents the syntax highlighting being odd --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
bool addAccount ( string name, string pass, int level )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
&amp;lt;!-- List each argument one per line. This should be the argument's name as in the argument list above, NOT the argument's data type --&amp;gt;&lt;br /&gt;
*'''name:''' The name of the account you wish to make, this normally is the Players Name.&lt;br /&gt;
*'''pass:''' The password to set to this account for future logins.&lt;br /&gt;
*'''level:''' The account level (see below for more detailed level values)&lt;br /&gt;
&lt;br /&gt;
Level Notes:&lt;br /&gt;
You may specify any level here, normally the account level is used for future use such as creating an admin system...&lt;br /&gt;
&lt;br /&gt;
You can check the current players access level with this command: [[getClientLevel]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Only include this section below if there are optional arguments --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
&amp;lt;!-- Make this descriptive. Explain what cases will return false. If you're unsure, add a tag to it so we can check --&amp;gt;&lt;br /&gt;
Returns ''true'' if the account was created, ''false'' if the account allready exists, or if an error occoured.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;!-- Explain what the example is in a single sentance --&amp;gt;&lt;br /&gt;
In this example, it enables players to register on your server by using /register &amp;lt;password&amp;gt; in the chat window.&lt;br /&gt;
&amp;lt;!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler ( &amp;quot;register&amp;quot;, root, &amp;quot;registerPlayer&amp;quot; )&lt;br /&gt;
function registerPlayer ( source, password )&lt;br /&gt;
	--Check if the password field is blank or not (only blank if they didnt enter one)&lt;br /&gt;
	if ( password ~= &amp;quot;&amp;quot; or password ~= nil ) then&lt;br /&gt;
		--Attempt to add the account, and save its value in a var&lt;br /&gt;
		local accountAdded = addAccount( getClientName(source), password, 0 )&lt;br /&gt;
		if ( accountAdded ) then&lt;br /&gt;
			--Tell the user its all done&lt;br /&gt;
			outputChatBox ( &amp;quot;Thankyou &amp;quot; .. getClientName(source) .. &amp;quot;, you're now registed, you can login with /login&amp;quot;, source )&lt;br /&gt;
		else&lt;br /&gt;
			--There was an error making the account, tell the user&lt;br /&gt;
			outputChatBox ( &amp;quot;Error Creating Account, Contact the server admin&amp;quot;, source )&lt;br /&gt;
		end&lt;br /&gt;
	else&lt;br /&gt;
		--There was an error in the syntax, tell the user the correct syntax.&lt;br /&gt;
		outputChatBox ( &amp;quot;Error Creating Account, correct syntax: /register &amp;lt;password&amp;gt;&amp;quot;, source )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
&amp;lt;!-- Change FunctionArea to the area that this function is in on the main function list page, e.g. Server, Player, Vehicle etc --&amp;gt;&lt;br /&gt;
{{FunctionArea_functions}}&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientColShapeHit&amp;diff=8636</id>
		<title>OnClientColShapeHit</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientColShapeHit&amp;diff=8636"/>
		<updated>2007-06-14T07:47:08Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
This event triggers whenever an element enters a collision shape.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
void onClientColShapeHit ( entity theEntity, bool matchingDimension )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example outputs &amp;quot;In.&amp;quot; to the chatbox whenever a local user enters a collision shape.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function onClientColShapeHit( theEntity, matchingDimension )&lt;br /&gt;
    if ( theEntity == getLocalPlayer() ) then  --Checks whether the entering entity is the local player&lt;br /&gt;
        outputChatBox( &amp;quot;In.&amp;quot; )  --Outputs.&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientColShapeLeave&amp;diff=8635</id>
		<title>OnClientColShapeLeave</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientColShapeLeave&amp;diff=8635"/>
		<updated>2007-06-14T07:27:47Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
This event triggers whenever an element leaves a collision shape.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
void onClientColShapeLeave ( entity theEntity, bool matchingDimension )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example outputs &amp;quot;Out.&amp;quot; to the chatbox whenever a local user leaves a collision shape.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function onClientColShapeLeave( theEntity, matchingDimension )&lt;br /&gt;
    if ( theEntity == getLocalPlayer() ) then  --Checks whether the leaving entity is the local player&lt;br /&gt;
        outputChatBox( &amp;quot;Out.&amp;quot; )  --Outputs.&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnClientColShapeHit&amp;diff=8633</id>
		<title>OnClientColShapeHit</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnClientColShapeHit&amp;diff=8633"/>
		<updated>2007-06-14T07:25:34Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Incomplete Event]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This event triggers whenever an element enters a collision shape.&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
void onClientColShapeHit ( entity theEntity, bool matchingDimension )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example outputs &amp;quot;In.&amp;quot; to the chatbox whenever a local user enters a collision shape.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function onClientColShapeHit( theEntity, matchingDimension )&lt;br /&gt;
    if ( theEntity == getLocalPlayer() ) then  --Checks whether the entering entity is the local player&lt;br /&gt;
        outputChatBox( &amp;quot;In.&amp;quot; )  --Outputs.&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetCameraPosition&amp;diff=8061</id>
		<title>GetCameraPosition</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetCameraPosition&amp;diff=8061"/>
		<updated>2007-04-19T12:20:24Z</updated>

		<summary type="html">&lt;p&gt;Black Dragon: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Needs_Checking|Returns 0 0 0 with script:&lt;br /&gt;
&amp;lt;pre&amp;gt;addCommandHandler ( &amp;quot;getcampos&amp;quot;, &amp;quot;retrieveCameraPosition&amp;quot; )&lt;br /&gt;
function retrieveCameraPosition ( player, commandName )&lt;br /&gt;
local camx, camy, camz = getCameraPosition ( player )&lt;br /&gt;
outputChatBox ( &amp;quot;X: &amp;quot;..camx..&amp;quot; Y: &amp;quot;..camy..&amp;quot; Z: &amp;quot;..camz )&lt;br /&gt;
end&amp;lt;/pre&amp;gt;--[[User:Ransom|Ransom]] 17:17, 11 April 2007 (CDT)}} &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This function returns the position the player's camera would have if the camera mode is fixed (see [[setCameraMode]]).&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
float float float getCameraPosition ( player thePlayer )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''thePlayer:''' The player whose camera position you wish to obtain.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns three [[float|floats]] containing the x, y and z co-ordinate values if the function was successful, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;!-- Explain what the example is in a single sentance --&amp;gt;&lt;br /&gt;
This example does...&lt;br /&gt;
&amp;lt;!-- Add the code below, an emphasis should be on making it clear, not optimized. You could provide two versions if you wish, one clear and well commented, the other optimized --&amp;gt;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler( &amp;quot;check&amp;quot;, &amp;quot;checkCamera&amp;quot; )&lt;br /&gt;
function checkCamera( source )&lt;br /&gt;
      if ( getCameraMode( source ) == &amp;quot;fixed&amp;quot; ) then --If the camera is fixed...&lt;br /&gt;
            local camx, camy, camz = getCameraPosition( source ) --Get the cameras position&lt;br /&gt;
            outputConsole( camx .. &amp;quot; &amp;quot; .. camy .. &amp;quot; &amp;quot; .. camz, source ) --And output it.&lt;br /&gt;
      else&lt;br /&gt;
            outputConsole( &amp;quot;The camera is not fixed&amp;quot;, source ) --If not, say so.&lt;br /&gt;
      end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Camera functions}}&lt;/div&gt;</summary>
		<author><name>Black Dragon</name></author>
	</entry>
</feed>