<?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=Michael+Tuner</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=Michael+Tuner"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/Michael_Tuner"/>
	<updated>2026-05-20T23:09:39Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetSlotFromWeapon&amp;diff=22272</id>
		<title>GetSlotFromWeapon</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetSlotFromWeapon&amp;diff=22272"/>
		<updated>2010-01-10T16:19:58Z</updated>

		<summary type="html">&lt;p&gt;Michael Tuner: /* Required Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function allows you to identify the weapon slot that a weapon belongs to.&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 getSlotFromWeapon ( int weaponid )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''weaponid:''' Weapon to find the weapon slot of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an integer representing the given weapon ID's associated weapon slot, ''false'' if the ID was invalid.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This will output to the chatbox what weapon slot a given weapon number belongs to when entered into the console (i.e. 'getWeaponSlot 10').&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function outputWeaponSlot ( source, commandName, weaponID )&lt;br /&gt;
	local weaponSlot = getSlotFromWeapon ( weaponID )&lt;br /&gt;
	&lt;br /&gt;
	if (weaponSlot) then&lt;br /&gt;
	    outputChatBox ( &amp;quot;Weapon ID &amp;quot; .. weaponID ..  &amp;quot; is in weapon slot &amp;quot; .. weaponSlot)&lt;br /&gt;
	else&lt;br /&gt;
	    outputChatBox ( &amp;quot;Invalid weapon ID&amp;quot; )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;getWeaponSlot&amp;quot;, outputWeaponSlot )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
[[Weapons|Weapon IDs]]&lt;br /&gt;
{{Weapon_functions}}&lt;br /&gt;
[[ru:getSlotFromWeapon]]&lt;/div&gt;</summary>
		<author><name>Michael Tuner</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetSlotFromWeapon&amp;diff=22271</id>
		<title>GetSlotFromWeapon</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetSlotFromWeapon&amp;diff=22271"/>
		<updated>2010-01-10T16:19:15Z</updated>

		<summary type="html">&lt;p&gt;Michael Tuner: /* Required Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function allows you to identify the weapon slot that a weapon belongs to.&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 getSlotFromWeapon ( int weaponid )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''weaponid:''' [[Media:http://wiki.multitheftauto.com/wiki/Weapons]Weapon] to find the weapon slot of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an integer representing the given weapon ID's associated weapon slot, ''false'' if the ID was invalid.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This will output to the chatbox what weapon slot a given weapon number belongs to when entered into the console (i.e. 'getWeaponSlot 10').&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function outputWeaponSlot ( source, commandName, weaponID )&lt;br /&gt;
	local weaponSlot = getSlotFromWeapon ( weaponID )&lt;br /&gt;
	&lt;br /&gt;
	if (weaponSlot) then&lt;br /&gt;
	    outputChatBox ( &amp;quot;Weapon ID &amp;quot; .. weaponID ..  &amp;quot; is in weapon slot &amp;quot; .. weaponSlot)&lt;br /&gt;
	else&lt;br /&gt;
	    outputChatBox ( &amp;quot;Invalid weapon ID&amp;quot; )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;getWeaponSlot&amp;quot;, outputWeaponSlot )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
[[Weapons|Weapon IDs]]&lt;br /&gt;
{{Weapon_functions}}&lt;br /&gt;
[[ru:getSlotFromWeapon]]&lt;/div&gt;</summary>
		<author><name>Michael Tuner</name></author>
	</entry>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetSlotFromWeapon&amp;diff=22270</id>
		<title>GetSlotFromWeapon</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetSlotFromWeapon&amp;diff=22270"/>
		<updated>2010-01-10T16:18:01Z</updated>

		<summary type="html">&lt;p&gt;Michael Tuner: /* Required Arguments */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__ &lt;br /&gt;
{{Server client function}}&lt;br /&gt;
This function allows you to identify the weapon slot that a weapon belongs to.&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 getSlotFromWeapon ( int weaponid )&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt; &lt;br /&gt;
&lt;br /&gt;
===Required Arguments=== &lt;br /&gt;
*'''weaponid:''' [url=http://wiki.multitheftauto.com/wiki/Weapons]The weapon ID[/url] to find the weapon slot of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns an integer representing the given weapon ID's associated weapon slot, ''false'' if the ID was invalid.&lt;br /&gt;
&lt;br /&gt;
==Example== &lt;br /&gt;
This will output to the chatbox what weapon slot a given weapon number belongs to when entered into the console (i.e. 'getWeaponSlot 10').&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
function outputWeaponSlot ( source, commandName, weaponID )&lt;br /&gt;
	local weaponSlot = getSlotFromWeapon ( weaponID )&lt;br /&gt;
	&lt;br /&gt;
	if (weaponSlot) then&lt;br /&gt;
	    outputChatBox ( &amp;quot;Weapon ID &amp;quot; .. weaponID ..  &amp;quot; is in weapon slot &amp;quot; .. weaponSlot)&lt;br /&gt;
	else&lt;br /&gt;
	    outputChatBox ( &amp;quot;Invalid weapon ID&amp;quot; )&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
addCommandHandler ( &amp;quot;getWeaponSlot&amp;quot;, outputWeaponSlot )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See Also==&lt;br /&gt;
[[Weapons|Weapon IDs]]&lt;br /&gt;
{{Weapon_functions}}&lt;br /&gt;
[[ru:getSlotFromWeapon]]&lt;/div&gt;</summary>
		<author><name>Michael Tuner</name></author>
	</entry>
</feed>