<?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=OpenIDUser60</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=OpenIDUser60"/>
	<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/wiki/Special:Contributions/OpenIDUser60"/>
	<updated>2026-07-06T10:44:58Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://wiki.multitheftauto.com/index.php?title=GetWeaponClipAmmo&amp;diff=42595</id>
		<title>GetWeaponClipAmmo</title>
		<link rel="alternate" type="text/html" href="https://wiki.multitheftauto.com/index.php?title=GetWeaponClipAmmo&amp;diff=42595"/>
		<updated>2014-10-14T11:25:53Z</updated>

		<summary type="html">&lt;p&gt;OpenIDUser60: /* Syntax */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Needs_Example}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
{{Client function}}&lt;br /&gt;
This function gets the amount of ammo in a custom weapons magazine/clip.&lt;br /&gt;
&lt;br /&gt;
==Syntax==&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;int getWeaponClipAmmo ( weapon theWeapon )&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Required Arguments===&lt;br /&gt;
* '''theWeapon:''' The weapon to get the clip ammo of.&lt;br /&gt;
&lt;br /&gt;
===Returns===&lt;br /&gt;
Returns the amount of ammo in the custom weapons clip, false otherwise.&lt;br /&gt;
&lt;br /&gt;
===Example===&lt;br /&gt;
&amp;lt;section name=&amp;quot;Example 1&amp;quot; class=&amp;quot;client&amp;quot; show=&amp;quot;true&amp;quot;&amp;gt;This example gets your ammo and output it!&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
[lua]&lt;br /&gt;
function getMyAmmo(player) -- Create a function named getMyAmmo and add player as the first parameter of addCommandHandler!&lt;br /&gt;
   local weapon = getPedWeapon(player) -- Create a local variable with the value of getPedWeapon ( the weapon of the player )!&lt;br /&gt;
   local clipAmmo = getWeaponClipAmmo(weapon) -- Now use the local variable and get the weapon's clip ammo!&lt;br /&gt;
   outputChatBox(tostring(clipAmmo), player) -- Output the clipAmmo to the player, Please use tostring for it or it will give you a error that it should be a string!&lt;br /&gt;
end -- End the function&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;
{{Client weapon creation functions}}&lt;/div&gt;</summary>
		<author><name>OpenIDUser60</name></author>
	</entry>
</feed>