Added entry for AddAmmo()
authorRedGrinner@gmail.com
Thu, 24 Mar 2011 13:32:16 +0000
changeset 101 174650a7ce20
parent 100 1671c5c8961a
child 102 86cf695636c6
Added entry for AddAmmo()
LuaAPI.wiki
--- a/LuaAPI.wiki	Thu Mar 24 13:22:56 2011 +0000
+++ b/LuaAPI.wiki	Thu Mar 24 13:32:16 2011 +0000
@@ -331,12 +331,19 @@
 </blockquote>
 === <tt>!SetAmmo(ammoType, count, probability, delay, numberInCrate)</tt> ===
 
-<blockquote>This updates the settings for a specified [AmmoTypes Ammo Type] as of count available for players, spawn probability, availability delay in turns, and the number available in crates. This is supposed to be used in the onAmmoStoreInit() even handler.
+<blockquote>This updates the settings for a specified [AmmoTypes Ammo Type] as of count available for players, spawn probability, availability delay in turns, and the number available in crates. This is supposed to be used in the onAmmoStoreInit() event handler.
 </blockquote>
 Example:
 
 <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> ===
+
+<blockquote>Adds ammoType to the specified gear. The amount added is determined by the arguments passed via !SetAmmo() in the onAmmoStoreInit() event handler.
+
+*Note:* The effectiveness of this function may be limited due to problems with gfPerHogAmmo in lua scripting.
+
+</blockquote>
 === <tt>!SetHealth(gearUid, health)</tt> ===
 
 <blockquote>Sets the health of the specified gear.