--- a/LuaAPI.wiki Sat Jul 07 18:40:59 2018 +0100
+++ b/LuaAPI.wiki Sun Jul 08 00:23:35 2018 +0100
@@ -1061,10 +1061,18 @@
=== Ammo ===
==== <tt>!SetAmmo(ammoType, count, probability, delay, numberInCrate)</tt> ====
-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.
+This updates the settings (initial ammo, crate probability, etc.) for a specified [AmmoTypes ammo type]. This must only be used in the `onAmmoStoreInit()` event handler. In other places, this function will not work.
In Lua missions, for *all* ammo types, the ammo count, probability, delay and number in crates is set to 0 initially. Note: This also includes skip!
+Parameters:
+
+* `ammoType`: Ammo type to be set
+* `count`: Initial ammo count. 9 = infinite
+* `probability`: Crate probability. Max. value is 9. 0 = never
+* `delay`: Number of rounds this ammo is delayed
+* `numberInCrate`: Amount of ammo in a crate
+
Example:
<code language="lua"> SetAmmo(amShotgun, 9, 0, 0, 0) -- unlimited amount of shotgun ammo for players