932 |
932 |
933 === Ammo === |
933 === Ammo === |
934 ==== <tt>!SetAmmo(ammoType, count, probability, delay, numberInCrate)</tt> ==== |
934 ==== <tt>!SetAmmo(ammoType, count, probability, delay, numberInCrate)</tt> ==== |
935 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. |
935 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. |
936 |
936 |
937 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! |
937 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! |
938 |
938 |
939 Example: |
939 Example: |
940 |
940 |
941 <code language="lua"> SetAmmo(amShotgun, 9, 0, 0, 0) -- unlimited amount of shotgun ammo for players |
941 <code language="lua"> SetAmmo(amShotgun, 9, 0, 0, 0) -- unlimited amount of shotgun ammo for players |
942 SetAmmo(amGrenade, 0, 0, 0, 3) -- crates should contain always three grenade |
942 SetAmmo(amGrenade, 0, 0, 0, 3) -- crates should contain always three grenade |