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 @@ === !SetAmmo(ammoType, count, probability, delay, numberInCrate) === -
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. +
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.
Example: !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) === + +
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. + +
=== !SetHealth(gearUid, health) ===
Sets the health of the specified gear.