# HG changeset patch # User RedGrinner@gmail.com # Date 1300973536 0 # Node ID 174650a7ce2068d47c8ae06d8e3adcd5994a08db # Parent 1671c5c8961a49d934254f371bdd9678111991ae Added entry for AddAmmo() diff -r 1671c5c8961a -r 174650a7ce20 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.