LuaGameplay.wiki
changeset 1907 806491e9ef60
parent 1906 7891546b4ff8
child 1917 962f362690be
equal deleted inserted replaced
1906:7891546b4ff8 1907:806491e9ef60
   142 Example:
   142 Example:
   143 
   143 
   144 <code language="lua">count, prob, delay, numberInCrate = GetAmmo(amGrenade) -- Get ammo settings of amGrenade</code>
   144 <code language="lua">count, prob, delay, numberInCrate = GetAmmo(amGrenade) -- Get ammo settings of amGrenade</code>
   145 
   145 
   146 === <tt>!SetAmmoDelay(ammoType, delay)</tt> ===
   146 === <tt>!SetAmmoDelay(ammoType, delay)</tt> ===
   147 Changes the delay of a specified [AmmoTypes Ammo Type].
   147 Changes the delay of a specified [AmmoTypes Ammo Type]. If `delay` is set to `9999`, the ammo type is disabled indefinitely.
   148 
   148 
   149 === <tt>!SetAmmoTexts(ammoType, name, caption, description [, showExtra])</tt> (0.9.23) ===
   149 === <tt>!SetAmmoTexts(ammoType, name, caption, description [, showExtra])</tt> (0.9.23) ===
   150 Allows you to overwrite the displayed name and tooltip descriptions of a given ammo type. This function must only be called either inside the `onGameStart` callback function, or after the engine has called `onGameStart`.
   150 Allows you to overwrite the displayed name and tooltip descriptions of a given ammo type. This function must only be called either inside the `onGameStart` callback function, or after the engine has called `onGameStart`.
   151 
   151 
   152  * `ammoType`: The ammo type to set the text for
   152  * `ammoType`: The ammo type to set the text for