<?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=DracoBlue</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=DracoBlue"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/DracoBlue"/>
	<updated>2026-04-25T04:51:50Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Vehicle_functions&amp;diff=17730</id>
		<title>Template:Vehicle functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Vehicle_functions&amp;diff=17730"/>
		<updated>2008-10-04T09:55:39Z</updated>

		<summary type="html">&lt;p&gt;DracoBlue: /* added respawnVehicle */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[blowVehicle]]&lt;br /&gt;
*[[createVehicle]]&lt;br /&gt;
*[[fixVehicle]]&lt;br /&gt;
*[[spawnVehicle]]&lt;br /&gt;
*[[respawnVehicle]]&lt;br /&gt;
&lt;br /&gt;
*[[getVehicleColor]] &lt;br /&gt;
*[[getVehicleID]]&lt;br /&gt;
*[[getVehicleIDFromName]]&lt;br /&gt;
*[[getVehicleNameFromID]]&lt;br /&gt;
*[[getVehicleMaxPassengers]]&lt;br /&gt;
*[[getVehicleName]]&lt;br /&gt;
*[[getVehicleOccupant]]&lt;br /&gt;
*[[getVehicleController]]&lt;br /&gt;
*[[getVehicleRotation]]&lt;br /&gt;
*[[getVehicleType]] &lt;br /&gt;
*[[getVehicleTurnVelocity]]&lt;br /&gt;
*[[getVehicleTurretPosition]]&lt;br /&gt;
*[[getVehiclesOfType]]&lt;br /&gt;
*[[getVehicleUpgradeOnSlot]]&lt;br /&gt;
*[[getVehicleUpgrades]]&lt;br /&gt;
*[[getVehicleUpgradeSlotName]]&lt;br /&gt;
*[[getVehicleCompatibleUpgrades]]&lt;br /&gt;
*[[getVehicleDoorState]]&lt;br /&gt;
*[[getVehicleEngineState]]&lt;br /&gt;
*[[getVehicleWheelStates]]&lt;br /&gt;
*[[getVehicleLightState]]&lt;br /&gt;
*[[getVehicleOverrideLights]]&lt;br /&gt;
*[[getVehiclePanelState]]&lt;br /&gt;
*[[getVehicleTowedByVehicle]]&lt;br /&gt;
*[[getVehicleTowingVehicle]]&lt;br /&gt;
*[[getVehiclePaintjob]]&lt;br /&gt;
*[[getVehicleSirensOn]]&lt;br /&gt;
*[[getVehicleLandingGearDown]]&lt;br /&gt;
&lt;br /&gt;
*[[isVehicleFrozen]]&lt;br /&gt;
*[[isVehicleLocked]]&lt;br /&gt;
*[[isVehicleFuelTankExplodable]]&lt;br /&gt;
*[[isVehicleOnGround]]&lt;br /&gt;
&lt;br /&gt;
*[[resetVehicleIdleTime]]&lt;br /&gt;
*[[resetVehicleExplosionTime]]&lt;br /&gt;
&lt;br /&gt;
*[[setVehicleColor]]&lt;br /&gt;
*[[setVehicleFrozen]]&lt;br /&gt;
*[[setVehicleLocked]]&lt;br /&gt;
*[[setVehicleModel]]&lt;br /&gt;
*[[setVehicleDoorsUndamageable]]&lt;br /&gt;
*[[setVehicleRotation]]&lt;br /&gt;
*[[setVehicleTurnVelocity]]&lt;br /&gt;
*[[addVehicleUpgrade]]&lt;br /&gt;
*[[removeVehicleUpgrade]]&lt;br /&gt;
*[[setVehicleDoorState]]&lt;br /&gt;
*[[setVehicleWheelStates]]&lt;br /&gt;
*[[setVehicleLightState]]&lt;br /&gt;
*[[toggleVehicleRespawn]]&lt;br /&gt;
*[[setVehicleOverrideLights]]&lt;br /&gt;
*[[attachTrailerToVehicle]]&lt;br /&gt;
*[[detachTrailerFromVehicle]]&lt;br /&gt;
*[[setVehiclePaintjob]]&lt;br /&gt;
*[[setVehiclePanelState]]&lt;br /&gt;
*[[setVehicleEngineState]]&lt;br /&gt;
*[[setVehicleFuelTankExplodable]]&lt;br /&gt;
*[[setVehicleSirensOn]]&lt;br /&gt;
*[[setVehicleGunsEnabled]]&lt;br /&gt;
*[[setVehicleLandingGearDown]]&lt;br /&gt;
*[[setVehicleDamageProof]]&lt;br /&gt;
*[[setVehicleRespawnPosition]]&lt;br /&gt;
*[[setVehicleRespawnDelay]]&lt;br /&gt;
*[[setVehicleIdleRespawnDelay]]&lt;/div&gt;</summary>
		<author><name>DracoBlue</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User:DracoBlue&amp;diff=9159</id>
		<title>User:DracoBlue</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User:DracoBlue&amp;diff=9159"/>
		<updated>2007-07-17T17:24:10Z</updated>

		<summary type="html">&lt;p&gt;DracoBlue: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Personal ==&lt;br /&gt;
Most stuff can be found on my private site [http://dracoblue.net dracoblue.net].&lt;br /&gt;
* [http://dracoblue.net/dev dev-diary]&lt;br /&gt;
* [http://gtat.org GTA:Tournament] (League based on SAMP, soon MTA!)&lt;br /&gt;
* ''(german)'' [http://www.newsflut.de newsflut.de]&lt;br /&gt;
* ''(german)'' [http://wp.dracoblue.net private blog]&lt;br /&gt;
* [http://luanet.net/lua Lua API Documentation]&lt;br /&gt;
&lt;br /&gt;
== Away ==&lt;br /&gt;
''Will be away until next monday, due to exams. Wish me luck :-).''&lt;/div&gt;</summary>
		<author><name>DracoBlue</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User:DracoBlue/DGTAsa&amp;diff=8469</id>
		<title>User:DracoBlue/DGTAsa</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User:DracoBlue/DGTAsa&amp;diff=8469"/>
		<updated>2007-06-01T21:44:42Z</updated>

		<summary type="html">&lt;p&gt;DracoBlue: /* Documented the source to make it working with LuaDoc */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Implementation==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;function inheritsFrom( baseClass )&lt;br /&gt;
 &lt;br /&gt;
	local new_class = {}&lt;br /&gt;
	local class_mt = { __index = new_class }&lt;br /&gt;
	&lt;br /&gt;
	function new_class:create()&lt;br /&gt;
		local newinst = {}&lt;br /&gt;
		setmetatable( newinst, class_mt )&lt;br /&gt;
		return newinst&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if nil ~= baseClass then&lt;br /&gt;
		setmetatable( new_class, { __index = baseClass } )&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Implementation of additional OO properties starts here --&lt;br /&gt;
	&lt;br /&gt;
	-- Return the class object of the instance&lt;br /&gt;
	function new_class:class()&lt;br /&gt;
		return new_class&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Return the super class object of the instance&lt;br /&gt;
	function new_class:superClass()&lt;br /&gt;
		return baseClass&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Return true if the caller is an instance of theClass&lt;br /&gt;
	function new_class:isa( theClass )&lt;br /&gt;
		local b_isa = false&lt;br /&gt;
	&lt;br /&gt;
		local cur_class = new_class&lt;br /&gt;
	&lt;br /&gt;
		while ( nil ~= cur_class ) and ( false == b_isa ) do&lt;br /&gt;
		if cur_class == theClass then&lt;br /&gt;
			b_isa = true&lt;br /&gt;
		else&lt;br /&gt;
			cur_class = cur_class:superClass()&lt;br /&gt;
		end&lt;br /&gt;
		end&lt;br /&gt;
	&lt;br /&gt;
		return b_isa&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return new_class&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
module(&amp;quot;GTAsa&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
-- The GTAElement&lt;br /&gt;
-- @class table&lt;br /&gt;
-- @name GTAElement&lt;br /&gt;
GTAElement=inheritsFrom(nil)&lt;br /&gt;
GTAElement.ID=nil&lt;br /&gt;
function GTAElement:className() return &amp;quot;GTAElement&amp;quot; end&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
-- Get Element's `key`-Data&lt;br /&gt;
-- @param key string Key of data&lt;br /&gt;
-- @return Content&lt;br /&gt;
function GTAElement:getData(key)&lt;br /&gt;
	return getElementData(self.ID,key)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
-- Set Element's `key`-Data&lt;br /&gt;
-- @param key string Key of data&lt;br /&gt;
-- @param value Value to set.&lt;br /&gt;
function GTAElement:setData(key,value)&lt;br /&gt;
	setElementData(self.ID,key,value)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
-- Get current Position of the Element&lt;br /&gt;
-- @return x, y, z&lt;br /&gt;
function GTAElement:Position()&lt;br /&gt;
	return getElementPosition(self.ID)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
-- The GTAPlayer&lt;br /&gt;
-- @name GTAPlayer&lt;br /&gt;
GTAPlayer=inheritsFrom(GTAElement)&lt;br /&gt;
function GTAPlayer:className() return &amp;quot;GTAPlayer&amp;quot; end&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
-- Give a specific amount of ammo of a weapon to the player&lt;br /&gt;
-- @param w_id int WeaponID&lt;br /&gt;
-- @param ammo int Amount of Ammo&lt;br /&gt;
function GTAPlayer:giveWeapon(w_id,ammo)&lt;br /&gt;
	giveWeapon(self.ID,w_id,ammo)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
-- Get current ping of the player&lt;br /&gt;
-- @return int value&lt;br /&gt;
function GTAPlayer:Ping()&lt;br /&gt;
	return getPlayerPing(self.ID)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
-- Get current name of the player&lt;br /&gt;
-- @return string name&lt;br /&gt;
function GTAPlayer:Name()&lt;br /&gt;
	return getClientName(self.ID)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
-- Get current rotation of the player&lt;br /&gt;
-- @return float value&lt;br /&gt;
function GTAPlayer:Rotation()&lt;br /&gt;
	return getPlayerRotation(self.ID)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
-- Get current amount of health points of player&lt;br /&gt;
-- @return int Health of the player&lt;br /&gt;
function GTAPlayer:Health()&lt;br /&gt;
	return getPlayerHealth(self.ID)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
-- Set players current health points&lt;br /&gt;
-- @param val int New amount of health a player has&lt;br /&gt;
-- @return If it was possible&lt;br /&gt;
function GTAPlayer:setHealth(val)&lt;br /&gt;
	return setPlayerHealth(self.ID,val)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
-- Let a player die by the hand of an attacker&lt;br /&gt;
-- @param attacker ID of the attacker&lt;br /&gt;
-- @param weapon The weapon the attacker used&lt;br /&gt;
-- @param bodypart The bodypart, which was hit&lt;br /&gt;
-- @return bool True if it was possible &lt;br /&gt;
function GTAPlayer:die(attacker,weapon,bodypart)&lt;br /&gt;
	return killPlayer(self.ID,attacker,weapon,bodypart)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
-- Check wether player is dead or not&lt;br /&gt;
-- @return bool True if the player is dead &lt;br /&gt;
function GTAPlayer:isDead()&lt;br /&gt;
	return isPlayerDead(self.ID)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
-- Check wether player is alive or not&lt;br /&gt;
-- @return bool True if the player is alive &lt;br /&gt;
function GTAPlayer:isAlive()&lt;br /&gt;
	return not isPlayerDead(self.ID)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
-- Check wether player is ducked or not&lt;br /&gt;
-- @return bool True if the player is ducked &lt;br /&gt;
function GTAPlayer:isDucked()&lt;br /&gt;
	return isPlayerDucked(self.ID)&lt;br /&gt;
end&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Usage ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
p = GTAPlayer:create()&lt;br /&gt;
p.ID=source;&lt;br /&gt;
p:setHealth(p:Health()-10)&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>DracoBlue</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetVehicleIDFromName&amp;diff=8449</id>
		<title>GetVehicleIDFromName</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetVehicleIDFromName&amp;diff=8449"/>
		<updated>2007-05-31T19:01:02Z</updated>

		<summary type="html">&lt;p&gt;DracoBlue: /* Example, added Tabs to the If */&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;
addCommandHandler ( &amp;quot;spawnvehicle&amp;quot;, &amp;quot;createvehiclecommand&amp;quot; )&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;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Vehicle functions}}&lt;/div&gt;</summary>
		<author><name>DracoBlue</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User:DracoBlue/DGTAsa&amp;diff=8215</id>
		<title>User:DracoBlue/DGTAsa</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User:DracoBlue/DGTAsa&amp;diff=8215"/>
		<updated>2007-05-10T08:53:19Z</updated>

		<summary type="html">&lt;p&gt;DracoBlue: /* */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Implementation==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;function inheritsFrom( baseClass )&lt;br /&gt;
&lt;br /&gt;
	local new_class = {}&lt;br /&gt;
	local class_mt = { __index = new_class }&lt;br /&gt;
	&lt;br /&gt;
	function new_class:create()&lt;br /&gt;
		local newinst = {}&lt;br /&gt;
		setmetatable( newinst, class_mt )&lt;br /&gt;
		return newinst&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if nil ~= baseClass then&lt;br /&gt;
		setmetatable( new_class, { __index = baseClass } )&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Implementation of additional OO properties starts here --&lt;br /&gt;
	&lt;br /&gt;
	-- Return the class object of the instance&lt;br /&gt;
	function new_class:class()&lt;br /&gt;
		return new_class&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Return the super class object of the instance&lt;br /&gt;
	function new_class:superClass()&lt;br /&gt;
		return baseClass&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Return true if the caller is an instance of theClass&lt;br /&gt;
	function new_class:isa( theClass )&lt;br /&gt;
		local b_isa = false&lt;br /&gt;
	&lt;br /&gt;
		local cur_class = new_class&lt;br /&gt;
	&lt;br /&gt;
		while ( nil ~= cur_class ) and ( false == b_isa ) do&lt;br /&gt;
		if cur_class == theClass then&lt;br /&gt;
			b_isa = true&lt;br /&gt;
		else&lt;br /&gt;
			cur_class = cur_class:superClass()&lt;br /&gt;
		end&lt;br /&gt;
		end&lt;br /&gt;
	&lt;br /&gt;
		return b_isa&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return new_class&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
GTAElement=inheritsFrom(nil)&lt;br /&gt;
GTAElement.ID=nil&lt;br /&gt;
function GTAElement:className() return &amp;quot;GTAElement&amp;quot; end&lt;br /&gt;
function GTAElement:setData(key,value)&lt;br /&gt;
	setElementData(self.ID,key,value)&lt;br /&gt;
end&lt;br /&gt;
function GTAElement:getData(key)&lt;br /&gt;
	return getElementData(self.ID,key)&lt;br /&gt;
end&lt;br /&gt;
function GTAElement:Position()&lt;br /&gt;
	return getElementPosition(self.ID)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
GTAPlayer=inheritsFrom(GTAElement)&lt;br /&gt;
function GTAPlayer:className() return &amp;quot;GTAPlayer&amp;quot; end&lt;br /&gt;
function GTAPlayer:giveWeapon(w_id,ammo)&lt;br /&gt;
	giveWeapon(self.ID,w_id,ammo)&lt;br /&gt;
end&lt;br /&gt;
function GTAPlayer:Ping()&lt;br /&gt;
	return getPlayerPing(self.ID)&lt;br /&gt;
end&lt;br /&gt;
function GTAPlayer:Name()&lt;br /&gt;
	return getClientName(self.ID)&lt;br /&gt;
end&lt;br /&gt;
function GTAPlayer:Rotation()&lt;br /&gt;
	return getPlayerRotation(self.ID)&lt;br /&gt;
end&lt;br /&gt;
function GTAPlayer:Health()&lt;br /&gt;
	return getPlayerHealth(self.ID)&lt;br /&gt;
end&lt;br /&gt;
function GTAPlayer:setHealth(val)&lt;br /&gt;
	return setPlayerHealth(self.ID,val)&lt;br /&gt;
end&lt;br /&gt;
function GTAPlayer:die(attacker,weapon,bodypart)&lt;br /&gt;
	return killPlayer(self.ID,attacker,weapon,bodypart)&lt;br /&gt;
end&lt;br /&gt;
function GTAPlayer:isDead()&lt;br /&gt;
	return isPlayerDead(self.ID)&lt;br /&gt;
end&lt;br /&gt;
function GTAPlayer:isAlive()&lt;br /&gt;
	return not isPlayerDead(self.ID)&lt;br /&gt;
end&lt;br /&gt;
function GTAPlayer:isDucked()&lt;br /&gt;
	return isPlayerDucked(self.ID)&lt;br /&gt;
end&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
== Usage ==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
p = GTAPlayer:create()&lt;br /&gt;
p.ID=source;&lt;br /&gt;
p:setHealth(p:Health()-10)&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>DracoBlue</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=User:DracoBlue&amp;diff=8160</id>
		<title>User:DracoBlue</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=User:DracoBlue&amp;diff=8160"/>
		<updated>2007-05-01T12:01:55Z</updated>

		<summary type="html">&lt;p&gt;DracoBlue: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Personal ==&lt;br /&gt;
Most stuff can be found on my private site [http://dracoblue.net dracoblue.net].&lt;br /&gt;
* [http://dracoblue.net/dev dev-diary]&lt;br /&gt;
* [http://gtat.org GTA:Tournament] (League based on SAMP, soon MTA!)&lt;br /&gt;
* ''(german)'' [http://www.newsflut.de newsflut.de]&lt;br /&gt;
* ''(german)'' [http://wp.dracoblue.net private blog]&lt;br /&gt;
* [http://luanet.net/lua Lua API Documentation]&lt;br /&gt;
&lt;br /&gt;
== MTA:Scripting ==&lt;br /&gt;
''I'll be away again for about a week (until 17th of May), because I am traveling to games/development presentation if flagshipstudios, I got sponsored by EA to fly to San Francisco. As soon as I am back I'll post first information about the Lua:MissionSystem I'll use in GTA:T for MTA and the free TestLibrary I wrote for practice.''&lt;/div&gt;</summary>
		<author><name>DracoBlue</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=XmlNodeSetAttribute&amp;diff=7977</id>
		<title>XmlNodeSetAttribute</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=XmlNodeSetAttribute&amp;diff=7977"/>
		<updated>2007-04-13T09:42:58Z</updated>

		<summary type="html">&lt;p&gt;DracoBlue: /* Added 'See Also' related functions - added lua-tag to explaining code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Incomplete]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This fake function is for use with blah &amp;amp; blah and does blahblahblabhalbhl&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;
*'''argumentName:''' description&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''argumentName2:''' descriptiona&lt;br /&gt;
*'''argumentName3:''' description&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if blah, ''false'' otherwise.&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;/div&gt;</summary>
		<author><name>DracoBlue</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=XmlNodeGetValue&amp;diff=7976</id>
		<title>XmlNodeGetValue</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=XmlNodeGetValue&amp;diff=7976"/>
		<updated>2007-04-13T09:42:24Z</updated>

		<summary type="html">&lt;p&gt;DracoBlue: /* *Added lua tags */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Incomplete]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This fake function is for use with blah &amp;amp; blah and does blahblahblabhalbhl&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 xmlNodeGetValue ( xmlnode xmlnode )             &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''argumentName:''' description&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''argumentName2:''' descriptiona&lt;br /&gt;
*'''argumentName3:''' description&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if blah, ''false'' otherwise.&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;/div&gt;</summary>
		<author><name>DracoBlue</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=XmlNodeGetAttribute&amp;diff=7975</id>
		<title>XmlNodeGetAttribute</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=XmlNodeGetAttribute&amp;diff=7975"/>
		<updated>2007-04-13T09:42:00Z</updated>

		<summary type="html">&lt;p&gt;DracoBlue: /* *Added lua tags */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Incomplete]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This fake function is for use with blah &amp;amp; blah and does blahblahblabhalbhl&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;
*'''argumentName:''' description&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''argumentName2:''' descriptiona&lt;br /&gt;
*'''argumentName3:''' description&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if blah, ''false'' otherwise.&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;/div&gt;</summary>
		<author><name>DracoBlue</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=XmlNodeSetValue&amp;diff=7974</id>
		<title>XmlNodeSetValue</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=XmlNodeSetValue&amp;diff=7974"/>
		<updated>2007-04-13T09:41:06Z</updated>

		<summary type="html">&lt;p&gt;DracoBlue: /* Added 'See Also' related functions - added lua-tag to explaining code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Incomplete]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This fake function is for use with blah &amp;amp; blah and does blahblahblabhalbhl&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 xmlNodeSetValue ( xmlnode xmlnode, var value )            &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''argumentName:''' description&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''argumentName2:''' descriptiona&lt;br /&gt;
*'''argumentName3:''' description&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if blah, ''false'' otherwise.&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;/div&gt;</summary>
		<author><name>DracoBlue</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=XmlUnloadFile&amp;diff=7973</id>
		<title>XmlUnloadFile</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=XmlUnloadFile&amp;diff=7973"/>
		<updated>2007-04-13T09:40:33Z</updated>

		<summary type="html">&lt;p&gt;DracoBlue: /* Added 'See Also' related functions - added lua-tag to explaining code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Incomplete]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This fake function is for use with blah &amp;amp; blah and does blahblahblabhalbhl&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 xmlUnloadFile ( xmlnode xmlnode )               &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''argumentName:''' description&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''argumentName2:''' descriptiona&lt;br /&gt;
*'''argumentName3:''' description&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if blah, ''false'' otherwise.&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;/div&gt;</summary>
		<author><name>DracoBlue</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=XmlNodeGetValue&amp;diff=7972</id>
		<title>XmlNodeGetValue</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=XmlNodeGetValue&amp;diff=7972"/>
		<updated>2007-04-13T09:39:59Z</updated>

		<summary type="html">&lt;p&gt;DracoBlue: /* Added 'See Also' related functions - added lua-tag to explaining code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Incomplete]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This fake function is for use with blah &amp;amp; blah and does blahblahblabhalbhl&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 xmlNodeGetValue ( xmlnode xmlnode )             &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''argumentName:''' description&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''argumentName2:''' descriptiona&lt;br /&gt;
*'''argumentName3:''' description&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if blah, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example does...&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&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;/div&gt;</summary>
		<author><name>DracoBlue</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=XmlNodeGetAttribute&amp;diff=7971</id>
		<title>XmlNodeGetAttribute</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=XmlNodeGetAttribute&amp;diff=7971"/>
		<updated>2007-04-13T09:39:05Z</updated>

		<summary type="html">&lt;p&gt;DracoBlue: /* Added 'See Also' related functions*/&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Incomplete]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
This fake function is for use with blah &amp;amp; blah and does blahblahblabhalbhl&lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&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;
*'''argumentName:''' description&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
*'''argumentName2:''' descriptiona&lt;br /&gt;
*'''argumentName3:''' description&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if blah, ''false'' otherwise.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example does...&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&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;/div&gt;</summary>
		<author><name>DracoBlue</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetClientIP&amp;diff=6754</id>
		<title>GetClientIP</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetClientIP&amp;diff=6754"/>
		<updated>2006-12-13T22:17:09Z</updated>

		<summary type="html">&lt;p&gt;DracoBlue: /* typo fixed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
This function returns a string containing the IP of the client.&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 getClientIP ( client theClient )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''theClient:''' The client [[element]] (player or admin) you want to get the IP of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns a string containing the requested client's IP, or ''false'' if the client passed to the function is invalid.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
This example prints a player's IP to the chat.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addCommandHandler ( &amp;quot;ip&amp;quot;, &amp;quot;printIP&amp;quot; )&lt;br /&gt;
function printIP ( thePlayer, key )&lt;br /&gt;
  outputChatBox ( getClientName ( thePlayer ) .. &amp;quot;'s IP is: &amp;quot; .. getClientIP ( thePlayer ) )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Client functions}}&lt;/div&gt;</summary>
		<author><name>DracoBlue</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnPlayerChat&amp;diff=6630</id>
		<title>OnPlayerChat</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnPlayerChat&amp;diff=6630"/>
		<updated>2006-12-04T17:11:55Z</updated>

		<summary type="html">&lt;p&gt;DracoBlue: /* Variables */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Incomplete Event]]&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This event is triggered when a player chats inside the chat 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;
void onPlayerChat( player tmpplayer, string message )          &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
*'''player''': A player element refering to the player who is chatting the message&lt;br /&gt;
*'''message''': A string representing the message typed into the chat&lt;br /&gt;
&lt;br /&gt;
===Canceling===&lt;br /&gt;
If this event is [[Events#Canceling|canceled]], the game's chatsystem won't deliver the posts. Use [[outputChatBox]] to send the messages then.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example adds the /me command into the script.  For example, if a player called Bob types &amp;quot;me likes pie&amp;quot; in console, it will display &amp;quot;* Bob likes pie&amp;quot; in the chatbox.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerChat &amp;quot;, getRootElement(), &amp;quot;onPlayerChat&amp;quot; ) -- add an event handler for onPlayerChat&lt;br /&gt;
function onPlayerChat ( player, message )&lt;br /&gt;
  if ( strtok ( message , 1, 32 ) == &amp;quot;!createhydra&amp;quot; ) then&lt;br /&gt;
    x, y, z = getElementPosition ( player )&lt;br /&gt;
    createVehicle ( 520, x + 5, y, z )&lt;br /&gt;
    outputChatBox(&amp;quot;You got a hydra&amp;quot;,player)&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;
{{Event_functions}}&lt;br /&gt;
* [[Gettok]]&lt;br /&gt;
* [[Split]]&lt;/div&gt;</summary>
		<author><name>DracoBlue</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnPlayerChat&amp;diff=6629</id>
		<title>OnPlayerChat</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnPlayerChat&amp;diff=6629"/>
		<updated>2006-12-04T17:11:30Z</updated>

		<summary type="html">&lt;p&gt;DracoBlue: /* Added description and all necessary stuff, fixed the example. Will check if the Event-Canceling works as it is supposed to, and will remove the InComplete-Tag then */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Incomplete Event]]&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This event is triggered when a player chats inside the chat 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;
void onPlayerChat( player tmpplayer, string message )          &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
==Variables==&lt;br /&gt;
*'''player''': A player element refering to the player who used the pickup&lt;br /&gt;
*'''message''': A string representing the message typed into the chat&lt;br /&gt;
&lt;br /&gt;
===Canceling===&lt;br /&gt;
If this event is [[Events#Canceling|canceled]], the game's chatsystem won't deliver the posts. Use [[outputChatBox]] to send the messages then.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example adds the /me command into the script.  For example, if a player called Bob types &amp;quot;me likes pie&amp;quot; in console, it will display &amp;quot;* Bob likes pie&amp;quot; in the chatbox.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerChat &amp;quot;, getRootElement(), &amp;quot;onPlayerChat&amp;quot; ) -- add an event handler for onPlayerChat&lt;br /&gt;
function onPlayerChat ( player, message )&lt;br /&gt;
  if ( strtok ( message , 1, 32 ) == &amp;quot;!createhydra&amp;quot; ) then&lt;br /&gt;
    x, y, z = getElementPosition ( player )&lt;br /&gt;
    createVehicle ( 520, x + 5, y, z )&lt;br /&gt;
    outputChatBox(&amp;quot;You got a hydra&amp;quot;,player)&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;
{{Event_functions}}&lt;br /&gt;
* [[Gettok]]&lt;br /&gt;
* [[Split]]&lt;/div&gt;</summary>
		<author><name>DracoBlue</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Client_side_scripts&amp;diff=6628</id>
		<title>Client side scripts</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Client_side_scripts&amp;diff=6628"/>
		<updated>2006-12-04T16:53:40Z</updated>

		<summary type="html">&lt;p&gt;DracoBlue: /* More? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Client side scripts are scripts that run inside the deathmatch mod client side. This means that have access to more information about the game world, but slightly less information about the rest of the players in the game.&lt;br /&gt;
&lt;br /&gt;
==Why are we implementing client scripts now?==&lt;br /&gt;
We had planned to do client scripts in a future release, but its become apparent that it may be the fastest way to make a new editor for deathmatch. The alternatives we've got for the editor are:&lt;br /&gt;
* Hack the race editor to work with DM: This is possible, but would take a lot of work. The editor currently doesn't even compile with the dm code base and it doesn't support many things that are in dm. The old race editor is a mess code-wise and as a consequence really needs a rewrite to add anything new to it.&lt;br /&gt;
* Write a new editor using wxwidgets. This would be ideal, but its clear that this is actually a larger task than we envisioned. We may do this in the future, but we don't have the time right now if we want a release within the next month or so.&lt;br /&gt;
* Implement an editor in server side scripts. This could work, but the server is not really aware enough of the client to make it a smooth enough experience. This would be the fastest to do, much of this has already been done.&lt;br /&gt;
* Implement client scripts. This is what we intend to do. The advantages are that its something we intended to do in the future anyway, it hopefully won't take too long and we can &amp;quot;open source&amp;quot; the editor script and allow QA to help us write it. This allows us to focus on just writing functionality client and server side, while letting 3rd parties write our scripts for us!&lt;br /&gt;
&lt;br /&gt;
==How will it work?==&lt;br /&gt;
It is intended that client side scripts will follow the same pattern as server side scripts. We will provide as many as the same functions client side as exist server side, and we'll provide a simple way of interfacing between the two halves of a script, using the same event system as we already have. Client and server scripts will either have to be in two separate .lua files or within the .map file in a &amp;lt;script&amp;gt; tag.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;map&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;race_clientside.lua&amp;quot; runat=&amp;quot;client&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;script src=&amp;quot;race_serverside.lua&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/map&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you wanted to trigger a client side event from the server, you would first have to register the client side event using addEvent. Then, you can attach a handler to the event as you would in a server side script. Then in the server side script, you'll be able to call triggerClientEvent ( player, &amp;quot;eventName&amp;quot;, element, args ... ) which will trigger the event client side. The same will be able to be done in reverse.&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
'''Client side:'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
addEvent(&amp;quot;ShowObjectBrowser&amp;quot;, &amp;quot;id&amp;quot;)&lt;br /&gt;
addEventHandler(&amp;quot;ShowObjectBrowser&amp;quot;, getRootElement(), &amp;quot;showObjectBrowser&amp;quot;)&lt;br /&gt;
function showObjectBrowser(id)&lt;br /&gt;
   -- code here&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
'''Server side:'''&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
triggerClientEvent ( source, &amp;quot;ShowObjectBrowser&amp;quot;, getRootElement(), 1034 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==More?==&lt;br /&gt;
First draft, pester me (eAi) to answer anything I've missed or isn't clear.&lt;br /&gt;
*Perfect. I don't know if it was mentioned before, but it would be really good to have extended camera movement (not like normal in game). So that you can move up, down, forward and so on with keys and move the place where camera looks at with mouse. --[[User:DracoBlue|DracoBlue]] 10:53, 4 December 2006 (CST)&lt;/div&gt;</summary>
		<author><name>DracoBlue</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPlayerStat&amp;diff=6623</id>
		<title>SetPlayerStat</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPlayerStat&amp;diff=6623"/>
		<updated>2006-12-03T21:32:43Z</updated>

		<summary type="html">&lt;p&gt;DracoBlue: /* Required Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Needs_Checking|Need a section to define what maxs the bar out and what values attain new shooting levels}} &lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function allows you to set the float value of a specific statistic for a [[player]].&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool setPlayerStat ( element player, stat, float value )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''player''': the [[player]] whose statistic you want to modify.&lt;br /&gt;
*'''stat''': A whole number determining the stat ID. &lt;br /&gt;
{{Stats}}&lt;br /&gt;
*'''value''': A float number the stat will be set to. (0..999)&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the statistic was changed succesfully. Returns ''false'' if an invalid player is specified, or the stat-id/value is out of acceptable range.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Player functions}}&lt;/div&gt;</summary>
		<author><name>DracoBlue</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPlayerStat&amp;diff=6622</id>
		<title>SetPlayerStat</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPlayerStat&amp;diff=6622"/>
		<updated>2006-12-03T21:32:14Z</updated>

		<summary type="html">&lt;p&gt;DracoBlue: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Needs_Checking|Need a section to define what maxs the bar out and what values attain new shooting levels}} &lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This function allows you to set the float value of a specific statistic for a [[player]].&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;bool setPlayerStat ( element player, stat, float value )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''player''': the [[player]] whose statistic you want to modify.&lt;br /&gt;
*'''stat''': A whole number determining the stat ID. (0..999)&lt;br /&gt;
{{Stats}}&lt;br /&gt;
*'''value''': A float number the stat will be set to.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns ''true'' if the statistic was changed succesfully. Returns ''false'' if an invalid player is specified, or the stat-id/value is out of acceptable range.&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Player functions}}&lt;/div&gt;</summary>
		<author><name>DracoBlue</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPlayerRotation&amp;diff=6621</id>
		<title>SetPlayerRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPlayerRotation&amp;diff=6621"/>
		<updated>2006-12-03T21:20:29Z</updated>

		<summary type="html">&lt;p&gt;DracoBlue: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Incomplete]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
Thid function allows you to set the current rotation of the specified 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 setPlayerRotation ( player theplayer, float rotation )         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''theplayer:''' An [[player]] referring to a player.&lt;br /&gt;
*'''rotation:''' A [[float]] specifying the desired rotation.&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;
This example does...&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- rotate the player, so that he looks to the south&lt;br /&gt;
setPlayerRotation ( player, 180 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Player functions}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Incomplete]]&lt;/div&gt;</summary>
		<author><name>DracoBlue</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=SetPlayerRotation&amp;diff=6620</id>
		<title>SetPlayerRotation</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=SetPlayerRotation&amp;diff=6620"/>
		<updated>2006-12-03T21:19:19Z</updated>

		<summary type="html">&lt;p&gt;DracoBlue: /* Added small example to show that it works with degrees and not radiant*/&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Incomplete]]&lt;br /&gt;
&lt;br /&gt;
__NOTOC__ &lt;br /&gt;
Thid function allows you to set the current rotation of the specified 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 setPlayerRotation ( element player, float rotation )         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''player:''' An [[element]] referring to a player.&lt;br /&gt;
*'''rotation:''' A [[float]] specifying the desired rotation.&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;
This example does...&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
-- rotate the player, so that he looks to the south&lt;br /&gt;
setPlayerRotation ( player, 180 )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Player functions}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Incomplete]]&lt;/div&gt;</summary>
		<author><name>DracoBlue</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=Template:Player_functions&amp;diff=6615</id>
		<title>Template:Player functions</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=Template:Player_functions&amp;diff=6615"/>
		<updated>2006-12-03T14:53:19Z</updated>

		<summary type="html">&lt;p&gt;DracoBlue: /*  Removed the ip thing, because you must use getClientIP :-) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[addPlayerClothes]]&lt;br /&gt;
* [[canPlayerUseFunction]]&lt;br /&gt;
* [[doesPlayerHaveJetPack]]&lt;br /&gt;
* [[getPlayerArmor]]&lt;br /&gt;
* [[getPlayerClothes]]&lt;br /&gt;
* [[getPlayerCount]]&lt;br /&gt;
* [[getPlayerAmmoInClip]]&lt;br /&gt;
* [[getPlayerTotalAmmo]]&lt;br /&gt;
* [[getPlayerCurrentWeaponID]]&lt;br /&gt;
* [[getPlayerFromNick]]&lt;br /&gt;
* [[getPlayerHealth]]&lt;br /&gt;
* [[getPlayerLevel]]&lt;br /&gt;
* [[getPlayerMoney]]&lt;br /&gt;
* [[getPlayerOccupiedVehicle]]&lt;br /&gt;
* [[getPlayerOccupiedVehicleSeat]]&lt;br /&gt;
* [[getPlayerPing]]&lt;br /&gt;
* [[getPlayerRotation]]&lt;br /&gt;
* [[getPlayerSkin]]&lt;br /&gt;
* [[getPlayerStat]]&lt;br /&gt;
* [[getPlayerTarget]]&lt;br /&gt;
* [[getPlayerTeam]]&lt;br /&gt;
* [[getRandomPlayer]]&lt;br /&gt;
* [[getWantedLevel]]&lt;br /&gt;
* [[givePlayerJetPack]]&lt;br /&gt;
* [[givePlayerMoney]]&lt;br /&gt;
* [[isPlayerDead]]&lt;br /&gt;
* [[isPlayerDucked]]&lt;br /&gt;
* [[isPlayerInVehicle]]&lt;br /&gt;
* [[isPlayerMuted]]&lt;br /&gt;
* [[isPlayerOnGround]]&lt;br /&gt;
* [[isPlayerUnderWater]]&lt;br /&gt;
* [[isPlayerScoreboardForced]]&lt;br /&gt;
* [[isPlayerMapForced]]&lt;br /&gt;
* [[getAlivePlayers]]&lt;br /&gt;
* [[getDeadPlayers]]&lt;br /&gt;
* [[getPlayerTask]]&lt;br /&gt;
* [[getPlayerSimplestTask]]&lt;br /&gt;
* [[isPlayerDoingTask]]&lt;br /&gt;
* [[getPlayerNametagText]]&lt;br /&gt;
* [[getPlayerNametagColor]]&lt;br /&gt;
* [[killPlayer]]&lt;br /&gt;
* [[removePlayerClothes]]&lt;br /&gt;
* [[removePlayerFromVehicle]]&lt;br /&gt;
* [[removePlayerJetPack]]&lt;br /&gt;
* [[setPlayerArmor]]&lt;br /&gt;
* [[setPlayerHealth]]&lt;br /&gt;
* [[setPlayerMoney]]&lt;br /&gt;
* [[setPlayerRotation]]&lt;br /&gt;
* [[setPlayerSkin]]&lt;br /&gt;
* [[setPlayerStat]]&lt;br /&gt;
* [[setWantedLevel]]&lt;br /&gt;
* [[showPlayerHudComponent]]&lt;br /&gt;
* [[spawnPlayer]]&lt;br /&gt;
* [[spawnPlayerAtSpawnpoint]]&lt;br /&gt;
* [[takePlayerMoney]]&lt;br /&gt;
* [[warpPlayerIntoVehicle]]&lt;br /&gt;
* [[forcePlayerScoreboard]]&lt;br /&gt;
* [[forcePlayerMap]]&lt;br /&gt;
* [[setPlayerNametagText]]&lt;br /&gt;
* [[setPlayerNametagColor]]&lt;/div&gt;</summary>
		<author><name>DracoBlue</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetPlayerPing&amp;diff=6614</id>
		<title>GetPlayerPing</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetPlayerPing&amp;diff=6614"/>
		<updated>2006-12-03T13:30:12Z</updated>

		<summary type="html">&lt;p&gt;DracoBlue: /* Syntax, to make it equal to style at getplayerwantedlevel */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
This function returns the ping of a specified [[player]]. The ping is the number of milliseconds that data takes to travel from the player's client to the server or the reverse.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int getPlayerPing ( player thePlayer )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
*'''thePlayer''': The [[player]] whose ping you want to determine.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;intPing = getPlayerPing ( findPlayer ( &amp;quot;Someguy&amp;quot; ) )&lt;br /&gt;
outputChatBox ( &amp;quot;Someguy's ping is &amp;quot; .. intPing .. &amp;quot;.&amp;quot; )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{Player functions}}&lt;/div&gt;</summary>
		<author><name>DracoBlue</name></author>
	</entry>
</feed>