# HG changeset patch # User Wuzzy # Date 1531011045 -3600 # Node ID 7325e47d2e2fb52a4ed3e4ecd377984fbee976c3 # Parent 2a4793897bb13acb6a7a62022d2fa8d1758065d2 LuaAPI: GetAmmo diff -r 2a4793897bb1 -r 7325e47d2e2f LuaAPI.wiki --- 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. +==== !GetAmmo(ammoType) ==== +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: + +count, prob, delay, numberInCrate = GetAmmo(amGrenade) -- Get ammo settings of amGrenade + +Hint: It is recommended to always enable skip in missions. Only in exceptional circumstances you should choose to not enable skip. + ==== !SetAmmoDelay(ammoType, delay) ==== Changes the delay of a specified [AmmoTypes Ammo Type].