<?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=Capsinurass</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=Capsinurass"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Capsinurass"/>
	<updated>2026-04-06T07:27:38Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=CreatePickup&amp;diff=16414</id>
		<title>CreatePickup</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=CreatePickup&amp;diff=16414"/>
		<updated>2008-03-30T08:39:38Z</updated>

		<summary type="html">&lt;p&gt;Capsinurass: /* Required Arguments */  Added House (blue) model ID&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function creates a pickup element, which is placed in the GTA world and can be picked up to retrieve a health, armour or a weapon. &lt;br /&gt;
&lt;br /&gt;
==Syntax== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
pickup createPickup ( float x, float y, float z, int type, int amount/weapon/model, [ int respawnTime = 30000, int ammo = 50 ] )         &lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
* '''x''': A floating point number representing the X coordinate on the map.&lt;br /&gt;
* '''y''': A floating point number representing the Y coordinate on the map.&lt;br /&gt;
* '''z''': A floating point number representing the Z coordinate on the map.&lt;br /&gt;
* '''type''': This is an integer representing the type of pickup, representing the following types:&lt;br /&gt;
** '''0''': Health Pickup&lt;br /&gt;
** '''1''': Armour Pickup&lt;br /&gt;
** '''2''': Weapon Pickup&lt;br /&gt;
** '''3''': Custom Pickup&lt;br /&gt;
* '''amount''': This is an integer representing the amount of Health points or Armour points a pickup has.&lt;br /&gt;
'''OR'''&lt;br /&gt;
* '''weapon''': If the type is a Weapon pickup, then it represents the [[Weapon|weapon ID]] of the weapon pickup the 'ammo' field must be entered if the type is Weapon Pickup.&lt;br /&gt;
'''OR'''&lt;br /&gt;
* '''model''': If the pickup is a custom model, this is the model id to use. Many non-pickup models can be used, though some may cause crashes. The following is a list of models designed to be used as pickups.&lt;br /&gt;
** '''1240:''' Health (heart)&lt;br /&gt;
** '''1242:''' Armour&lt;br /&gt;
** '''1272:''' House (blue)&lt;br /&gt;
** '''1273:''' House (green)&lt;br /&gt;
** '''1274:''' Money (dollar symbol)&lt;br /&gt;
** '''1277:''' Save (floppy disk)&lt;br /&gt;
&lt;br /&gt;
===Optional Arguments=== &lt;br /&gt;
{{OptionalArg}} &lt;br /&gt;
* '''respawnTime''': How long before the pickup respawns in milliseconds&lt;br /&gt;
* '''ammo''': An integer representing the amount of ammo a pickup contains.  This is only valid when the pickup type is a Weapon Pickup, and must be entered.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
&amp;lt;section name=&amp;quot;Server&amp;quot; class=&amp;quot;server&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;&lt;br /&gt;
This example creates a pickup after a player dies so that he drops his weapon.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function createDeathPickup ( totalammo, killer, killerweapon, bodypart ) --when a player dies&lt;br /&gt;
    x, y, z = getElementPosition ( source ) --get the position of the person who died and define it as x, y and z&lt;br /&gt;
    currentweapon = getPlayerCurrentWeaponID ( source ) --get the current weapon of the dead person&lt;br /&gt;
    createPickup ( x, y, z, 2, currentweapon, 10000, totalammo )&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerWasted&amp;quot;, getRootElement(), createDeathPickup ) --add an event handler for onPlayerWasted&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&amp;lt;/section&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
{{IDs}}&lt;br /&gt;
&lt;br /&gt;
{{Pickup functions}}&lt;/div&gt;</summary>
		<author><name>Capsinurass</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnPlayerVehicleExit&amp;diff=16014</id>
		<title>OnPlayerVehicleExit</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnPlayerVehicleExit&amp;diff=16014"/>
		<updated>2008-03-02T05:18:03Z</updated>

		<summary type="html">&lt;p&gt;Capsinurass: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server event}}&lt;br /&gt;
This event is triggered when a player leaves a vehicle, for whatever reason.&lt;br /&gt;
&lt;br /&gt;
==Parameters== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
vehicle theVehicle, int seat, player jacker&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''theVehicle''': A vehicle element representing the vehicle in which the player exited from&lt;br /&gt;
*'''seat''': An integer representing the seat in which the player was before exiting&lt;br /&gt;
*'''jacker''': A player element representing the player who jacked the driver&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[player]] that entered the vehicle.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example adds a 'moto' helmet to a player when he gets on a nrg bike, and removes it when he gets off.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function addHelmetOnEnter ( vehicle, seat, jacked )&lt;br /&gt;
  if ( getVehicleID ( vehicle ) == 522 ) then -- if its a nrg&lt;br /&gt;
    addPlayerClothes ( source, &amp;quot;moto&amp;quot;, &amp;quot;moto&amp;quot;, 16 ) -- add the helmet&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerVehicleEnter&amp;quot;, getRootElement(), addHelmetOnEnter )&lt;br /&gt;
&lt;br /&gt;
function removeHelmetOnExit ( vehicle, seat, jacked )&lt;br /&gt;
  if ( getVehicleID ( vehicle ) == 522 ) then -- if its a nrg&lt;br /&gt;
    removePlayerClothes ( source, 16 ) -- remove the helmet&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerVehicleExit&amp;quot;, getRootElement(), removeHelmetOnExit )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{See also/Server event|Player events}}&lt;/div&gt;</summary>
		<author><name>Capsinurass</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=OnPlayerVehicleExit&amp;diff=16013</id>
		<title>OnPlayerVehicleExit</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=OnPlayerVehicleExit&amp;diff=16013"/>
		<updated>2008-03-02T05:16:45Z</updated>

		<summary type="html">&lt;p&gt;Capsinurass: /* Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server event}}&lt;br /&gt;
This event is triggered when a player leaves a vehicle, for whatever reason.&lt;br /&gt;
&lt;br /&gt;
==Parameters== &lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
vehicle theVehicle, int seat, player jacker&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
*'''theVehicle''': A vehicle element representing the vehicle in which the player exited from&lt;br /&gt;
*'''seat''': An integer representing the seat in which the player was before exiting&lt;br /&gt;
*'''jacker''': A player element representing the player who jacked the driver&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The [[event system#Event source|source]] of this event is the [[player]] that entered the vehicle.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This example adds a 'moto' helmet to a player when he gets on a nrg bike, and removes it when he gets off.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function addHelmetOnEnter ( vehicle, seat, jacked )&lt;br /&gt;
  if ( getVehicleID ( vehicle ) == 522 ) then -- if its a nrg&lt;br /&gt;
    addPlayerClothes ( source, &amp;quot;moto&amp;quot;, &amp;quot;moto&amp;quot;, 16 ) -- add the helmet&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerEnterVehicle&amp;quot;, getRootElement(), addHelmetOnEnter )&lt;br /&gt;
&lt;br /&gt;
function removeHelmetOnExit ( vehicle, seat, jacked )&lt;br /&gt;
  if ( getVehicleID ( vehicle ) == 522 ) then -- if its a nrg&lt;br /&gt;
    removePlayerClothes ( source, 16 ) -- remove the helmet&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
addEventHandler ( &amp;quot;onPlayerVehicleExit&amp;quot;, getRootElement(), removeHelmetOnExit )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{See also/Server event|Player events}}&lt;/div&gt;</summary>
		<author><name>Capsinurass</name></author>
	</entry>
</feed>