Edited wiki page LuaAPI through web user interface.
authorRedGrinner@gmail.com
Sun, 25 Sep 2011 13:18:08 +0000
changeset 135 124b11219537
parent 134 b55012c48dbd
child 136 538adf2596b5
Edited wiki page LuaAPI through web user interface.
LuaAPI.wiki
--- 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.