LuaAPI.wiki
changeset 1427 7325e47d2e2f
parent 1426 2a4793897bb1
child 1428 c3f768cfe463
--- a/LuaAPI.wiki	Sun Jul 08 00:24:04 2018 +0100
+++ b/LuaAPI.wiki	Sun Jul 08 01:50:45 2018 +0100
@@ -1081,6 +1081,17 @@
 
 Hint: It is recommended to always enable skip in missions. Only in exceptional circumstances you should choose to not enable skip.
 
+==== <tt>!GetAmmo(ammoType)</tt> ====
+Returns ammo settings (initial ammo, crate probability, etc.) for a specified [AmmoTypes ammo type]. This function is analogue to `SetAmmo`.
+
+This function returns four numbers, in this order: initial ammo count, probability, delay and number in crate. These values correspond to the parameters 2-5 provided in `SetAmmo` and have the same meaning.
+
+Example:
+
+<code language="lua">count, prob, delay, numberInCrate = GetAmmo(amGrenade) -- Get ammo settings of amGrenade</code>
+
+Hint: It is recommended to always enable skip in missions. Only in exceptional circumstances you should choose to not enable skip.
+
 ==== <tt>!SetAmmoDelay(ammoType, delay)</tt> ====
 Changes the delay of a specified [AmmoTypes Ammo Type].