diff -r b55012c48dbd -r 124b11219537 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 @@ !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 -=== !AddAmmo(gearUid, ammoType) === +=== !AddAmmo(gearUid, ammoType, ammoCount) (0.9.16) === -
Adds ammoType to the specified gear. The amount added is determined by the arguments passed via !SetAmmo() in the onAmmoStoreInit() event handler. +
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.