--- a/LuaAPI.wiki Sun Sep 25 13:13:54 2011 +0000
+++ b/LuaAPI.wiki Sun Sep 25 13:18:08 2011 +0000
@@ -358,9 +358,9 @@
<code lang="lua"> !SetAmmo(amShotgun, 9, 0, 0, 0) -- unlimited amount of shotgun ammo for players
!SetAmmo(amGrenade, 0, 0, 0, 3) -- crates should contain always three grenade</code>
-=== <tt>!AddAmmo(gearUid, ammoType)</tt> ===
+=== <tt>!AddAmmo(gearUid, ammoType, ammoCount) (0.9.16) </tt> ===
-<blockquote>Adds ammoType to the specified gear. The amount added is determined by the arguments passed via !SetAmmo() in the onAmmoStoreInit() event handler.
+<blockquote>Adds ammoType to the specified gear. The amount added is determined by the arguments passed via !SetAmmo() in the onAmmoStoreInit() event handler. In 0.9.16 ammo can be set directly via the optional third parameter, ammoCount. A value of 0 will remove the weapon, a value of 100 will give infinite ammo.
*Note:* The effectiveness of this function may be limited due to problems with gfPerHogAmmo in lua scripting.