LuaGameplay.wiki
changeset 2262 6dc92adc347a
parent 2260 e9eccb1eeac4
equal deleted inserted replaced
2261:55bd0ae9d187 2262:6dc92adc347a
   124 Example:
   124 Example:
   125 <code language="lua">
   125 <code language="lua">
   126 -- Shows the "round draw" text from the engine, localized to the player's language
   126 -- Shows the "round draw" text from the engine, localized to the player's language
   127 AddCaption(GetEngineString("TMsgStrId", sidDraw), capcolDefault, capgrpGameState)
   127 AddCaption(GetEngineString("TMsgStrId", sidDraw), capcolDefault, capgrpGameState)
   128 </code>
   128 </code>
       
   129 
       
   130 For engine strings that use placeholders like `%1`, you can use `formatEngineString` from the [LuaLibraryUtils `Utils` library].
   129 
   131 
   130 == Ammo ==
   132 == Ammo ==
   131 === <tt>!SetAmmo(ammoType, count, probability, delay, numberInCrate)</tt> ===
   133 === <tt>!SetAmmo(ammoType, count, probability, delay, numberInCrate)</tt> ===
   132 This updates the settings (initial ammo, crate probability, etc.) for a specified [AmmoTypes ammo type]. This must only be used in the `onAmmoStoreInit()` [LuaEvents event handler]. In other places, this function will not work.
   134 This updates the settings (initial ammo, crate probability, etc.) for a specified [AmmoTypes ammo type]. This must only be used in the `onAmmoStoreInit()` [LuaEvents event handler]. In other places, this function will not work.
   133 
   135